Skip to content

Commit

Permalink
OctopusDeploy release: 8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
securesubmit-buildmaster committed Jun 27, 2023
1 parent 3467310 commit 9b0d4b4
Show file tree
Hide file tree
Showing 25 changed files with 1,005 additions and 430 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
# Changelog

## Latest Version
#### Enhancements:
- Profac: Additional transaction support added | Account Management | Spilt Fund | Network Transaction
- PAX Devices: Improved some tests

#### Bug Fixes:
- GP-ECOM: Fix type confusion vulnerability on sha1hash for hppResponse

## v8.0.1 (05/30/2023)
#### Bug Fixes:
- Portico/Heartland: fix 'AllowDup' flag not included with some CreditReturn transactions

Expand Down
2 changes: 1 addition & 1 deletion metadata.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<xml>
<releaseNumber>8.0.1</releaseNumber>
<releaseNumber>8.0.2</releaseNumber>
</xml>
92 changes: 79 additions & 13 deletions src/Builders/PayFacBuilder.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace GlobalPayments\Api\Builders;

use GlobalPayments\Api\Entities\Address;
use GlobalPayments\Api\Entities\AddressCollection;
use GlobalPayments\Api\Entities\Customer;
use GlobalPayments\Api\Entities\Enums\AddressType;
use GlobalPayments\Api\Entities\Enums\PaymentMethodFunction;
use GlobalPayments\Api\Entities\Enums\StatusChangeReason;
Expand Down Expand Up @@ -40,6 +40,7 @@ class PayFacBuilder extends BaseBuilder
* @var BankAccountData
*/
public $achInformation;
public $mailingAddressInformation;
public $secondaryBankInformation;
public $grossBillingInformation;
public $accountNumber;
Expand All @@ -59,8 +60,23 @@ class PayFacBuilder extends BaseBuilder
public $externalId;
public $sourceEmail;
public $deviceDetails;
public $deviceData;

/** @var string */
public $description;

/** @var string */
public $gatewayTransactionId;

/** @var string */
public $globaltransId;

/** @var string */
public $globalTransSource;

/** @var string */
public $cardBrandTransactionId;

/**
* @var array<Product>
*/
Expand Down Expand Up @@ -105,6 +121,15 @@ class PayFacBuilder extends BaseBuilder
/** @var AddressCollection */
public $addresses;

/**
* Required for partners ordering Portico devices. Valid values:
* [ UTC, PT, MST, MT, CT, ET, HST, AT, AST, AKST, ACT, EET, EAT, MET, NET, PLT,
* IST, BST, VST, CTT, JST, ACT, AET, SST, NST, MIT, CNT, AGT, CAT]
*
* @var string
*/
public $timezone;

