Skip to content

Commit

Permalink
OctopusDeploy release: 6.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
securesubmit-buildmaster committed Jan 31, 2023
1 parent b716a4e commit 4675519
Show file tree
Hide file tree
Showing 47 changed files with 4,443 additions and 216 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

## Latest version
#### Enhancements:
- GPI Transactions : added support for credit, ach & reporting transactions
- GP-API: add to generateXGPSignature to GenerationUtils
- Portico Gateway: Fix incorrect date handling in schedule response

## v6.0.5 (01/12/2023)
#### Enhancements:
- GP-API: add exemption status on "/transaction" endpoint
- Add enum classes: HostedPaymentMethods, IntervalToExpire
- Portico: added support for SDKNameVersion field
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>6.0.5</releaseNumber>
<releaseNumber>6.0.6</releaseNumber>
</xml>
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<testsuite name="gpapi">
<directory>./test/Integration/Gateways/GpApiConnector/</directory>
</testsuite>
<testsuite name="transactionapi">
<directory>./test/Integration/Gateways/TransactionApiConnector/</directory>
</testsuite>
</testsuites>
</phpunit>
<!-- vim: set ft=xml -->
175 changes: 129 additions & 46 deletions src/Builders/AuthorizationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,45 @@

namespace GlobalPayments\Api\Builders;

use GlobalPayments\Api\Entities\Address;
use GlobalPayments\Api\Entities\AutoSubstantiation;
use GlobalPayments\Api\Entities\EcommerceInfo;
use GlobalPayments\Api\Entities\Enums\BNPLShippingMethod;
use GlobalPayments\Api\Entities\Enums\EmvFallbackCondition;
use GlobalPayments\Api\Entities\Enums\EmvLastChipRead;
use GlobalPayments\Api\Entities\Enums\FraudFilterMode;
use GlobalPayments\Api\Entities\Enums\PaymentMethodUsageMode;
use GlobalPayments\Api\Entities\Enums\PhoneNumberType;
use GlobalPayments\Api\Entities\Enums\RemittanceReferenceType;
use GlobalPayments\Api\Entities\Exceptions\ArgumentException;
use GlobalPayments\Api\Entities\FraudRuleCollection;
use GlobalPayments\Api\Entities\HostedPaymentData;
use GlobalPayments\Api\Entities\Enums\AddressType;
use GlobalPayments\Api\Entities\Enums\AliasAction;
use GlobalPayments\Api\Entities\Enums\InquiryType;
use GlobalPayments\Api\Entities\Enums\RecurringSequence;
use GlobalPayments\Api\Entities\Enums\RecurringType;
use GlobalPayments\Api\Entities\Enums\TransactionModifier;
use GlobalPayments\Api\Entities\Enums\TransactionType;
use GlobalPayments\Api\Entities\PhoneNumber;
use GlobalPayments\Api\Entities\StoredCredential;
use GlobalPayments\Api\Entities\Transaction;
use GlobalPayments\Api\PaymentMethods\BNPL;
use GlobalPayments\Api\PaymentMethods\EBTCardData;
use GlobalPayments\Api\PaymentMethods\GiftCard;
use GlobalPayments\Api\PaymentMethods\Interfaces\IPaymentMethod;
use GlobalPayments\Api\PaymentMethods\TransactionReference;
use GlobalPayments\Api\ServicesContainer;
use GlobalPayments\Api\Entities\DccRateData;
use GlobalPayments\Api\Entities\Customer;
use GlobalPayments\Api\Entities\DecisionManager;
use GlobalPayments\Api\Entities\OrderDetails;
use GlobalPayments\Api\Entities\{
Address,
Customer,
AutoSubstantiation,
EcommerceInfo,
FraudRuleCollection,
HostedPaymentData,
PhoneNumber,
StoredCredential,
Transaction
};
use GlobalPayments\Api\Entities\Enums\{
AddressType,
AliasAction,
BNPLShippingMethod,
DccRateData,
DecisionManager,
EmvFallbackCondition,
EmvLastChipRead,
InquiryType,
FraudFilterMode,
OrderDetails,
PaymentMethodUsageMode,
PhoneNumberType,
RemittanceReferenceType,
RecurringSequence,
RecurringType,
TransactionModifier,
TransactionType
};
use GlobalPayments\Api\PaymentMethods\{
BNPL,
EBTCardData,
GiftCard,
TransactionReference
};
use GlobalPayments\Api\PaymentMethods\Interfaces\IPaymentMethod;
use GlobalPayments\Api\Entities\Exceptions\ArgumentException;

