Skip to content

Commit

Permalink
20210401 deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
securesubmit-buildmaster committed Apr 1, 2021
1 parent 7cd1d5c commit 94bffec
Show file tree
Hide file tree
Showing 66 changed files with 2,776 additions and 2,678 deletions.
28 changes: 24 additions & 4 deletions src/Builders/AuthorizationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use GlobalPayments\Api\Entities\Enums\EmvFallbackCondition;
use GlobalPayments\Api\Entities\Enums\EmvLastChipRead;
use GlobalPayments\Api\Entities\Enums\PaymentMethodType;
use GlobalPayments\Api\Entities\Enums\PaymentMethodUsageMode;
use GlobalPayments\Api\Entities\HostedPaymentData;
use GlobalPayments\Api\Entities\Enums\AddressType;
use GlobalPayments\Api\Entities\Enums\AliasAction;
Expand Down Expand Up @@ -502,6 +503,11 @@ class AuthorizationBuilder extends TransactionBuilder
*/
public $surchargeAmount;

/**
* @var PaymentMethodUsageMode $paymentMethodUsageMode
*/
public $paymentMethodUsageMode;

/**
* {@inheritdoc}
*
Expand Down Expand Up @@ -931,15 +937,15 @@ public function withInvoiceNumber($invoiceNumber)
}

/**
* Set the request to request Level II
* Set the request to request Level II or III
*
* @param bool $level2Request Request to request Level II
* @param bool $level2Request Request to request Level II or III
*
* @return AuthorizationBuilder
*/
public function withCommercialRequest($level2Request)
public function withCommercialRequest($level2or3Request)
{
$this->level2Request = $level2Request;
$this->level2Request = $level2or3Request;
return $this;
}

Expand Down Expand Up @@ -1401,4 +1407,18 @@ public function withSurchargeAmount($value)

return $this;
}

/**
* Set the request to use usage_mode
*
* @param string $value
*
* @return AuthorizationBuilder
*/
public function withPaymentMethodUsageMode($value)
{
$this->paymentMethodUsageMode = $value;

return $this;
}
}
33 changes: 33 additions & 0 deletions src/Builders/ManagementBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace GlobalPayments\Api\Builders;

use GlobalPayments\Api\Entities\Enums\CommercialIndicator;
use GlobalPayments\Api\Entities\Enums\TaxType;
use GlobalPayments\Api\Entities\Enums\TransactionModifier;
use GlobalPayments\Api\Entities\Enums\TransactionType;
Expand Down Expand Up @@ -33,11 +34,25 @@ class ManagementBuilder extends TransactionBuilder
*/
public $authAmount;

/**
* Card Brand
*
* @internal
* @var string
*/
public $cardType;

/**
* @internal
* @var string
*/
public $clientTransactionId;

/**
*
* @var CommercialData
*/
public $commercialData;

/**
* Request currency
Expand Down Expand Up @@ -273,6 +288,24 @@ public function withAuthAmount($authAmount)
return $this;
}

/**
* Used in conjunction with edit() on CPCEdit requests
*
* @param CommercialData
*
* @return ManagementBuilder
*/
public function withCommercialData($commercialData)
{
$this->commercialData = $commercialData;

if ($commercialData->commercialIndicator === CommercialIndicator::LEVEL_III) {
$this->transactionModifier = TransactionModifier::LEVEL_III;
}

return $this;
}