const UPLOAD_FILE_TYPES = [
'tif', 'tiff', 'bmp', 'jpg', 'jpeg', 'gif', 'png', 'doc', 'docx'
];
Expand Down Expand Up @@ -134,11 +159,9 @@ public function execute($configName = 'default')
{
parent::execute($configName);
$client = ServicesContainer::instance()->getPayFac($configName);
if (
method_exists($client, "hasBuiltInMerchantManagementService") &&
$client->hasBuiltInMerchantManagementService()
) {
return $client->processBoardingUser($this);
if (method_exists($client, "hasBuiltInMerchantManagementService")
&& $client->hasBuiltInMerchantManagementService()) {
return $client->processBoardingUser($this);
}

return $client->processPayFac($this);
Expand Down Expand Up @@ -246,7 +269,8 @@ protected function setupValidations()

$this->validations->of(TransactionType::SPLIT_FUNDS)
->with(TransactionModifier::NONE)
->check('transNum')->isNotNull()
->check('accountNumber')->isNotNull()
->check('amount')->isNotNull()
->check('receivingAccountNumber')->isNotNull();

$this->validations->of(TransactionType::REVERSE_SPLITPAY)
Expand Down Expand Up @@ -274,7 +298,7 @@ protected function setupValidations()
*
* var Object GlobalPayments\Api\Entities\PayFac\BankAccountData;
*/
public function withBankAccountData(BankAccountData $bankAccountData, $paymentMethodFunction = null)
public function withBankAccountData(BankAccountData $bankAccountData, $paymentMethodFunction = null)
{
$this->bankAccountData = $bankAccountData;
if (!empty($paymentMethodFunction)) {
Expand Down Expand Up @@ -336,7 +360,7 @@ public function withUserPersonalData(UserPersonalData $userPersonalData)
return $this;
}

public function withCreditCardData($creditCardInformation, $paymentMethodFunction = null)
public function withCreditCardData($creditCardInformation, $paymentMethodFunction = null)
{
$this->creditCardInformation = $creditCardInformation;
if (!empty($paymentMethodFunction)) {
Expand All @@ -352,7 +376,13 @@ public function withACHData($achInformation)
$this->achInformation = $achInformation;
return $this;
}


public function withMailingAddress($mailingAddressInformation)
{
$this->mailingAddressInformation = $mailingAddressInformation;
return $this;
}

public function withSecondaryBankAccountData($secondaryBankInformation)
{
$this->secondaryBankInformation = $secondaryBankInformation;
Expand Down Expand Up @@ -413,7 +443,7 @@ public function withRenewalAccountData($renewalAccountData)

/*
* Document details
*
*
* var GlobalPayments\Api\Entities\PayFac\UploadDocumentData
*/
public function withUploadDocumentData($uploadDocumentData)
Expand Down Expand Up @@ -463,7 +493,7 @@ public function withCCAmount($ccAmount)
$this->ccAmount = $ccAmount;
return $this;
}

public function withRequireCCRefund($requireCCRefund)
{
$this->requireCCRefund = $requireCCRefund;
Expand Down Expand Up @@ -493,13 +523,43 @@ public function withSourceEmail($sourceEmail)
$this->sourceEmail = $sourceEmail;
return $this;
}


public function withGatewayTransactionId($gatewayTransactionId)
{
$this->gatewayTransactionId = $gatewayTransactionId;
return $this;
}

public function withGlobaltransId($globaltransId)
{
$this->globaltransId = $globaltransId;
return $this;
}

public function withGlobalTransSource($globalTransSource)
{
$this->globalTransSource = $globalTransSource;
return $this;
}

public function withCardBrandTransactionId($cardBrandTransactionId)
{
$this->cardBrandTransactionId = $cardBrandTransactionId;
return $this;
}

public function withDeviceDetails($deviceDetails)
{
$this->deviceDetails = $deviceDetails;
return $this;
}

public function withDeviceData($deviceData)
{
$this->deviceData = $deviceData;
return $this;
}

public function withDescription($description)
{
$this->description = $description;
Expand Down Expand Up @@ -586,4 +646,10 @@ public function withAddress(Address $address, $type = AddressType::BILLING)

return $this;
}

public function withTimeZone($timezone)
{
$this->timezone = $timezone;
return $this;
}
}
7 changes: 7 additions & 0 deletions src/Entities/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class Address
*/
public $postalCode;

/**
* Consumer's phone.
*
* @var string
*/
public $phone;

/**
* Consumer's country.
*
Expand Down
5 changes: 3 additions & 2 deletions src/Entities/Enums/TransactionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ class TransactionType extends Enum
const REVERSE_SPLITPAY = 281474976710656; //1 << 48;
const SPLIT_FUNDS = 562949953421312; //1 << 49;
const GET_ACCOUNT_DETAILS = 1125899906842624; //1 << 50;
const GET_ACCOUNT_BALANCE = 2251799813685248; //1 << 51;
const GET_ACCOUNT_BALANCE = 2251799813685248; //1 << 51;
const DETOKENIZE = 4503599627370496; //1 << 52
const DISPUTE_ACCEPTANCE = 9007199254740992; // 1 << 53
const DISPUTE_CHALLENGE = 18014398509481984; // 1 << 54
const REAUTH = 36028797018963968; // 1 << 55
const CONFIRM = 72057594037927936; // 1 << 56
const PAYLINK_UPDATE = 144115188075855872; // 1 << 57
const TRANSFER_FUNDS = 288230376151711744; // // 1 << 58
const TRANSFER_FUNDS = 288230376151711744; // 1 << 58
const DEVICE_ORDER = 576460752303423488; // 1 << 59
}
13 changes: 9 additions & 4 deletions src/Entities/PayFac/BusinessData.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class BusinessData

/**
* This field can be used to provide DBA information on an account. ProPay accounts can be
configured to display DBA on cc statements. (Note most banks' CC statements allow for 29
characters so 255 max length is not advised.)
* configured to display DBA on cc statements. (Note most banks' CC statements allow for 29
* characters so 255 max length is not advised.)
*
* @var string
*/
Expand Down Expand Up @@ -80,8 +80,13 @@ class BusinessData
* @var GlobalPayments\Api\Entities\Address
*/
public $businessAddress;



/* Business Type
*
* @var string
*/
public $businessType;

public function __construct()
{
$this->businessAddress = new Address();
Expand Down
22 changes: 22 additions & 0 deletions src/Entities/PayFac/DeviceAttributeInfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace GlobalPayments\Api\Entities\PayFac;

class DeviceAttributeInfo
{
/**
* Name of attribute item which is specific to Portico devices for AMD.
* The value of this item is passed to Heartland for
* equipment boarding.
*
* @var string
*/
public $name;

/**
* Value of the attribute item.
*
* @var string
*/
public $value;
}
25 changes: 24 additions & 1 deletion src/Entities/PayFac/DeviceDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,31 @@

namespace GlobalPayments\Api\Entities\PayFac;

class DeviceDetails
use ArrayObject;
use GlobalPayments\Api\Entities\Exceptions\ArgumentException;

class DeviceDetails extends \ArrayObject
{
public $quantity;
public $timezone;
public $name;
public $attributes;

public function __construct()
{
$this->attributes = new DeviceAttributeInfo();
}

/**
* @param DeviceDetails $value
*
* @return void
*/
public function append($value) : void
{
if (!$value instanceof DeviceDetails) {
throw new ArgumentException("Invalid argument type");
}
parent::append($value);
}
}
23 changes: 23 additions & 0 deletions src/Entities/PayFac/DeviceOrder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace GlobalPayments\Api\Entities\PayFac;

class DeviceOrder
{
public $accountNumber;
public $shipTo;
public $shipToContact;
public $shipToAddress;
public $shipToAddress2;
public $shipToCity;
public $shipToState;
public $shipToZip;
public $shipToPhone;
public $cardholderName;
public $ccNum;
public $expDate;
public $cvv2;
public $billingZip;
public $name;
public $quantity;
}
Loading

0 comments on commit 9b0d4b4

Please sign in to comment.