class AuthorizationBuilder extends TransactionBuilder
{
Expand Down Expand Up @@ -511,6 +517,9 @@ class AuthorizationBuilder extends TransactionBuilder
/** @var BNPLShippingMethod */
public $bnplShippingMethod;

/** @var boolean */
public $maskedDataResponse;

/**
* {@inheritdoc}
*
Expand All @@ -534,7 +543,7 @@ public function __construct($type, IPaymentMethod $paymentMethod = null)
public function execute($configName = 'default')
{
parent::execute($configName);

$client = ServicesContainer::instance()->getClient($configName);
return $client->processAuthorization($this);
}
Expand Down Expand Up @@ -567,9 +576,9 @@ protected function setupValidations()
{
$this->validations->of(
TransactionType::AUTH |
TransactionType::SALE |
TransactionType::REFUND |
TransactionType::ADD_VALUE
TransactionType::SALE |
TransactionType::REFUND |
TransactionType::ADD_VALUE
)
->with(TransactionModifier::NONE)
->check('amount')->isNotNull()
Expand All @@ -578,15 +587,15 @@ protected function setupValidations()

$this->validations->of(
TransactionType::AUTH |
TransactionType::SALE
TransactionType::SALE
)
->with(TransactionModifier::HOSTEDREQUEST)
->check('amount')->isNotNull()
->check('currency')->isNotNull();

$this->validations->of(
TransactionType::AUTH |
TransactionType::SALE
TransactionType::SALE
)
->with(TransactionModifier::OFFLINE)
->check('amount')->isNotNull()
Expand All @@ -605,7 +614,7 @@ protected function setupValidations()

$this->validations->of(
TransactionType::AUTH |
TransactionType::SALE
TransactionType::SALE
)
->with(TransactionModifier::ENCRYPTED_MOBILE)
->check('paymentMethod')->isNotNull()
Expand All @@ -620,7 +629,7 @@ protected function setupValidations()

$this->validations->of(
TransactionType::AUTH |
TransactionType::SALE
TransactionType::SALE
)
->with(TransactionModifier::ALTERNATIVE_PAYMENT_METHOD)
->check('amount')->isNotNull()
Expand Down Expand Up @@ -795,6 +804,13 @@ public function withCashBack($cashBackAmount)
return $this;
}

/**
* Set the Client Transaction Id
*
* @param string $clientTransactionId
*
* @return AuthorizationBuilder
*/
public function withClientTransactionId($clientTransactionId)
{
if ($this->transactionType !== TransactionType::REVERSAL) {
Expand Down Expand Up @@ -1134,7 +1150,7 @@ public function withDccRateData($value)
/**
* Set the request Convenience amount
*
* @param string|float $convenienceAmt Request Convenience amount
* @param string|float $convenienceAmount Request Convenience amount
*
* @return AuthorizationBuilder
*/
Expand Down Expand Up @@ -1258,9 +1274,9 @@ public function withScheduleId($scheduleId)
}

/**
* Set the associated schedule ID
* Set the Discount Details
*
* @param string $scheduleId
* @param string $discountDetails
*
* @return AuthorizationBuilder
*/
Expand Down Expand Up @@ -1302,7 +1318,7 @@ public function withCardBrandStorage($transactionInitiator, $value = '')
* Set lastRegisteredDate - DD/MM/YYYY
* Used w/TransIT gateway
*
* @param bool $isRegistered
* @param string $date
*
* @return AuthorizationBuilder
*/
Expand All @@ -1312,14 +1328,39 @@ public function withLastRegisteredDate($date)
return $this;
}

/**
* Set the Multi Capture.
*
* @param boolean $multiCapture
*
* @return $this
*/
public function withMultiCapture($multiCapture = false)
{
$this->multiCapture = $multiCapture;
return $this;
}

/**
* @param $value
* Set shippingDate - YYYY/MM/DD
* Used w/TransactionApi gateway
*
* @param string $date
*
* @return AuthorizationBuilder
*/
public function withShippingDate($date)
{
$this->shippingDate = $date;
return $this;
}

/**
* Set the Tag Data
*
* @param string $value
*
* @return $this
*/
public function withTagData($value)
{
Expand All @@ -1328,6 +1369,13 @@ public function withTagData($value)
return $this;
}

/**
* Sets the Idempotency Key.
*
* @param string $value
*
* @return $this
*/
public function withIdempotencyKey($value)
{
$this->idempotencyKey = $value;
Expand Down Expand Up @@ -1362,6 +1410,19 @@ public function withChipCondition($value)
return $this;
}

/**
* Set the request clerkId
*
* @param string|integer $clerkId Request clerkId
*
* @return AuthorizationBuilder
*/
public function withClerkId($clerkId)
{
$this->clerkId = $clerkId;
return $this;
}

/**
* @param float $value
*
Expand Down Expand Up @@ -1393,7 +1454,7 @@ public function withPaymentMethodUsageMode($value)
* @param string $number
* @param string $type
*
* @return $this
* @return AuthorizationBuilder
*/
public function withPhoneNumber($phoneCountryCode, $number, $type)
{
Expand All @@ -1414,6 +1475,14 @@ public function withPhoneNumber($phoneCountryCode, $number, $type)
return $this;
}

/**
* Set Remittance Reference
*
* @param string $remittanceReferenceType
* @param string $remittanceReferenceValue
*
* @return AuthorizationBuilder
*/
public function withRemittanceReference($remittanceReferenceType, $remittanceReferenceValue)
{
$this->remittanceReferenceType = $remittanceReferenceType;
Expand All @@ -1436,4 +1505,18 @@ public function withBNPLShippingMethod($bnpShippingMethod)
$this->bnplShippingMethod = $bnpShippingMethod;
return $this;
}

/**
* Indicates whether some date will be masked in the response.
* Ex: Personally Identifiable Information (PII) etc.
*
* @param boolean $value
* @return $this
*/
public function withMaskedDataResponse($value)
{
$this->maskedDataResponse = $value;

return $this;
}
}
Loading

0 comments on commit 4675519

Please sign in to comment.