/**
* Sets the currency.
*
Expand Down
4 changes: 4 additions & 0 deletions src/Builders/Secure3dBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use GlobalPayments\Api\Entities\Enums\DecoupledFlowRequest;
use GlobalPayments\Api\Entities\Enums\WhiteListStatus;
use GlobalPayments\Api\Gateways\GpApiConnector;
use GlobalPayments\Api\ServicesContainer;
use GlobalPayments\Api\Entities\Exceptions\ApiException;
use GlobalPayments\Api\Entities\Exceptions\GatewayException;
Expand Down Expand Up @@ -1346,6 +1347,9 @@ public function execute($configName = 'default', $version = Secure3dVersion::ANY
if ($exc->responseCode == '110' && $provider->getVersion() === Secure3dVersion::ONE) {
return $rvalue;
}
if ($provider instanceof GpApiConnector) {
throw $exc;
}
} elseif ((bool)$canDowngrade && $this->transactionType === TransactionType::VERIFY_ENROLLED) { // check if we can downgrade
return $this->execute($configName, Secure3dVersion::ONE);
} else { // throw exception
Expand Down
5 changes: 5 additions & 0 deletions src/Builders/TransactionReportBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,21 @@ public function orderBy($sortProperty, $sortDirection = SortDirection::DESC)
{
switch ($this->reportType) {
case ReportType::FIND_TRANSACTIONS:
case ReportType::FIND_TRANSACTIONS_PAGED:
case ReportType::FIND_SETTLEMENT_TRANSACTIONS:
case ReportType::FIND_SETTLEMENT_TRANSACTIONS_PAGED:
$this->transactionOrderBy = $sortProperty;
$this->transactionOrder = $sortDirection;
break;
case ReportType::FIND_DEPOSITS:
case ReportType::FIND_DEPOSITS_PAGED:
$this->depositOrderBy = $sortProperty;
$this->depositOrder = $sortDirection;
break;
case ReportType::FIND_DISPUTES:
case ReportType::FIND_DISPUTES_PAGED:
case ReportType::FIND_SETTLEMENT_DISPUTES:
case ReportType::FIND_SETTLEMENT_DISPUTES_PAGED:
$this->disputeOrderBy = $sortProperty;
$this->disputeOrder = $sortDirection;
break;
Expand Down
11 changes: 11 additions & 0 deletions src/Entities/Enums/PaymentMethodUsageMode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace GlobalPayments\Api\Entities\Enums;

use GlobalPayments\Api\Entities\Enum;

class PaymentMethodUsageMode extends Enum
{
const SINGLE = 'SINGLE';
const MULTIPLE = 'MULTIPLE';
}
5 changes: 5 additions & 0 deletions src/Entities/Enums/ReportType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ class ReportType extends Enum
const DISPUTE_DETAIL = 4096; // 1 << 12
const SETTLEMENT_DISPUTE_DETAIL = 8192; // 1 << 13
const FIND_SETTLEMENT_TRANSACTIONS = 16384; // 1 << 14
const FIND_TRANSACTIONS_PAGED = 32768; // 1 << 15
const FIND_SETTLEMENT_TRANSACTIONS_PAGED = 65536; // 1 << 16
const FIND_DEPOSITS_PAGED = 131072; // 1 << 17
const FIND_DISPUTES_PAGED = 262144; // 1 << 18
const FIND_SETTLEMENT_DISPUTES_PAGED = 524288; // 1 << 19
}
1 change: 1 addition & 0 deletions src/Entities/Enums/TransactionModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ class TransactionModifier extends Enum
const ENCRYPTED_MOBILE = 11;
const SECURE3D = 12;
const ALTERNATIVE_PAYMENT_METHOD = 12;
const LEVEL_III = 13;
}
33 changes: 0 additions & 33 deletions src/Entities/GpApi/AccessToken.php

This file was deleted.

27 changes: 27 additions & 0 deletions src/Entities/GpApi/AccessTokenInfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace GlobalPayments\Api\Entities\GpApi;

class AccessTokenInfo
{
/**
* @var string
*/
public $accessToken;
/**
* @var string
*/
public $dataAccountName;
/**
* @var string
*/
public $disputeManagementAccountName;
/**
* @var string
*/
public $tokenizationAccountName;
/**
* @var string
*/
public $transactionProcessingAccountName;
}
6 changes: 3 additions & 3 deletions src/Entities/GpApi/AccessTokenRequest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace GlobalPayments\Api\Entities\GpApi;


class AccessTokenRequest
{
public $app_id;
Expand All @@ -12,6 +10,7 @@ class AccessTokenRequest
public $grant_type;
public $seconds_to_expire;
public $interval_to_expire;
public $permissions;

/**
* AccessTokenRequest constructor.
Expand All @@ -22,13 +21,14 @@ class AccessTokenRequest
* @param $seconds_to_expire
* @param $interval_to_expire
*/
public function __construct($app_id, $nonce, $secret, $grant_type, $seconds_to_expire, $interval_to_expire)
public function __construct($app_id, $nonce, $secret, $grant_type, $seconds_to_expire, $interval_to_expire, $permissions)
{
$this->app_id = $app_id;
$this->nonce = $nonce;
$this->secret = $secret;
$this->grant_type = $grant_type;
$this->seconds_to_expire = $seconds_to_expire;
$this->interval_to_expire = $interval_to_expire;
$this->permissions = $permissions;
}
}
54 changes: 0 additions & 54 deletions src/Entities/GpApi/CreatePaymentMethodRequest.php

This file was deleted.

Loading

0 comments on commit 94bffec

Please sign in to comment.