Skip to content

Commit a060e27

Browse files
Upgrade SDK 2.4.0
1 parent fc69a28 commit a060e27

16 files changed

Lines changed: 157 additions & 33 deletions

File tree

Lines changed: 14 additions & 0 deletions
Loading

woocommerce-gateway-checkout-com/includes/lib/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
},
77
"require": {
88
"php": ">=5.6",
9-
"checkout/checkout-sdk-php": "^2.3"
9+
"checkout/checkout-sdk-php": "^2.4"
1010
}
1111
}

woocommerce-gateway-checkout-com/includes/lib/composer.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

woocommerce-gateway-checkout-com/includes/lib/vendor/checkout/checkout-sdk-php/lib/Checkout/CheckoutUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class CheckoutUtils
99
{
1010

1111
const PROJECT_NAME = "checkout-sdk-php";
12-
const PROJECT_VERSION = "2.3.0";
12+
const PROJECT_VERSION = "2.4.0";
1313

1414
/**
1515
* @param DateTime $date

woocommerce-gateway-checkout-com/includes/lib/vendor/checkout/checkout-sdk-php/lib/Checkout/Common/Four/AccountHolder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,9 @@ class AccountHolder
2626
* @var Phone
2727
*/
2828
public $phone;
29+
30+
/**
31+
* @var string
32+
*/
33+
public $type;
2934
}

woocommerce-gateway-checkout-com/includes/lib/vendor/checkout/checkout-sdk-php/lib/Checkout/Common/PaymentSourceType.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ class PaymentSourceType
3333
public static $benefitpay = "benefitpay";
3434
public static $bancontact = "bancontact";
3535
public static $tamara = "tamara";
36+
public static $bank_account = "bank_account";
3637
}

woocommerce-gateway-checkout-com/includes/lib/vendor/checkout/checkout-sdk-php/lib/Checkout/Four/FourOAuthScope.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class FourOAuthScope
1414
public static $GatewayPaymentVoids = "gateway:payment-voids";
1515
public static $GatewayPaymentCaptures = "gateway:payment-captures";
1616
public static $GatewayPaymentRefunds = "gateway:payment-refunds";
17+
public static $GatewayMoto = "gateway:moto";
1718
public static $Fx = "fx";
1819
public static $PayoutsBankDetails = "payouts:bank-details";
19-
public static $Sessions = "sessions";
2020
public static $SessionsApp = "sessions:app";
2121
public static $SessionsBrowser = "sessions:browser";
2222
public static $Disputes = "disputes";
@@ -30,14 +30,18 @@ class FourOAuthScope
3030
public static $Files = "files";
3131
public static $FilesRetrieve = "files:retrieve";
3232
public static $FilesUpload = "files:upload";
33-
public static $IssuingClient = "issuing:client";
34-
public static $IssuingPartner = "issuing:partner";
33+
public static $FilesDownload = "files:download";
3534
public static $Risk = "risk";
36-
public static $RiskAssessment = "risk:assessment";
35+
public static $RiskAssessments = "risk:assessments";
3736
public static $RiskSettings = "risk:settings";
3837
public static $Transfers = "transfers";
3938
public static $TransfersCreate = "transfers:create";
4039
public static $TransfersView = "transfers:view";
4140
public static $Balances = "balances";
4241
public static $BalancesView = "balances:view";
42+
public static $Middleware = "middleware";
43+
public static $MiddlewareGateway = "middleware:gateway";
44+
public static $MiddlewarePaymentContext = "middleware:payment-context";
45+
public static $MiddlewareMerchantsSecret = "middleware:merchants-secret";
46+
public static $MiddlewareMerchantsPublic = "middleware:merchants-public";
4347
}

woocommerce-gateway-checkout-com/includes/lib/vendor/checkout/checkout-sdk-php/lib/Checkout/Marketplace/MarketplaceAccountHolder.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
class MarketplaceAccountHolder extends AccountHolder
99
{
10-
/**
11-
* @var MarketplaceAccountHolderType
12-
*/
13-
public $type;
14-
1510
/**
1611
* @var string
1712
*/

woocommerce-gateway-checkout-com/includes/lib/vendor/checkout/checkout-sdk-php/lib/Checkout/Marketplace/MarketplaceClient.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,18 @@ public function submitFile(MarketplaceFileRequest $marketplaceFileRequest)
110110

111111
/**
112112
* @param CreateTransferRequest $transferRequest
113+
* @param null $idempotencyKey
113114
* @return array
114115
* @throws CheckoutApiException
115116
*/
116-
public function initiateTransferOfFunds(CreateTransferRequest $transferRequest)
117+
public function initiateTransferOfFunds(CreateTransferRequest $transferRequest, $idempotencyKey = null)
117118
{
118-
return $this->transfersApiClient->post(self::TRANSFERS_PATH, $transferRequest, $this->sdkAuthorization());
119+
return $this->transfersApiClient->post(
120+
self::TRANSFERS_PATH,
121+
$transferRequest,
122+
$this->sdkAuthorization(),
123+
$idempotencyKey
124+
);
119125
}
120126

121127
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Checkout\Payments\Four\Request\Source\Apm;
4+
5+
use Checkout\Common\PaymentSourceType;
6+
use Checkout\Payments\Four\Request\Source\AbstractRequestSource;
7+
8+
class RequestPayPalSource extends AbstractRequestSource
9+
{
10+
public function __construct()
11+
{
12+
parent::__construct(PaymentSourceType::$paypal);
13+
}
14+
}

0 commit comments

Comments
 (0)