From 955a13a70d6be7e600f10f7790c0e1f62fceef6a Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 2 Feb 2023 13:02:28 +0100 Subject: [PATCH 01/81] Request To Pay Payment method removed (#77) --- example/transactions/requesttopay.php | 23 -------- src/PaymentMethods/PaymentMethodFactory.php | 2 - .../RequestToPay/Models/Pay.php | 47 ---------------- .../RequestToPay/RequestToPay.php | 43 -------------- .../Service/ParameterKeys/CustomerAdapter.php | 30 ---------- src/Tests/Payments/RequestToPayTest.php | 56 ------------------- 6 files changed, 201 deletions(-) delete mode 100644 example/transactions/requesttopay.php delete mode 100644 src/PaymentMethods/RequestToPay/Models/Pay.php delete mode 100644 src/PaymentMethods/RequestToPay/RequestToPay.php delete mode 100644 src/PaymentMethods/RequestToPay/Service/ParameterKeys/CustomerAdapter.php delete mode 100644 src/Tests/Payments/RequestToPayTest.php diff --git a/example/transactions/requesttopay.php b/example/transactions/requesttopay.php deleted file mode 100644 index ef64aadc..00000000 --- a/example/transactions/requesttopay.php +++ /dev/null @@ -1,23 +0,0 @@ -method("requesttopay")->pay([ - 'amountDebit' => 3.5, - 'invoice' => uniqid(), - 'customer' => [ - 'name' => 'J. De Tester', - ], -]); - -$response = $buckaroo->method('requesttopay')->refund([ - 'amountCredit' => 10, - 'invoice' => 'testinvoice 123', - 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', -]); diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 9295c520..1ee4752d 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -51,7 +51,6 @@ use Buckaroo\PaymentMethods\PayPerEmail\PayPerEmail; use Buckaroo\PaymentMethods\PointOfSale\PointOfSale; use Buckaroo\PaymentMethods\Przelewy24\Przelewy24; -use Buckaroo\PaymentMethods\RequestToPay\RequestToPay; use Buckaroo\PaymentMethods\SEPA\SEPA; use Buckaroo\PaymentMethods\Sofort\Sofort; use Buckaroo\PaymentMethods\Subscriptions\Subscriptions; @@ -119,7 +118,6 @@ class PaymentMethodFactory ], Trustly::class => ['trustly'], BankTransfer::class => ['transfer'], - RequestToPay::class => ['requesttopay'], WeChatPay::class => ['wechatpay'], BuckarooVoucher::class => ['buckaroovoucher'], ]; diff --git a/src/PaymentMethods/RequestToPay/Models/Pay.php b/src/PaymentMethods/RequestToPay/Models/Pay.php deleted file mode 100644 index b598063b..00000000 --- a/src/PaymentMethods/RequestToPay/Models/Pay.php +++ /dev/null @@ -1,47 +0,0 @@ -customer = new CustomerAdapter(new Person($customer)); - } - - return $this->customer; - } -} diff --git a/src/PaymentMethods/RequestToPay/RequestToPay.php b/src/PaymentMethods/RequestToPay/RequestToPay.php deleted file mode 100644 index 41b784dc..00000000 --- a/src/PaymentMethods/RequestToPay/RequestToPay.php +++ /dev/null @@ -1,43 +0,0 @@ -payload)); - } -} diff --git a/src/PaymentMethods/RequestToPay/Service/ParameterKeys/CustomerAdapter.php b/src/PaymentMethods/RequestToPay/Service/ParameterKeys/CustomerAdapter.php deleted file mode 100644 index a5d808b5..00000000 --- a/src/PaymentMethods/RequestToPay/Service/ParameterKeys/CustomerAdapter.php +++ /dev/null @@ -1,30 +0,0 @@ - 'DebtorName', - ]; -} diff --git a/src/Tests/Payments/RequestToPayTest.php b/src/Tests/Payments/RequestToPayTest.php deleted file mode 100644 index 96c0942d..00000000 --- a/src/Tests/Payments/RequestToPayTest.php +++ /dev/null @@ -1,56 +0,0 @@ -buckaroo->method("requesttopay")->pay([ -// 'amountDebit' => 3.5, -// 'invoice' => uniqid(), -// 'customer' => [ -// 'name' => 'J. De Tester' -// ] -// ]); -// -// $this->assertTrue($response->isPendingProcessing()); -// } - - /** - * @test - */ - public function it_creates_a_request_to_pay_refund() - { - $response = $this->buckaroo->method('requesttopay')->refund([ - 'amountCredit' => 10, - 'invoice' => 'testinvoice 123', - 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', - ]); - - $this->assertTrue($response->isFailed()); - } -} From 9dd7662cac7cc5e4c8544d07f379f845cafe170d Mon Sep 17 00:00:00 2001 From: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Date: Tue, 7 Feb 2023 14:28:30 +0200 Subject: [PATCH 02/81] Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen --- src/PaymentMethods/iDeal/iDeal.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index cc11f525..c9e74025 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -58,10 +58,10 @@ public function payRemainder(?Model $model = null): TransactionResponse } /** - * @return \mixed + * @return array * @throws \Buckaroo\Exceptions\BuckarooException */ - public function issuers() : mixed + public function issuers(): array { $request = new TransactionRequest; @@ -71,13 +71,13 @@ public function issuers() : mixed } catch (BuckarooException $e) { - return false; + return []; } $issuerList = []; - if (isset($response['Actions']['0']['RequestParameters'][0]['ListItemDescriptions'])) + if (isset($response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions'])) { - $issuersData = $response['Actions']['0']['RequestParameters'][0]['ListItemDescriptions']; + $issuersData = $response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions']; if (count($issuersData) > 0) { foreach ($issuersData as $issuer) From 8587f8fa6b12f856895ef2d0eb6890eb013a3085 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 9 Feb 2023 11:48:37 +0100 Subject: [PATCH 03/81] Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock --- .../Subscriptions/Models/CombinedPayload.php | 3 + .../Subscriptions/Models/Configuration.php | 41 ++++++++++ .../Subscriptions/Models/RatePlan.php | 80 ++++++++++--------- .../Models/{Charge.php => RatePlanCharge.php} | 53 ++++++++++-- .../Models/ResumeSubscription.php | 3 + .../Subscriptions/Models/Subscription.php | 73 ++++++++++++++++- .../Service/ParameterKeys/CompanyAdapter.php | 3 + src/Tests/Payments/SubscriptionsTest.php | 18 +++-- 8 files changed, 227 insertions(+), 47 deletions(-) create mode 100644 src/PaymentMethods/Subscriptions/Models/Configuration.php rename src/PaymentMethods/Subscriptions/Models/{Charge.php => RatePlanCharge.php} (52%) diff --git a/src/PaymentMethods/Subscriptions/Models/CombinedPayload.php b/src/PaymentMethods/Subscriptions/Models/CombinedPayload.php index e25ce36d..6fe39e27 100644 --- a/src/PaymentMethods/Subscriptions/Models/CombinedPayload.php +++ b/src/PaymentMethods/Subscriptions/Models/CombinedPayload.php @@ -24,5 +24,8 @@ class CombinedPayload extends Model { + /** + * @var bool + */ protected bool $startRecurrent; } diff --git a/src/PaymentMethods/Subscriptions/Models/Configuration.php b/src/PaymentMethods/Subscriptions/Models/Configuration.php new file mode 100644 index 00000000..c963dc31 --- /dev/null +++ b/src/PaymentMethods/Subscriptions/Models/Configuration.php @@ -0,0 +1,41 @@ +type = $type; - - parent::__construct($values); - } - + protected string $ratePlanDescription; /** - * @param $charge - * @return Charge + * @var string */ - public function charge($charge = null) - { - if (is_array($charge)) - { - $this->charge = new Charge($charge); - } - - return $this->charge; - } - + protected string $currency; /** - * @param string $key - * @return string|null + * @var int */ - public function getGroupType(string $key): ?string - { - if ($key == 'charge') - { - return $this->type . 'RatePlanCharge'; - } - - return parent::getGroupKey($key); - } + protected int $billingTiming; + /** + * @var bool + */ + protected bool $automaticTerm; + /** + * @var string + */ + protected string $billingInterval; + /** + * @var int + */ + protected int $customNumberOfDays; + /** + * @var int + */ + protected int $termStartDay; + /** + * @var string + */ + protected string $termStartWeek; + /** + * @var string + */ + protected string $termStartMonth; + /** + * @var int + */ + protected int $trialPeriodDays; + /** + * @var int + */ + protected int $trialPeriodMonths; + /** + * @var bool + */ + protected bool $inheritPaymentMethod; } diff --git a/src/PaymentMethods/Subscriptions/Models/Charge.php b/src/PaymentMethods/Subscriptions/Models/RatePlanCharge.php similarity index 52% rename from src/PaymentMethods/Subscriptions/Models/Charge.php rename to src/PaymentMethods/Subscriptions/Models/RatePlanCharge.php index 9657f3b7..c2cf3e21 100644 --- a/src/PaymentMethods/Subscriptions/Models/Charge.php +++ b/src/PaymentMethods/Subscriptions/Models/RatePlanCharge.php @@ -20,15 +20,58 @@ namespace Buckaroo\PaymentMethods\Subscriptions\Models; -use Buckaroo\Models\Model; +use Buckaroo\Models\ServiceParameter; -class Charge extends Model +class RatePlanCharge extends ServiceParameter { - protected string $ratePlanChargeGuid; + /** + * @var string + */ protected string $ratePlanChargeCode; + /** + * @var string + */ + protected string $ratePlanChargeName; + /** + * @var string + */ + protected string $rateplanChargeProductId; + /** + * @var string + */ + protected string $rateplanChargeDescription; + /** + * @var string + */ + protected string $unitOfMeasure; + /** + * @var float + */ protected float $baseNumberOfUnits; + /** + * @var string + */ + protected string $partialBilling; + /** + * @var float + */ protected float $pricePerUnit; - + /** + * @var bool + */ + protected bool $priceIncludesVat; + /** + * @var float + */ protected float $vatPercentage; -} + /** + * @var string + */ + protected string $b2B; + + /** + * @var string + */ + protected string $ratePlanChargeType; +} \ No newline at end of file diff --git a/src/PaymentMethods/Subscriptions/Models/ResumeSubscription.php b/src/PaymentMethods/Subscriptions/Models/ResumeSubscription.php index 6cc7fe59..ff8ac55c 100644 --- a/src/PaymentMethods/Subscriptions/Models/ResumeSubscription.php +++ b/src/PaymentMethods/Subscriptions/Models/ResumeSubscription.php @@ -22,5 +22,8 @@ class ResumeSubscription extends Subscription { + /** + * @var string + */ protected string $resumeDate; } diff --git a/src/PaymentMethods/Subscriptions/Models/Subscription.php b/src/PaymentMethods/Subscriptions/Models/Subscription.php index 2e6377c7..a8e96e35 100644 --- a/src/PaymentMethods/Subscriptions/Models/Subscription.php +++ b/src/PaymentMethods/Subscriptions/Models/Subscription.php @@ -109,6 +109,11 @@ class Subscription extends ServiceParameter */ protected CompanyAdapter $company; + /** + * @var Configuration + */ + protected Configuration $configuration; + /** * @var RatePlan */ @@ -122,6 +127,23 @@ class Subscription extends ServiceParameter */ protected RatePlan $disableRatePlan; + /** + * @var RatePlanCharge + */ + protected RatePlanCharge $addRatePlanCharge; + + /** + * @var string + */ + protected string $customerIBAN; + /** + * @var string + */ + protected string $customerAccountName; + /** + * @var string + */ + protected string $customerBIC; /** * @var array|\string[][] */ @@ -141,12 +163,24 @@ class Subscription extends ServiceParameter 'addRatePlan' => [ 'groupType' => 'AddRatePlan', ], + 'configuration' => [ + 'groupType' => 'AddConfiguration' + ], 'updateRatePlan' => [ 'groupType' => 'UpdateRatePlan', ], 'disableRatePlan' => [ 'groupType' => 'DisableRatePlan', ], + 'addRatePlanCharge' => [ + 'groupType' => 'AddRatePlanCharge', + ], + 'updateRatePlanCharge' => [ + 'groupType' => 'UpdateRatePlanCharge', + ], + 'disableRatePlanCharge' => [ + 'groupType' => 'DisableRatePlanCharge', + ], ]; /** @@ -233,6 +267,10 @@ public function person($person = null) return $this->person; } + /** + * @param $company + * @return Company|CompanyAdapter + */ public function company($company = null) { if (is_array($company)) @@ -243,6 +281,20 @@ public function company($company = null) return $this->company; } + /** + * @param $configuration + * @return Configuration + */ + public function configuration($configuration = null) + { + if (is_array($configuration)) + { + $this->configuration = new Configuration($configuration); + } + + return $this->configuration; + } + /** * @param $rate_plans * @return $this @@ -255,7 +307,26 @@ public function ratePlans($rate_plans = null) { $property = $type . 'RatePlan'; - $this->$property = new RatePlan(ucfirst($type), $rate_plan); + $this->$property = new RatePlan($rate_plan); + } + } + + return $this; + } + + /** + * @param $rate_plan_charges + * @return $this + */ + public function ratePlanCharges($rate_plan_charges = null) + { + if (is_array($rate_plan_charges)) + { + foreach ($rate_plan_charges as $type => $rate_plan_charge) + { + $property = $type . 'RatePlanCharge'; + + $this->$property = new RatePlanCharge($rate_plan_charge); } } diff --git a/src/PaymentMethods/Subscriptions/Service/ParameterKeys/CompanyAdapter.php b/src/PaymentMethods/Subscriptions/Service/ParameterKeys/CompanyAdapter.php index 02c96541..a682c15e 100644 --- a/src/PaymentMethods/Subscriptions/Service/ParameterKeys/CompanyAdapter.php +++ b/src/PaymentMethods/Subscriptions/Service/ParameterKeys/CompanyAdapter.php @@ -24,6 +24,9 @@ class CompanyAdapter extends ServiceParametersKeysAdapter { + /** + * @var array|string[] + */ protected array $keys = [ 'companyName' => 'Name', ]; diff --git a/src/Tests/Payments/SubscriptionsTest.php b/src/Tests/Payments/SubscriptionsTest.php index 07d20248..aae3e89f 100644 --- a/src/Tests/Payments/SubscriptionsTest.php +++ b/src/Tests/Payments/SubscriptionsTest.php @@ -33,18 +33,26 @@ public function it_creates_a_subscription() { $response = $this->buckaroo->method('subscriptions')->create([ 'ratePlans' => [ + 'update' => [ + 'startDate' => date('Y-m-d', strtotime(date('Y-m-d'). ' + 60 days')), + 'ratePlanCode' => 'zfv59mmy', + ], + ], + 'ratePlanCharges' => [ 'add' => [ - 'startDate' => '2023-01-01', - 'ratePlanCode' => 'xxxxxx', + 'ratePlanChargeCode' => 'test', ], ], - 'configurationCode' => 'xxxxx', + 'configurationCode' => 'gfyh9fe4', + 'configuration' => [ + 'name' => 'owiejr' + ], 'debtor' => [ - 'code' => 'xxxxxx', + 'code' => 'johnsmith4', ], ]); - $this->assertTrue($response->isValidationFailure()); + $this->assertTrue($response->isSuccess()); } /** From 593041b759945f9a66ea928e5b2532a7584e13a4 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 9 Feb 2023 13:04:57 +0100 Subject: [PATCH 04/81] Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method --- src/PaymentMethods/Bancontact/Bancontact.php | 16 ++++++++++++++-- src/PaymentMethods/PaymentFacade.php | 2 +- src/PaymentMethods/PaymentMethodFactory.php | 2 +- src/Tests/Payments/BancontactTest.php | 19 +++++++++++++++++-- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/PaymentMethods/Bancontact/Bancontact.php b/src/PaymentMethods/Bancontact/Bancontact.php index eaa4ef08..e82684eb 100644 --- a/src/PaymentMethods/Bancontact/Bancontact.php +++ b/src/PaymentMethods/Bancontact/Bancontact.php @@ -49,11 +49,23 @@ public function payEncrypted(): TransactionResponse /** * @return TransactionResponse */ - public function payRecurrent(): TransactionResponse + public function payRecurring(): TransactionResponse { $this->setPayPayload(); - $this->setServiceList('PayRecurrent'); + $this->setServiceList('PayRecurring'); + + return $this->postRequest(); + } + + /** + * @return TransactionResponse + */ + public function payOneClick(): TransactionResponse + { + $this->setPayPayload(); + + $this->setServiceList('PayOneClick'); return $this->postRequest(); } diff --git a/src/PaymentMethods/PaymentFacade.php b/src/PaymentMethods/PaymentFacade.php index ca298f7c..d9647706 100644 --- a/src/PaymentMethods/PaymentFacade.php +++ b/src/PaymentMethods/PaymentFacade.php @@ -85,7 +85,7 @@ * @method TransactionResponse deletePaymentConfig(array $data) * @method TransactionResponse pause(array $data) * @method TransactionResponse resume(array $data) - * + * @method TransactionResponse payOneClick(array $data) */ class PaymentFacade { diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 1ee4752d..00dc9ee4 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -70,7 +70,7 @@ class PaymentMethodFactory Alipay::class => ['alipay'], Afterpay::class => ['afterpay'], AfterpayDigiAccept::class => ['afterpaydigiaccept'], - Bancontact::class => ['bancontactmrcash'], + Bancontact::class => ['bancontact', 'bancontactmrcash'], Billink::class => ['billink'], Belfius::class => ['belfius'], BuckarooWallet::class => ['buckaroo_wallet'], diff --git a/src/Tests/Payments/BancontactTest.php b/src/Tests/Payments/BancontactTest.php index 43c124d1..4fabc014 100644 --- a/src/Tests/Payments/BancontactTest.php +++ b/src/Tests/Payments/BancontactTest.php @@ -73,9 +73,24 @@ public function it_creates_a_bancontact_encrypted_payment() * @return void * @test */ - public function it_creates_a_bancontact_recurrent_payment() + public function it_creates_a_bancontact_recurring_payment() { - $response = $this->buckaroo->method('bancontactmrcash')->payRecurrent([ + $response = $this->buckaroo->method('bancontactmrcash')->payRecurring([ + 'invoice' => 'testinvoice 123', + 'amountDebit' => 10.50, + 'originalTransactionKey' => '91D08EC01F414926A4CA29C059XXXXXX', + ]); + + $this->assertTrue($response->isValidationFailure()); + } + + /** + * @return void + * @test + */ + public function it_creates_a_bancontact_pay_one_click_payment() + { + $response = $this->buckaroo->method('bancontactmrcash')->payOneClick([ 'invoice' => 'testinvoice 123', 'amountDebit' => 10.50, 'originalTransactionKey' => '91D08EC01F414926A4CA29C059XXXXXX', From 6ab62c03cba7ccd379743f3ecc7b0025d232408f Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 15 Feb 2023 10:39:28 +0100 Subject: [PATCH 05/81] Return null when response data is not set (#81) --- src/Transaction/Response/TransactionResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Transaction/Response/TransactionResponse.php b/src/Transaction/Response/TransactionResponse.php index 454255e4..3935c7d8 100644 --- a/src/Transaction/Response/TransactionResponse.php +++ b/src/Transaction/Response/TransactionResponse.php @@ -445,6 +445,6 @@ public function getCustomerName(): string */ public function get(string $key) { - return $this->data[$key]; + return $this->data[$key] ?? null; } } From 4a0276cc139a6aaf67f366aa567035509b649165 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 21 Feb 2023 10:40:54 +0100 Subject: [PATCH 06/81] BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example --- example/transactions/ideal_qr.php | 1 + src/PaymentMethods/iDealQR/iDealQR.php | 5 ++++- src/Tests/Payments/IdealQRTest.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/example/transactions/ideal_qr.php b/example/transactions/ideal_qr.php index 9d07b101..053d9176 100644 --- a/example/transactions/ideal_qr.php +++ b/example/transactions/ideal_qr.php @@ -10,6 +10,7 @@ //Create payment $response = $buckaroo->method('ideal_qr')->generate([ 'description' => 'Test purchase', + 'returnURL' => 'https://buckaroo.dev./return', 'minAmount' => '0.10', 'maxAmount' => '10.0', 'imageSize' => '2000', diff --git a/src/PaymentMethods/iDealQR/iDealQR.php b/src/PaymentMethods/iDealQR/iDealQR.php index 841b6572..390ae469 100644 --- a/src/PaymentMethods/iDealQR/iDealQR.php +++ b/src/PaymentMethods/iDealQR/iDealQR.php @@ -20,6 +20,7 @@ namespace Buckaroo\PaymentMethods\iDealQR; +use Buckaroo\Models\Payload\Payload; use Buckaroo\PaymentMethods\iDealQR\Models\Generate; use Buckaroo\PaymentMethods\PaymentMethod; @@ -35,8 +36,10 @@ class iDealQR extends PaymentMethod */ public function generate() { - $generate = new Generate($this->payload); + $payPayload = new Payload($this->payload); + $this->request->setPayload($payPayload); + $generate = new Generate($this->payload); $this->setServiceList('Generate', $generate); return $this->dataRequest(); diff --git a/src/Tests/Payments/IdealQRTest.php b/src/Tests/Payments/IdealQRTest.php index acf8e4d8..446ca6bd 100644 --- a/src/Tests/Payments/IdealQRTest.php +++ b/src/Tests/Payments/IdealQRTest.php @@ -31,6 +31,7 @@ public function it_creates_a_ideal_qr() { $response = $this->buckaroo->method('ideal_qr')->generate([ 'description' => 'Test purchase', + 'returnURL' => 'https://buckaroo.dev./return', 'minAmount' => '0.10', 'maxAmount' => '10.0', 'imageSize' => '2000', From eaad5992ce7f1446217aa159aa2e99d4df0728a2 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 21 Feb 2023 10:51:21 +0100 Subject: [PATCH 07/81] 1.3.1 --- CHANGELOG.md | 8 ++++++++ composer.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3c513b4..d17921da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file. ## [Released] +## [1.3.1] +- Payment method Request to pay removed. +- Fixed an issue with getting issuers for iDEAL. Reported by @reflie-nxte +- Add missing subscriptions parameters. +- Add Bancontact alias and fixing typo in method name. +- When response data is not set return null. +- Add missing parameters in iDEAL QR. + ## [1.3.0] - Add parameter retrieval in replyhandler, check lower & upper string - Remove hardcoded iDEAL banks and use api call to retrieve the latest available iDEAL banks diff --git a/composer.json b/composer.json index dd68a786..d9b739cf 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.3.0", + "version": "1.3.1", "type": "library", "require": { "php": ">=7.4|^8.0", From 3c11eaf45d830483c3b18ea7c1c66d3e966d78e8 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 21 Feb 2023 15:11:41 +0100 Subject: [PATCH 08/81] Changing the version --- CHANGELOG.md | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d17921da..dd89ee16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. ## [Released] -## [1.3.1] +## [1.4.0] - Payment method Request to pay removed. - Fixed an issue with getting issuers for iDEAL. Reported by @reflie-nxte - Add missing subscriptions parameters. diff --git a/composer.json b/composer.json index d9b739cf..c8f19306 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.3.1", + "version": "1.4.0", "type": "library", "require": { "php": ">=7.4|^8.0", From 353ee219d3f5804a4021012ac00733ca8041d837 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 21 Feb 2023 15:14:55 +0100 Subject: [PATCH 09/81] Merge conflict --- CHANGELOG.md | 4 ---- composer.json | 4 ---- 2 files changed, 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32147615..dd89ee16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,7 @@ All notable changes to this project will be documented in this file. ## [Released] -<<<<<<< HEAD ## [1.4.0] -======= -## [1.3.1] ->>>>>>> master - Payment method Request to pay removed. - Fixed an issue with getting issuers for iDEAL. Reported by @reflie-nxte - Add missing subscriptions parameters. diff --git a/composer.json b/composer.json index d0ba7f53..c8f19306 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", -<<<<<<< HEAD "version": "1.4.0", -======= - "version": "1.3.1", ->>>>>>> master "type": "library", "require": { "php": ">=7.4|^8.0", From 1c5523dcbe3bd1351c0c04d6f99f878f1639eb5a Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 21 Feb 2023 15:30:32 +0100 Subject: [PATCH 10/81] Update changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd89ee16..fea1f168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,12 @@ All notable changes to this project will be documented in this file. ## [Released] ## [1.4.0] -- Payment method Request to pay removed. +- BP-2257 Payment method Request to pay removed. - Fixed an issue with getting issuers for iDEAL. Reported by @reflie-nxte -- Add missing subscriptions parameters. +- BP-2285 BP-Add missing subscriptions parameters. - Add Bancontact alias and fixing typo in method name. - When response data is not set return null. -- Add missing parameters in iDEAL QR. +- BP-2345 Add missing parameters in iDEAL QR. ## [1.3.0] - Add parameter retrieval in replyhandler, check lower & upper string From 5103252a69d282b4ac6c138e1f404acd86782982 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 21 Feb 2023 15:32:37 +0100 Subject: [PATCH 11/81] Update changelog --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fea1f168..64ef01f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,12 @@ All notable changes to this project will be documented in this file. ## [Released] ## [1.4.0] -- BP-2257 Payment method Request to pay removed. - Fixed an issue with getting issuers for iDEAL. Reported by @reflie-nxte -- BP-2285 BP-Add missing subscriptions parameters. -- Add Bancontact alias and fixing typo in method name. -- When response data is not set return null. -- BP-2345 Add missing parameters in iDEAL QR. +- Add Bancontact alias and fixing typo in method name +- When response data is not set return null +- BP-2257 Payment method Request to pay removed +- BP-2285 BP-Add missing subscriptions parameters +- BP-2345 Add missing parameters in iDEAL QR ## [1.3.0] - Add parameter retrieval in replyhandler, check lower & upper string From 79e0e5543ea85e70c85736317a2437098b7197c3 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 23 Feb 2023 12:36:27 +0100 Subject: [PATCH 12/81] Return string instead of int in subcode code (#88) --- src/Transaction/Response/TransactionResponse.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Transaction/Response/TransactionResponse.php b/src/Transaction/Response/TransactionResponse.php index 3935c7d8..e4e3085d 100644 --- a/src/Transaction/Response/TransactionResponse.php +++ b/src/Transaction/Response/TransactionResponse.php @@ -286,9 +286,9 @@ public function getStatusCode(): ?int } /** - * @return int|null + * @return string|null */ - public function getSubStatusCode(): ?int + public function getSubStatusCode(): ?string { if (! empty($this->data['Status']['SubCode']['Code'])) { From ad8b3c59270490c3e7f9debe5c8d6dfb97433568 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 24 Feb 2023 16:44:23 +0100 Subject: [PATCH 13/81] [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test --- example/additional_services/subscriptions.php | 56 ++++++++++++------- example/responses/push.php | 2 +- src/Tests/Payments/IdealTest.php | 4 +- src/Tests/Payments/PaypalTest.php | 28 ++++++---- src/Tests/Payments/PushTest.php | 2 +- src/Tests/Payments/SubscriptionsTest.php | 2 +- 6 files changed, 59 insertions(+), 35 deletions(-) diff --git a/example/additional_services/subscriptions.php b/example/additional_services/subscriptions.php index 6539111e..d41677fe 100644 --- a/example/additional_services/subscriptions.php +++ b/example/additional_services/subscriptions.php @@ -9,28 +9,36 @@ //** START Create Duo Combined */ $subscriptions = $buckaroo->method('subscriptions')->manually()->createCombined([ + 'pushURL' => 'https://buckaroo.dev/push', 'includeTransaction' => false, 'transactionVatPercentage' => 5, - 'configurationCode' => 'xxxxx', + 'configurationCode' => 'gfyh9fe4', 'email' => 'test@buckaroo.nl', - 'rate_plans' => [ + 'ratePlans' => [ 'add' => [ - 'startDate' => date('Y-m-d'), - 'ratePlanCode' => 'xxxxxx', + 'startDate' => '2033-01-01', + 'ratePlanCode' => '9863hdcj', ], ], 'phone' => [ 'mobile' => '0612345678', ], 'debtor' => [ - 'code' => 'xxxxxx', + 'code' => 'johnsmith4', ], - 'person' => [ - 'firstName' => 'John', - 'lastName' => 'Do', - 'gender' => Gender::FEMALE, +// 'person' => [ +// 'firstName' => 'John', +// 'lastName' => 'Do', +// 'gender' => Gender::FEMALE, +// 'culture' => 'nl-NL', +// 'birthDate' => '1990-01-01' +// ], + 'company' => [ 'culture' => 'nl-NL', - 'birthDate' => date('Y-m-d'), + 'companyName' => 'My Company Coporation', + 'vatApplicable' => true, + 'vatNumber' => 'NL140619562B01', + 'chamberOfCommerce' => '20091741', ], 'address' => [ 'street' => 'Hoofdstraat', @@ -50,28 +58,36 @@ //** START Create Triple Combined */ $subscriptions = $buckaroo->method('subscriptions')->manually()->createCombined([ + 'pushURL' => 'https://buckaroo.dev/push', 'includeTransaction' => false, 'transactionVatPercentage' => 5, - 'configurationCode' => 'xxxxx', + 'configurationCode' => 'gfyh9fe4', 'email' => 'test@buckaroo.nl', - 'rate_plans' => [ + 'ratePlans' => [ 'add' => [ - 'startDate' => date('Y-m-d'), - 'ratePlanCode' => 'xxxxxx', + 'startDate' => '2033-01-01', + 'ratePlanCode' => '9863hdcj', ], ], 'phone' => [ 'mobile' => '0612345678', ], 'debtor' => [ - 'code' => 'xxxxxx', + 'code' => 'johnsmith4', ], - 'person' => [ - 'firstName' => 'John', - 'lastName' => 'Do', - 'gender' => Gender::FEMALE, +// 'person' => [ +// 'firstName' => 'John', +// 'lastName' => 'Do', +// 'gender' => Gender::FEMALE, +// 'culture' => 'nl-NL', +// 'birthDate' => '1990-01-01' +// ], + 'company' => [ 'culture' => 'nl-NL', - 'birthDate' => date('Y-m-d'), + 'companyName' => 'My Company Coporation', + 'vatApplicable' => true, + 'vatNumber' => 'NL140619562B01', + 'chamberOfCommerce' => '20091741', ], 'address' => [ 'street' => 'Hoofdstraat', diff --git a/example/responses/push.php b/example/responses/push.php index 84d9ec4b..05ec5e97 100644 --- a/example/responses/push.php +++ b/example/responses/push.php @@ -41,7 +41,7 @@ //START JSON PUSH $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638:1658227572'; $post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001","Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true,"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021","Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"},{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"},{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}],"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; -$uri = 'https://buckaroo.nextto.dev/push'; +$uri = 'https://buckaroo.dev/push'; $reply_handler = new ReplyHandler($buckaroo->client()->config(), $post_data, $auth_header, $uri); $reply_handler->validate(); diff --git a/src/Tests/Payments/IdealTest.php b/src/Tests/Payments/IdealTest.php index 43637a2d..0262ed38 100644 --- a/src/Tests/Payments/IdealTest.php +++ b/src/Tests/Payments/IdealTest.php @@ -42,8 +42,8 @@ protected function setUp(): void 'invoice' => uniqid(), 'amountDebit' => 10.10, 'issuer' => 'ABNANL2A', - 'pushURL' => 'https://buckaroo.nextto.dev/push', - 'returnURL' => 'https://buckaroo.nextto.dev/return', + 'pushURL' => 'https://buckaroo.dev/push', + 'returnURL' => 'https://buckaroo.dev/return', 'clientIP' => [ 'address' => '123.456.789.123', 'type' => 0, diff --git a/src/Tests/Payments/PaypalTest.php b/src/Tests/Payments/PaypalTest.php index bc3c522d..a16356cb 100644 --- a/src/Tests/Payments/PaypalTest.php +++ b/src/Tests/Payments/PaypalTest.php @@ -99,28 +99,36 @@ public function it_creates_a_paypal_refund() public function it_creates_a_combined_subscriptions_with_paypal_and_extra_info() { $subscriptions = $this->buckaroo->method('subscriptions')->manually()->createCombined([ + 'pushURL' => 'https://buckaroo.dev/push', 'includeTransaction' => false, 'transactionVatPercentage' => 5, - 'configurationCode' => 'xxxxx', + 'configurationCode' => 'gfyh9fe4', 'email' => 'test@buckaroo.nl', - 'rate_plans' => [ + 'ratePlans' => [ 'add' => [ - 'startDate' => '2022-01-01', - 'ratePlanCode' => 'xxxxxx', + 'startDate' => '2033-01-01', + 'ratePlanCode' => '9863hdcj', ], ], 'phone' => [ 'mobile' => '0612345678', ], 'debtor' => [ - 'code' => 'xxxxxx', + 'code' => 'johnsmith4', ], - 'person' => [ - 'firstName' => 'John', - 'lastName' => 'Do', - 'gender' => Gender::FEMALE, +// 'person' => [ +// 'firstName' => 'John', +// 'lastName' => 'Do', +// 'gender' => Gender::FEMALE, +// 'culture' => 'nl-NL', +// 'birthDate' => '1990-01-01' +// ], + 'company' => [ 'culture' => 'nl-NL', - 'birthDate' => '1990-01-01', + 'companyName' => 'My Company Coporation', + 'vatApplicable' => true, + 'vatNumber' => 'NL140619562B01', + 'chamberOfCommerce' => '20091741', ], 'address' => [ 'street' => 'Hoofdstraat', diff --git a/src/Tests/Payments/PushTest.php b/src/Tests/Payments/PushTest.php index 82fb5b52..b00461cc 100644 --- a/src/Tests/Payments/PushTest.php +++ b/src/Tests/Payments/PushTest.php @@ -42,7 +42,7 @@ public function it_test_the_push_response() $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638:1658227572'; $post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001","Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true,"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021","Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"},{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"},{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}],"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; - $uri = 'https://buckaroo.nextto.dev/push'; + $uri = 'https://buckaroo.dev/push'; $post_data = [ "brq_amount" => "10.10", diff --git a/src/Tests/Payments/SubscriptionsTest.php b/src/Tests/Payments/SubscriptionsTest.php index aae3e89f..7ac98d8b 100644 --- a/src/Tests/Payments/SubscriptionsTest.php +++ b/src/Tests/Payments/SubscriptionsTest.php @@ -62,7 +62,7 @@ public function it_creates_a_subscription() public function it_creates_a_combined_subscription() { $subscriptions = $this->buckaroo->method('subscriptions')->manually()->createCombined([ - 'pushURL' => 'https://buckaroo.nextto.dev/push', + 'pushURL' => 'https://buckaroo.dev/push', 'includeTransaction' => false, 'transactionVatPercentage' => 5, 'configurationCode' => 'gfyh9fe4', From 831c15803373f5f16e59beb5fd2cdaf95964d513 Mon Sep 17 00:00:00 2001 From: avido Date: Thu, 2 Mar 2023 09:20:09 +0100 Subject: [PATCH 14/81] GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> --- .github/workflows/codestyle.yml | 35 +++++++++++++++++++++++++++++++++ example/bootstrap.php | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/codestyle.yml diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml new file mode 100644 index 00000000..b7cf582c --- /dev/null +++ b/.github/workflows/codestyle.yml @@ -0,0 +1,35 @@ +name: CheckStyleAndLint + +on: + pull_request: + paths: + - "src/**.php" + - "example/**.php" + +jobs: + phpcs: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + php: [7.4, 8.1] + stability: [prefer-stable] + + name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: cs2pr, phplint, phpcs + + - name: Run phplint + run: phplint --no-configuration --no-cache --no-interaction ./src/* ./example/* + + - name: Run phpcs + run: phpcs -q --standard=PSR12 --report=checkstyle --extensions=php ./src/* ./example/* | cs2pr diff --git a/example/bootstrap.php b/example/bootstrap.php index b3bf3821..cb429d0c 100644 --- a/example/bootstrap.php +++ b/example/bootstrap.php @@ -4,5 +4,6 @@ require_once __DIR__ . "/../vendor/autoload.php"; +// Load env $dotenv = Dotenv::createImmutable(__DIR__ . "/../"); $dotenv->load(); From af834dc1ccc005330ea3182d4c41ad50f4327cf7 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Mon, 13 Mar 2023 17:08:00 +0100 Subject: [PATCH 15/81] Update ideal qr test (#94) --- src/Tests/Payments/IdealQRTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Tests/Payments/IdealQRTest.php b/src/Tests/Payments/IdealQRTest.php index 446ca6bd..b2e76fb7 100644 --- a/src/Tests/Payments/IdealQRTest.php +++ b/src/Tests/Payments/IdealQRTest.php @@ -31,7 +31,10 @@ public function it_creates_a_ideal_qr() { $response = $this->buckaroo->method('ideal_qr')->generate([ 'description' => 'Test purchase', - 'returnURL' => 'https://buckaroo.dev./return', + 'returnURL' => 'https://buckaroo.dev/return', + 'returnURLCancel' => 'https://buckaroo.dev/cancel', + 'returnURLError' => 'https://buckaroo.dev/error', + 'returnURLReject' => 'https://buckaroo.dev/reject', 'minAmount' => '0.10', 'maxAmount' => '10.0', 'imageSize' => '2000', From e6fa2206d7067f89afac26b6e52f40fd40803bbb Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 23 Mar 2023 09:05:42 +0100 Subject: [PATCH 16/81] BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments --- .env.example | 22 +++++++++---------- .github/workflows/codestyle.yml | 4 ++-- .php-cs-fixer.cache | 2 +- composer.json | 2 +- example/transactions/klarna.php | 1 + phpcs.xml | 20 +++++++++++++++++ phpunit.xml | 4 ++-- src/Config/Config.php | 3 +-- src/Handlers/Credentials.php | 7 ++---- src/Handlers/Logging/DefaultLogger.php | 3 +-- src/Handlers/Logging/Observers/Monolog.php | 3 +++ src/Handlers/Reply/HttpPost.php | 6 ++--- src/Handlers/Reply/ReplyHandler.php | 4 ++-- .../BuckarooVoucher/Models/Create.php | 2 ++ src/PaymentMethods/PaymentFacade.php | 5 +++++ src/PaymentMethods/PaymentMethod.php | 11 ++++++++-- .../Subscriptions/Models/Configuration.php | 2 +- .../Subscriptions/Models/RatePlanCharge.php | 2 +- .../Subscriptions/Models/Subscription.php | 2 +- src/PaymentMethods/iDeal/iDeal.php | 7 ++---- .../TransactionHeaders/CultureHeader.php | 7 ++++++ .../TransactionHeaders/HmacHeader.php | 2 ++ .../Request/HttpClient/HttpClientGuzzle.php | 10 ++++----- src/Transaction/Request/Request.php | 11 +++------- src/Transaction/Response/Response.php | 2 ++ .../Buckaroo}/BuckarooTestCase.php | 3 ++- .../Buckaroo}/ConfirmingCredentialsTest.php | 2 +- .../Payments/AfterpayDigiAcceptTest.php | 4 ++-- .../Buckaroo}/Payments/AfterpayTest.php | 4 ++-- .../Buckaroo}/Payments/AlipayTest.php | 4 ++-- .../Buckaroo}/Payments/ApplepayTest.php | 4 ++-- .../Buckaroo}/Payments/BancontactTest.php | 4 ++-- .../Buckaroo}/Payments/BelfiusTest.php | 4 ++-- .../Buckaroo}/Payments/BillinkTest.php | 4 ++-- .../Payments/BuckarooVoucherTest.php | 4 ++-- .../Buckaroo}/Payments/BuckarooWalletTest.php | 4 ++-- .../Buckaroo}/Payments/CreditClickTest.php | 4 ++-- .../Payments/CreditManagementTest.php | 4 ++-- .../Buckaroo}/Payments/CreditcardTest.php | 4 ++-- .../Buckaroo}/Payments/EPSTest.php | 4 ++-- .../Buckaroo}/Payments/EmandatesTest.php | 4 ++-- .../Buckaroo}/Payments/GiftcardsTest.php | 4 ++-- .../Buckaroo}/Payments/GiropayTest.php | 4 ++-- .../Buckaroo}/Payments/IdealQRTest.php | 4 ++-- .../Buckaroo}/Payments/IdealTest.php | 4 ++-- .../Buckaroo}/Payments/In3Test.php | 4 ++-- .../Buckaroo}/Payments/KBCTest.php | 4 ++-- .../Buckaroo}/Payments/KlarnaKPTest.php | 4 ++-- .../Buckaroo}/Payments/KlarnaTest.php | 4 ++-- .../Buckaroo}/Payments/MarketplacesTest.php | 4 ++-- .../Buckaroo}/Payments/PayPerEmailTest.php | 4 ++-- .../Buckaroo}/Payments/PayconiqTest.php | 4 ++-- .../Buckaroo}/Payments/PaypalTest.php | 5 ++--- .../Buckaroo}/Payments/PosTest.php | 4 ++-- .../Buckaroo}/Payments/Przelewy24Test.php | 4 ++-- .../Buckaroo}/Payments/PushTest.php | 5 ++--- .../Buckaroo}/Payments/SepaTest.php | 4 ++-- .../Buckaroo}/Payments/SofortTest.php | 4 ++-- .../Buckaroo}/Payments/SubscriptionsTest.php | 5 ++--- .../Buckaroo}/Payments/SurepayTest.php | 4 ++-- .../Buckaroo}/Payments/TinkaTest.php | 4 ++-- .../Buckaroo}/Payments/TransferTest.php | 4 ++-- .../Buckaroo}/Payments/TrustlyTest.php | 4 ++-- .../Buckaroo}/Payments/WeChatPayTest.php | 4 ++-- .../Buckaroo}/Payments/iDinTest.php | 4 ++-- 65 files changed, 168 insertions(+), 136 deletions(-) create mode 100644 phpcs.xml rename {src/Tests => tests/Buckaroo}/BuckarooTestCase.php (94%) rename {src/Tests => tests/Buckaroo}/ConfirmingCredentialsTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/AfterpayDigiAcceptTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/AfterpayTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/AlipayTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/ApplepayTest.php (96%) rename {src/Tests => tests/Buckaroo}/Payments/BancontactTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/BelfiusTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/BillinkTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/BuckarooVoucherTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/BuckarooWalletTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/CreditClickTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/CreditManagementTest.php (99%) rename {src/Tests => tests/Buckaroo}/Payments/CreditcardTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/EPSTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/EmandatesTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/GiftcardsTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/GiropayTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/IdealQRTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/IdealTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/In3Test.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/KBCTest.php (94%) rename {src/Tests => tests/Buckaroo}/Payments/KlarnaKPTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/KlarnaTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/MarketplacesTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/PayPerEmailTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/PayconiqTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/PaypalTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/PosTest.php (93%) rename {src/Tests => tests/Buckaroo}/Payments/Przelewy24Test.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/PushTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/SepaTest.php (97%) rename {src/Tests => tests/Buckaroo}/Payments/SofortTest.php (94%) rename {src/Tests => tests/Buckaroo}/Payments/SubscriptionsTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/SurepayTest.php (93%) rename {src/Tests => tests/Buckaroo}/Payments/TinkaTest.php (98%) rename {src/Tests => tests/Buckaroo}/Payments/TransferTest.php (96%) rename {src/Tests => tests/Buckaroo}/Payments/TrustlyTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/WeChatPayTest.php (95%) rename {src/Tests => tests/Buckaroo}/Payments/iDinTest.php (95%) diff --git a/.env.example b/.env.example index 8d1199d7..c05ac37a 100644 --- a/.env.example +++ b/.env.example @@ -1,12 +1,12 @@ -BPE_WEBSITE = "Example.com" -BPE_WEBSITE_KEY = "KEY" -BPE_SECRET_KEY = "SECRET" -BPE_MODE = "test" -BPE_DEBUG = true -BPE_REPORT_ERROR = true +BPE_WEBSITE="Example.com" +BPE_WEBSITE_KEY="KEY" +BPE_SECRET_KEY="SECRET" +BPE_MODE="test" +BPE_DEBUG=true +BPE_REPORT_ERROR=true -BPE_EXAMPLE_BASE_URL = "https://example.com/buckaroo/" -BPE_EXAMPLE_RETURN_URL = "${BPE_EXAMPLE_BASE_URL}return" -BPE_EXAMPLE_PUSH_URL = "${BPE_EXAMPLE_BASE_URL}push" -BPE_EXAMPLE_IP = "127.0.0.1" -BPE_EXAMPLE_CURRENCY_CODE = "EUR" +BPE_EXAMPLE_BASE_URL="https://example.com/buckaroo/" +BPE_EXAMPLE_RETURN_URL="${BPE_EXAMPLE_BASE_URL}return" +BPE_EXAMPLE_PUSH_URL="${BPE_EXAMPLE_BASE_URL}push" +BPE_EXAMPLE_IP="127.0.0.1" +BPE_EXAMPLE_CURRENCY_CODE="EUR" diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index b7cf582c..1348548f 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.4, 8.1] + php: [7.4, 8.1, 8.2] stability: [prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} @@ -32,4 +32,4 @@ jobs: run: phplint --no-configuration --no-cache --no-interaction ./src/* ./example/* - name: Run phpcs - run: phpcs -q --standard=PSR12 --report=checkstyle --extensions=php ./src/* ./example/* | cs2pr + run: phpcs -q --report=checkstyle --extensions=php ./src/* | cs2pr diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index 888444f4..5c8d2e10 100644 --- a/.php-cs-fixer.cache +++ b/.php-cs-fixer.cache @@ -1 +1 @@ -{"php":"8.1.14","version":"3.13.2:v3.13.2#3952f08a81bd3b1b15e11c3de0b6bf037faa8496","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":{"allow_single_line_closure":false,"position_after_functions_and_oop_constructs":"next","position_after_anonymous_constructs":"next","position_after_control_structures":"next"},"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"single_trait_insert_per_statement":true},"hashes":{"src\/BuckarooClient.php":"a04feed78f40b502363053f348a95d42","src\/Config\/Config.php":"3049e56bf3e3a3f2b947f4a18cded93a","src\/Config\/DefaultConfig.php":"ff088b4e5124f40155cc198401134378","src\/Exceptions\/BuckarooException.php":"d2544fdaa34bf1de4d51630f8d9cc5a9","src\/Exceptions\/TransferException.php":"d6d7bc200cb3e9697368e423c2dfacd5","src\/Handlers\/Credentials.php":"72547a0871ef078f61217d9c387e8bf6","src\/Handlers\/HMAC\/Generator.php":"285cbc96e2eb0a709b1d541602257cae","src\/Handlers\/HMAC\/Hmac.php":"18f9016e7c5aea3a0b692d20723940a7","src\/Handlers\/HMAC\/Validator.php":"75a5227ff35b94611b9799121e026abc","src\/Handlers\/Logging\/DefaultLogger.php":"91e9a8fa50a5770f092be6a546f4f179","src\/Handlers\/Logging\/Loggable.php":"f4b7e8704cbbe37d9c354801bebbfc59","src\/Handlers\/Logging\/Observer.php":"060d6e5806f7d7e16004d03cab986d37","src\/Handlers\/Logging\/Observers\/ErrorReporter.php":"7ec7da9e92f3b23b4c5d4efce8d86bd9","src\/Handlers\/Logging\/Observers\/Monolog.php":"b74e205fce2dd76bd9e70867ccb8f8ec","src\/Handlers\/Logging\/Subject.php":"3d67799142a50aab2eef4e24219cb74e","src\/Handlers\/Reply\/HttpPost.php":"4e0f9906ba5d6cdd307ebfadee255542","src\/Handlers\/Reply\/Json.php":"c9843468bfb3433c27fcd733d659e28a","src\/Handlers\/Reply\/ReplyHandler.php":"db1fe60f80a3c5d8c4e4250743e4eafa","src\/Handlers\/Reply\/ReplyStrategy.php":"5bab082004f01d9950a9bc1ff468cd69","src\/Models\/Adapters\/ServiceParametersKeysAdapter.php":"b9ba2ebeed2dcfc47dac37dca6f3546c","src\/Models\/AdditionalParameters.php":"4971bbecdfda4aafd081ff5dbc1e3dd0","src\/Models\/Address.php":"ceeab777c91d46aeae2d4e7ab5d7df99","src\/Models\/Article.php":"aa20190c5a3dd2ff6ae169268a2d34e0","src\/Models\/BankAccount.php":"e82a08360df8697c9e059178a7c8fbd8","src\/Models\/ClientIP.php":"e19df1c3fe6357c96c26e2f8ff1e5e29","src\/Models\/Company.php":"d47ad3497173c8fc6fb6fc3daa73aec9","src\/Models\/Debtor.php":"3e6ab2b25de1e477d44bfb1165913366","src\/Models\/Email.php":"982763a72eb2935b8a9b3e9982ed72ca","src\/Models\/Interfaces\/Recipient.php":"85589ae85ccc2fdeecc18b3b2a0fdcbb","src\/Models\/Model.php":"2c7d00151866c93051e081a74097bd88","src\/Models\/Payload\/PayPayload.php":"cca5ff8b604ae2aa749b6b3dfabbaf82","src\/Models\/Payload\/Payload.php":"7a0b6e8625d6fdc41c98aefbe37ae306","src\/Models\/Payload\/RefundPayload.php":"50ca2b6fadd6d1dfc1af85e4e475a551","src\/Models\/Person.php":"da9fce2330f7dbe81553cdf6a6ff5474","src\/Models\/Phone.php":"1a9f7c4872419d316fdebb2703f658a8","src\/Models\/ServiceList.php":"e51064ef8722035a1af8577f1cdb29dc","src\/Models\/ServiceParameter.php":"dafc671a780a47388f2cf6067b9c08ce","src\/Models\/Services.php":"953ba8de24fdf96f25f87a19439528d4","src\/PaymentMethods\/Afterpay\/Afterpay.php":"5220a26153046c35a71c5f9544a8c07c","src\/PaymentMethods\/Afterpay\/Models\/Article.php":"1101df36002c534b8194c8f38b5f359c","src\/PaymentMethods\/Afterpay\/Models\/Pay.php":"e8d7f0818eb7078a61ca31056c8c1394","src\/PaymentMethods\/Afterpay\/Models\/Person.php":"400ed6119966980ff0c48ca7e75702c6","src\/PaymentMethods\/Afterpay\/Models\/Recipient.php":"1da6ea525690661c2237ab21382ed19e","src\/PaymentMethods\/Afterpay\/Models\/Refund.php":"bc0c928de027bd2c3eca4ad997d2ed10","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/AddressAdapter.php":"692191fd233a1ea93b3dea94a8b4a9d1","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/ArticleAdapter.php":"c9cf7fac3e8bd7554fb773180301ddfe","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/PhoneAdapter.php":"5a13e983066abe460ae4831cabe1c428","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/RecipientAdapter.php":"9ce22d14bc2d17220e3f5765720f713a","src\/PaymentMethods\/AfterpayDigiAccept\/AfterpayDigiAccept.php":"a17f362fc17716edaf11c5e6c2f1dc8f","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Pay.php":"59cb734c920506b03f62bd89b9590554","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Recipient.php":"049301de1c6a4ca82cba08830ff04eb0","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Refund.php":"0453cf9fdd07cd1ff5cb68feac2cc2c1","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/AddressAdapter.php":"81ac818062aaf5e4aca0deaef2d0f17c","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/ArticleAdapter.php":"54cb4aa29bbfa9d13250d7c90069eab0","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/EmailAdapter.php":"607a333d0355446d5b2bb5d78d2648af","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/PhoneAdapter.php":"e025168a23f2bc4033e4f08669604ee7","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/RecipientAdapter.php":"9f932e8753a8dd4bb8e2a4c5a5b4be9b","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/ServiceAdapter.php":"bc34e01a54c01929cda40c8bac36de03","src\/PaymentMethods\/Alipay\/Alipay.php":"dd908e596902c85130e0e4920da04272","src\/PaymentMethods\/Alipay\/Models\/Pay.php":"fb9572ebd5464e8a006c0681a452e951","src\/PaymentMethods\/ApplePay\/ApplePay.php":"877e953b5326ffa57f75dbe34496c185","src\/PaymentMethods\/ApplePay\/Models\/Pay.php":"3b614359549f91062e646ab56f436490","src\/PaymentMethods\/ApplePay\/Models\/PayPayload.php":"c676ee7ee1bcc1907a04a27f9e2ac160","src\/PaymentMethods\/Bancontact\/Bancontact.php":"0fdc7bf41bf2669e20e919deebcc3ff9","src\/PaymentMethods\/Bancontact\/Models\/Authenticate.php":"62906afe0a165a35651eb394b951193d","src\/PaymentMethods\/Bancontact\/Models\/Pay.php":"8fc9760c4052b60eb79d5ffa3b0ae69b","src\/PaymentMethods\/Bancontact\/Models\/PayEncrypted.php":"f0f4283c57c8ab2bb06e5f5950f8e643","src\/PaymentMethods\/BankTransfer\/BankTransfer.php":"15b6812b9c8cc34f2d81aaa685c99f5d","src\/PaymentMethods\/BankTransfer\/Models\/Pay.php":"991cff07b81d31ad98343c9ccf674510","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/CustomerAdapter.php":"6c859ee4db8fc7fa505e5e7987da5977","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/EmailAdapter.php":"cdbdc24a8503270b046be3553bfe4583","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/PayAdapter.php":"ae9149be34d4d0912b490722b6756e86","src\/PaymentMethods\/Belfius\/Belfius.php":"6d0514225d9c9f5281900d7bc53e704c","src\/PaymentMethods\/Billink\/Billink.php":"adb3e9af9aea69f6ed8c2d0f8ecc280b","src\/PaymentMethods\/Billink\/Models\/Article.php":"ed916bb29315a44950f44604b5a6b399","src\/PaymentMethods\/Billink\/Models\/Capture.php":"d78606a9918a5925ed15a11cc29df1f6","src\/PaymentMethods\/Billink\/Models\/Pay.php":"74e1561269fdf63a24a696cb0de0c5fb","src\/PaymentMethods\/Billink\/Models\/Recipient.php":"39b57b32e18e6069844aad09f92b0f43","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/AddressAdapter.php":"8de6d09943d0621affdda7e724708274","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/ArticleAdapter.php":"4f5d6145f7becd1ed27ca33f22077397","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/PhoneAdapter.php":"0edca59d6e4c151f1c85fe465c6ef3bd","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/RecipientAdapter.php":"105fa7a29317a0b80f1a8b9b119c5fc1","src\/PaymentMethods\/BuckarooVoucher\/BuckarooVoucher.php":"b181c9e03dd924b899cac175e8c15259","src\/PaymentMethods\/BuckarooVoucher\/Models\/Create.php":"767d5866d5be79b887c0fcb2dc37f7c3","src\/PaymentMethods\/BuckarooVoucher\/Models\/CreatePayload.php":"42913f90c793c2ed1b27fc855fae68c8","src\/PaymentMethods\/BuckarooVoucher\/Models\/Deactivate.php":"96bed609390d0ecb3dd8a94dd9ba240b","src\/PaymentMethods\/BuckarooVoucher\/Models\/GetBalance.php":"65b690ff91464e3898d3d960467c6690","src\/PaymentMethods\/BuckarooVoucher\/Models\/Pay.php":"e39a2921209a5c4ec9f5649dd3c4ac50","src\/PaymentMethods\/BuckarooWallet\/BuckarooWallet.php":"ef5b362c63a5fde93fa3281690c79c41","src\/PaymentMethods\/BuckarooWallet\/Models\/DepositReservePayload.php":"c57b8f8352bc2b4eac33fa49d8416958","src\/PaymentMethods\/BuckarooWallet\/Models\/ReleasePayload.php":"e31a198d3046222442855a7ec111d9ef","src\/PaymentMethods\/BuckarooWallet\/Models\/Wallet.php":"fd1d7d36ea9c27bc6da65aadb2d48a38","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/BankAccountAdapter.php":"3a433e884d2b0d755f469a20861a6430","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/CustomerAdapter.php":"303e6c1671897d735dd113cc4166af1d","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/EmailAdapter.php":"703b17e3e3fcb9175aab78ce7d317ef7","src\/PaymentMethods\/CreditCard\/CreditCard.php":"025762107dba72d62e3c8f6a1de74bbd","src\/PaymentMethods\/CreditCard\/Models\/CardData.php":"df7536390b7b2b7a63903a0ff3d24069","src\/PaymentMethods\/CreditCard\/Models\/SecurityCode.php":"d9a6a20c5ca807629e3b4a1877446132","src\/PaymentMethods\/CreditClick\/CreditClick.php":"9e5484352aa2b73cbf5ece5e238d826f","src\/PaymentMethods\/CreditClick\/Models\/Pay.php":"8e8763e5fdf905c1c58e689fc96a77d0","src\/PaymentMethods\/CreditClick\/Models\/Refund.php":"82ec73b5892602d35c0321150ec499b7","src\/PaymentMethods\/CreditClick\/Service\/ParameterKeys\/CustomerAdapter.php":"7f94f0737428a95fde806eec14d2be5d","src\/PaymentMethods\/CreditManagement\/CreditManagement.php":"2bb0a0507d143bc8d42ea4c6cb523f92","src\/PaymentMethods\/CreditManagement\/Models\/AddOrUpdateProductLines.php":"5275167ba0256eb6e0aeffe0f6ade3a5","src\/PaymentMethods\/CreditManagement\/Models\/Article.php":"61b8495754e71a08c69f4aa5267c5e0b","src\/PaymentMethods\/CreditManagement\/Models\/CreditNote.php":"386def7c4e3295db852923423ac99b9b","src\/PaymentMethods\/CreditManagement\/Models\/Debtor.php":"611fdd1a517f779701709420e7b0866e","src\/PaymentMethods\/CreditManagement\/Models\/DebtorFile.php":"59f4fe33c0156a68fb9153b492a3c824","src\/PaymentMethods\/CreditManagement\/Models\/DebtorInfo.php":"f78fdb63e146972a09975a234b7e1d44","src\/PaymentMethods\/CreditManagement\/Models\/Invoice.php":"6a0c3c9d3f6149bcdd5b7f5cd20f6170","src\/PaymentMethods\/CreditManagement\/Models\/MultipleInvoiceInfo.php":"e8b87aa2fcbd7357f0cea6ef05f4f0f0","src\/PaymentMethods\/CreditManagement\/Models\/PaymentPlan.php":"1e1c12e66f2091ba9a65090364ad62dd","src\/PaymentMethods\/CreditManagement\/Service\/ParameterKeys\/ArticleAdapter.php":"d644cfeb053b9ed4c585badae22c39cd","src\/PaymentMethods\/CreditManagement\/Service\/ParameterKeys\/DebtorInfoAdapter.php":"111483943c0c031041d2cf9c5bdd6896","src\/PaymentMethods\/EPS\/EPS.php":"4a19a3827ec83faed3a7abae33fb60c2","src\/PaymentMethods\/Emandates\/Emandates.php":"e1f0adf6f026b2004ca4db417295a483","src\/PaymentMethods\/Emandates\/Models\/Mandate.php":"825f7606cdce24b7cd87c85c56ef51be","src\/PaymentMethods\/GiftCard\/GiftCard.php":"605c12b4ba7a57b69538a94bcfd1bc48","src\/PaymentMethods\/GiftCard\/Models\/Pay.php":"5672b5bb84a6ec7989fb82b3c70f566f","src\/PaymentMethods\/GiftCard\/Models\/PayPayload.php":"6beb12d039bb1a75e9545860c3cbf9bc","src\/PaymentMethods\/Giropay\/Giropay.php":"afe9d431a68e56af845b5945c6ee6d72","src\/PaymentMethods\/Giropay\/Models\/Pay.php":"bd0fb92797290265baafbef8c143d77b","src\/PaymentMethods\/In3\/In3.php":"2ce32872023af75f0a60be62474f46a9","src\/PaymentMethods\/In3\/Models\/Pay.php":"bc41a5976dc954f06bab49e3451b4931","src\/PaymentMethods\/In3\/Models\/PayPayload.php":"5e1559127bd6bcc39af9cba5016f71fe","src\/PaymentMethods\/In3\/Models\/Subtotal.php":"1a9ac4476a45521af82482e1be6ba854","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/AddressAdapter.php":"53b92ce98c02ae7d93e6b14227563b47","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/ArticleAdapter.php":"58b9d16f6ea930ac4efc763a326e28ca","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/CompanyAdapter.php":"f5ea7377501c6af673f61849e5566f58","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/PhoneAdapter.php":"2d6f0fa594ab03430d55ec26dcd8ba39","src\/PaymentMethods\/Interfaces\/Combinable.php":"b3a8a715e15d40f1fec8e8aa69e23db4","src\/PaymentMethods\/KBC\/KBC.php":"1dd2a8585a64b8078339a1172f09bf10","src\/PaymentMethods\/KlarnaKP\/KlarnaKP.php":"2c5696440cc568dc337c0d7cb4ebfc48","src\/PaymentMethods\/KlarnaKP\/Models\/Payload.php":"b33d782fc49f5ec4e61aa240da52d2de","src\/PaymentMethods\/KlarnaKP\/Models\/Recipient.php":"1ea7c1ca72ea5b10c109db5752ed158f","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/AddressAdapter.php":"b683bbacf1c10c1e7b0dc3625b83730a","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/ArticleAdapter.php":"7d987920678ff84247fa9941d2a219d0","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/EmailAdapter.php":"6c7a63c151b2d52475ba843259e369da","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/PhoneAdapter.php":"3f18c0a203e29cdb2c7fbed3e5e78e71","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/RecipientAdapter.php":"a79df1fdeb4bcc7f4147218891a266df","src\/PaymentMethods\/KlarnaPay\/KlarnaPay.php":"74ffbf3cc7239a4dbb3ab30698e19792","src\/PaymentMethods\/KlarnaPay\/Models\/Pay.php":"158f36bcb659ea6d2fe6226c7dd6900c","src\/PaymentMethods\/KlarnaPay\/Models\/PayPayload.php":"74f8711b521078bc34dfb2abeef6bcb6","src\/PaymentMethods\/KlarnaPay\/Models\/Recipient.php":"d5cf4d926b5d08c514150fc4e98f6343","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/AddressAdapter.php":"ae4d5a23dc640095d90cbb919ecdeab2","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/ArticleAdapter.php":"99629484c73633b2fcef73e74a2016ca","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/PhoneAdapter.php":"dbede561858850c098431e29785363a4","src\/PaymentMethods\/Marketplaces\/Marketplaces.php":"a58ad6edd52a8da52e37c55f88bf6a42","src\/PaymentMethods\/Marketplaces\/Models\/Marketplace.php":"c56e09f922cdc3c84912ba11414f37cc","src\/PaymentMethods\/Marketplaces\/Models\/Seller.php":"36a79655bb1190ecb8781b3b7fcd7ddf","src\/PaymentMethods\/Marketplaces\/Models\/ServiceList.php":"a25677f4cb9f55a72f90c78d9e05fad9","src\/PaymentMethods\/PayPerEmail\/Models\/Attachment.php":"ccff70fe9482b7ac0c4ee99c0f1e3923","src\/PaymentMethods\/PayPerEmail\/Models\/PaymentInvitation.php":"db244fffd49b47138ad8d32d14af187d","src\/PaymentMethods\/PayPerEmail\/PayPerEmail.php":"c07cb576cd8f37362b11dac19a7898e6","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/AttachmentAdapter.php":"cc857add67db197985a4879125190f84","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/CustomerAdapter.php":"cff29d3c99971efd11d19fc7392d23e2","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/EmailAdapter.php":"b16e545c775b75e3ed3747ef2151154b","src\/PaymentMethods\/PayablePaymentMethod.php":"eeb8a8a289ad40f6c7bffea0efe56311","src\/PaymentMethods\/Payconiq\/Payconiq.php":"057415ee3ede1bbbc1d9cb67a5e51bc2","src\/PaymentMethods\/PaymentFacade.php":"ba72ae85a84fe7f8c296b89f9fd9250e","src\/PaymentMethods\/PaymentInterface.php":"accc043249c9d1184d4fb100f14fb303","src\/PaymentMethods\/PaymentMethod.php":"0f51af639e899532e7e5df812644ec86","src\/PaymentMethods\/PaymentMethodFactory.php":"4d8d697c43d0931150afa37c8902a8a9","src\/PaymentMethods\/Paypal\/Models\/Address.php":"74d8d0bc2ac7235e4a1a657cc70827c9","src\/PaymentMethods\/Paypal\/Models\/ExtraInfo.php":"b1e13c02b0c39531358693233b028bf7","src\/PaymentMethods\/Paypal\/Models\/Pay.php":"67225ec2037509db760c99ad4038d459","src\/PaymentMethods\/Paypal\/Paypal.php":"ab57cc1612f2438ea246cd745bbd6b3c","src\/PaymentMethods\/Paypal\/Service\/ParameterKeys\/AddressAdapter.php":"d370a51df269afcfad9dc75e8e148dd4","src\/PaymentMethods\/Paypal\/Service\/ParameterKeys\/PhoneAdapter.php":"046f3a220b5602d42482a3a3ec389f9a","src\/PaymentMethods\/PointOfSale\/Models\/Pay.php":"e1842ac15bedd7a83aeaa296049252eb","src\/PaymentMethods\/PointOfSale\/PointOfSale.php":"25637901753d2c07d00ab6bf0beb381c","src\/PaymentMethods\/Przelewy24\/Models\/Pay.php":"814d22c0721a1c222f44dbd9a97383f7","src\/PaymentMethods\/Przelewy24\/Przelewy24.php":"1c983da62802be6050cfc74d8057f67f","src\/PaymentMethods\/Przelewy24\/Service\/ParameterKeys\/CustomerAdapter.php":"bc65a7576fe49c7c36d10f96f578fcc4","src\/PaymentMethods\/Przelewy24\/Service\/ParameterKeys\/EmailAdapter.php":"6af44a175667a1691e5161f8e7758d4e","src\/PaymentMethods\/RequestToPay\/Models\/Pay.php":"2fad82aa8337684d09515abef60a8b4d","src\/PaymentMethods\/RequestToPay\/RequestToPay.php":"7178be8eba90bce0db5d7a52a886ba88","src\/PaymentMethods\/RequestToPay\/Service\/ParameterKeys\/CustomerAdapter.php":"8462aea2ecf95c390320fb679baa982c","src\/PaymentMethods\/SEPA\/Models\/ExtraInfo.php":"22e1282bfe0d8d4a619e2e3488781709","src\/PaymentMethods\/SEPA\/Models\/Pay.php":"830cef74f9747712da251f22dac45a8f","src\/PaymentMethods\/SEPA\/SEPA.php":"4b1ca116d0a6fdb1af60ce65d6d58ae5","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/AddressAdapter.php":"889d7bf15ae56a1e915e8174c98a7bad","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/CustomerAdapter.php":"2af215870b7bb4d3c8fcf7c2e2de2ade","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/PayAdapter.php":"d3b6a8f9c8bd89562484aa0d4d2fae45","src\/PaymentMethods\/Sofort\/Sofort.php":"c9569a2fd82566d49e0ab32049e31790","src\/PaymentMethods\/Subscriptions\/Models\/Charge.php":"5504ef5f4d0bc17d96265d16c5e12bd7","src\/PaymentMethods\/Subscriptions\/Models\/CombinedPayload.php":"596b2cff5735b04501f222405d5972f3","src\/PaymentMethods\/Subscriptions\/Models\/RatePlan.php":"9388bde594fb072e9464f00dd199e446","src\/PaymentMethods\/Subscriptions\/Models\/ResumeSubscription.php":"17986644eddcb97b87df97a9b3aee5cf","src\/PaymentMethods\/Subscriptions\/Models\/Subscription.php":"e6b7efee299adfe4e42af3ec3a3b0ca4","src\/PaymentMethods\/Subscriptions\/Service\/ParameterKeys\/CompanyAdapter.php":"a7b7d8f8accfcf9d36a1529b6e000939","src\/PaymentMethods\/Subscriptions\/Subscriptions.php":"eb54f618f94dfacfc4c99af8c789e629","src\/PaymentMethods\/Surepay\/Models\/Verify.php":"027841518d304cdf248d8cf1939ee0c8","src\/PaymentMethods\/Surepay\/Service\/ParameterKeys\/BankAccountAdapter.php":"9c1fa1ab42ab667878db82e1d6fbf8e0","src\/PaymentMethods\/Surepay\/Surepay.php":"bf44ddde109ed1fc424b6c585ab9bc51","src\/PaymentMethods\/Tinka\/Models\/Article.php":"2e2b75383981bd6bbff67cfe7a4ad566","src\/PaymentMethods\/Tinka\/Models\/Pay.php":"049ead8ce258a9e0ac6db008285ee31b","src\/PaymentMethods\/Tinka\/Models\/Recipient.php":"a1eb20125c466d0b48028c6c4f00f46c","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/AddressAdapter.php":"82e58c240201ff1468b8b9be353f33e9","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/ArticleAdapter.php":"05c428e81a33f41916f688964eb906da","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/CustomerAdapter.php":"be0e6db5b2a617fc6bc9e22af096ff9a","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/PhoneAdapter.php":"43c682cf85f9fbdeb64b9637df3a0240","src\/PaymentMethods\/Tinka\/Tinka.php":"90bf921d625064956a42dae45a155e1d","src\/PaymentMethods\/Traits\/CountableGroupKey.php":"bbaf4ac62c697e4ea8ecdc0ad979b08f","src\/PaymentMethods\/Trustly\/Models\/Pay.php":"4d7d1f5790586bb743c7205f34064b83","src\/PaymentMethods\/Trustly\/Service\/ParameterKeys\/CustomerAdapter.php":"e18c0a88bc3ba7f213623c11b2ddb78f","src\/PaymentMethods\/Trustly\/Service\/ParameterKeys\/PayAdapter.php":"ac193e9ad3cb7c91f33c93dba4876771","src\/PaymentMethods\/Trustly\/Trustly.php":"2e8290e1eaae8a1cd8e57b5e4f949f70","src\/PaymentMethods\/WeChatPay\/Models\/Pay.php":"b6752b57a0f3d33711c2d47ec6bcb4d8","src\/PaymentMethods\/WeChatPay\/WeChatPay.php":"7ff27945ea981100f38b22c0c529dfd7","src\/PaymentMethods\/iDeal\/Models\/Pay.php":"8953ccceaed38d93289ac3e4a0ed01b5","src\/PaymentMethods\/iDeal\/iDeal.php":"c702d7245950e5a9207f0ccccfc84cc9","src\/PaymentMethods\/iDealQR\/Models\/Generate.php":"f62e5ea61ee49356adaecbee64b4614e","src\/PaymentMethods\/iDealQR\/iDealQR.php":"b5ab8add224e4ce6119ab15e5674f8a6","src\/PaymentMethods\/iDin\/Models\/Issuer.php":"902e454bbfebb4bd52e6ef8b8ba98414","src\/PaymentMethods\/iDin\/Service\/ParameterKeys\/IssuerAdapter.php":"c94438083ea61affd5d9e93e408bb81e","src\/PaymentMethods\/iDin\/iDin.php":"90ce856c9fee3f40cb14d7c3a7af3ef5","src\/Resources\/Arrayable.php":"309daa9c8e87e451a36c15936d5096ea","src\/Resources\/Constants\/CreditManagementInstallmentInterval.php":"56be568c35303858ae97945530c21396","src\/Resources\/Constants\/Endpoints.php":"1ae5ae439f1e44add96c81154b667c00","src\/Resources\/Constants\/Gender.php":"97e49539071851397500521f9c89a12d","src\/Resources\/Constants\/IPProtocolVersion.php":"0db5ea9636219a2c7413db7123cf9bf6","src\/Resources\/Constants\/RecipientCategory.php":"5c1e88ed6130c05a6e70a7d63a93d35b","src\/Resources\/Constants\/ResponseStatus.php":"415427f1ee6d9d6f0ae0b493f35f7ced","src\/Services\/PayloadService.php":"b9389c2f502dba9d991deb80b0d35423","src\/Services\/ServiceListParameters\/DefaultParameters.php":"70310adb54e262d917a6f7cf56f33845","src\/Services\/ServiceListParameters\/ModelParameters.php":"95b6660ae0e9ea3b1c2a9b49c6464325","src\/Services\/ServiceListParameters\/ServiceListParameter.php":"6a3ee9bf76707933ca0e5f62b939b1ef","src\/Services\/TransactionHeaders\/CultureHeader.php":"4ab1521e0ba6d540413a28f40df56efc","src\/Services\/TransactionHeaders\/DefaultHeader.php":"49e846e47a97aec9e88e07876c91292b","src\/Services\/TransactionHeaders\/HmacHeader.php":"989d350872e2c2be58e58d194afeff00","src\/Services\/TransactionHeaders\/SoftwareHeader.php":"401661ee7e91717cc8e85dd287350697","src\/Services\/TransactionHeaders\/TransactionHeader.php":"3561b8da46cc8c2e30e388f4c14f43a2","src\/Services\/TransactionService.php":"645011cb9016de8ba4fe0e327c4c0e2f","src\/Tests\/BuckarooTestCase.php":"59fa0474f05eeb7fb58804f9c7a5abbf","src\/Tests\/ConfirmingCredentialsTest.php":"dafe9ac0d2130dd00a70a608bea45d79","src\/Tests\/Payments\/AfterpayDigiAcceptTest.php":"fa8f831a79138d351fc32f8689e894ad","src\/Tests\/Payments\/AfterpayTest.php":"7f9118c1255135c177c53622bde616d0","src\/Tests\/Payments\/AlipayTest.php":"34a11d65eaed60e78ba07c7ff212a8d6","src\/Tests\/Payments\/ApplepayTest.php":"03c6df81d4e5c1cfd9bd8de7dde6c1cc","src\/Tests\/Payments\/BancontactTest.php":"447848fa9bda9e46da7b6982d0f7beeb","src\/Tests\/Payments\/BelfiusTest.php":"d2d89a38269c89f958028c369c242fec","src\/Tests\/Payments\/BillinkTest.php":"e280f20bc1243a1e02bb411cde4c6a65","src\/Tests\/Payments\/BuckarooVoucherTest.php":"d89df1433fb4cfb96bf78d8f18ec4c5f","src\/Tests\/Payments\/BuckarooWalletTest.php":"afc1d0548f753945247999ba807afc48","src\/Tests\/Payments\/CreditClickTest.php":"1a2ebccf1d39c85f10dc94b4f65bc532","src\/Tests\/Payments\/CreditManagementTest.php":"d4962a2314b90551cd3d5d5045747204","src\/Tests\/Payments\/CreditcardTest.php":"97973a52c7c293bb465f18dbf7f6e738","src\/Tests\/Payments\/EPSTest.php":"723848a3ceac50ecc55bea1628af5524","src\/Tests\/Payments\/EmandatesTest.php":"ace1767a1082bd018c5bd92133668921","src\/Tests\/Payments\/GiftcardsTest.php":"3c95aac83049355c7406fafc238612a9","src\/Tests\/Payments\/GiropayTest.php":"d34db9464001d482efced6fce154fa81","src\/Tests\/Payments\/IdealQRTest.php":"762cffefc22390fa4cc9cfb8b2c69ac8","src\/Tests\/Payments\/IdealTest.php":"4358913a9c1cbb542a718ae63e191eae","src\/Tests\/Payments\/In3Test.php":"2f4cfd0f4fd6867dc9baa84a8af3e818","src\/Tests\/Payments\/KBCTest.php":"0613bc4562721c6f708ecdb5bc5e2e09","src\/Tests\/Payments\/KlarnaKPTest.php":"a37a85f8e1e890da350538e3700f3d4d","src\/Tests\/Payments\/KlarnaTest.php":"5bd8aa0aaed355119ee62f60e72d4750","src\/Tests\/Payments\/MarketplacesTest.php":"739a6b5b6800d013ac303a09bf2d3e7a","src\/Tests\/Payments\/PayPerEmailTest.php":"b3ba3a1b035a6d20c878ca7789b8bf4c","src\/Tests\/Payments\/PayconiqTest.php":"7fe90286f337d89d5957645e4c9cdc78","src\/Tests\/Payments\/PaypalTest.php":"cad91a5da101aa184aa553e218269c12","src\/Tests\/Payments\/PosTest.php":"e62ed85f8f5d4bfc656af138e5929ffc","src\/Tests\/Payments\/Przelewy24Test.php":"8a97e176c3647bc0987fbe45d2ef954c","src\/Tests\/Payments\/PushTest.php":"f5ba3c83801cafa0dc87d8627b9908cc","src\/Tests\/Payments\/RequestToPayTest.php":"cfe293133184adcfeda67bdea48e1d5a","src\/Tests\/Payments\/SepaTest.php":"dfb262ed8dfd9a7015d34ac7946f84f5","src\/Tests\/Payments\/SofortTest.php":"8286e4a926c887f550d4a876de6d192a","src\/Tests\/Payments\/SubscriptionsTest.php":"ea6b39b1218bc5691c554c8ebf0e1501","src\/Tests\/Payments\/SurepayTest.php":"22cd38b25e69cad31722e3ece6469976","src\/Tests\/Payments\/TinkaTest.php":"b07f3ffc272c4a14c393d232c2c33922","src\/Tests\/Payments\/TransferTest.php":"282bbf6c8069947eab3d26295e375c98","src\/Tests\/Payments\/TrustlyTest.php":"d182a0b78d88ae9eab551c751d4292b0","src\/Tests\/Payments\/WeChatPayTest.php":"8914f8ad3347995891c3993da76662cc","src\/Tests\/Payments\/iDinTest.php":"08f737792c22a2730c97edcce3976f88","src\/Transaction\/Client.php":"03b658c31b936d5925a53da3754f3917","src\/Transaction\/Request\/HttpClient\/HttpClientAbstract.php":"fca81cd7e91893e62dc1e20e5550c4c6","src\/Transaction\/Request\/HttpClient\/HttpClientGuzzle.php":"028365cd09b32f68f3c72912c0406a71","src\/Transaction\/Request\/HttpClient\/HttpClientInterface.php":"848ed947a3d1fa37d02cd99052c278bc","src\/Transaction\/Request\/Request.php":"702c743d61aa070aa8c8407b70421a1d","src\/Transaction\/Request\/TransactionRequest.php":"5f53d3e7cd9db218ad1727721519496e","src\/Transaction\/Response\/Response.php":"07b5db6302a16ee85c1689b7e32a1392","src\/Transaction\/Response\/TransactionResponse.php":"af0fe1f4f94d166bee59387adee881f8","example\/additional_services\/credit_management.php":"32ebd2c0cd3cd10b074c35edd114e674","example\/additional_services\/idin.php":"7dd17bb4d43dd2ae991ebe4686a7c6d2","example\/additional_services\/marketplaces.php":"307e99ab0f2342eeb80c756b4d2e81ed","example\/additional_services\/pay_per_email.php":"d3e2fc698cd56d5c1379f29c587da5df","example\/additional_services\/subscriptions.php":"ae86639ebd10a3aa26d1f3c516d4bdb2","example\/additional_services\/surepay.php":"cf0dd7b1f1aa99c94a5bb68bfccc5445","example\/additional_services\/voucher.php":"bdb49b1d45e44bf5fdd705032e9f4d57","example\/additional_services\/wallets.php":"962b46e5e78ca375562dd7f864550e83","example\/bootstrap.php":"2db7c0b07d6e3a932bc988e1131a6665","example\/responses\/push.php":"f87925d03c57e376f6ad85d8fb12fab0","example\/responses\/return.php":"88d46cf36ec3550a3c0daca8aad94849","example\/transactions\/afterpay.php":"f8dc471f412bb3fefbf6c5a5f50c55aa","example\/transactions\/afterpaydigiaccept.php":"81b4d5de6624b4dc52dd37d6eb44fed8","example\/transactions\/alipay.php":"3b87fc27ec2ac13b13553454ae632fcd","example\/transactions\/applepay.php":"0d507f91f2224307c33fe85c52f8e732","example\/transactions\/applepay_redirect.php":"00ba0cabc3a7bb547f8821fadf94c74b","example\/transactions\/bancontact.php":"d1ee54f16d05c1a9126cbf228951d44f","example\/transactions\/belfius.php":"16a0efb01febb9cbcd70f7badcf5c64d","example\/transactions\/billink.php":"9305b0ee2b569d5ea1b5ac3f702bfc4e","example\/transactions\/credit_click.php":"27463cb1ab953baa0b7a82d32b500996","example\/transactions\/creditcard.php":"98a19b4d843617f53bd93f447fe3df0a","example\/transactions\/eps.php":"46fa813019489d29dd68e02b9bfa2a92","example\/transactions\/giftcards.php":"89a4fd8eb260009808402066944f7b95","example\/transactions\/giftcards_redirect.php":"1e7c17cd1c83a39e4b230758fdc77e0c","example\/transactions\/giropay.php":"2c82c4a5aa0fee3dc8c0ad40d3c5d791","example\/transactions\/ideal.php":"b346b5816272e6b626850efffb1d5f28","example\/transactions\/ideal_qr.php":"9bea404b446fb5ef442f09af33401b57","example\/transactions\/in3.php":"f078817d49c83c22232bc615fc721521","example\/transactions\/kbc.php":"5c55f714be73d80e632912f3acb56def","example\/transactions\/klarna.php":"6e8d1b91bdc5992e5e514d3e652d25c9","example\/transactions\/klarnakp.php":"716cfcbdbb24e47f772330a85c4f69c4","example\/transactions\/payconiq.php":"cd952b2d7a6ce6df0e25f6c5f03230e1","example\/transactions\/paypal.php":"d819893fca49ff7ccbf140133d2ea7ac","example\/transactions\/pos.php":"cd2118e471e77210a4b687a98d067989","example\/transactions\/przelewy24.php":"d92bb6501d79d637ca91b811bb6e82e7","example\/transactions\/requesttopay.php":"d9bee74990c3f208ab3e8d4b459d497e","example\/transactions\/sepa.php":"10268e103cd7c7df9dd4b66988bcda82","example\/transactions\/sofort.php":"a8552ca60ec035fc0d03eafdbecfcca7","example\/transactions\/tinka.php":"1e10d360bf3987b4bf2dd07446ad610d","example\/transactions\/transfer.php":"53a25922b9707797df8d6d9623dc6565","example\/transactions\/trustly.php":"98c0c06cf6b3b6cad2ce5894dad8bb9b","example\/transactions\/wechat.php":"5c4f687f253b3b1c557feedcd45ad05b"}} \ No newline at end of file +{"php":"8.2.4","version":"3.15.1:v3.15.1#d48755372a113bddb99f749e34805d83f3acfe04","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":{"allow_single_line_closure":false,"position_after_functions_and_oop_constructs":"next","position_after_anonymous_constructs":"next","position_after_control_structures":"next"},"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"single_trait_insert_per_statement":true},"hashes":{"src\/BuckarooClient.php":"a04feed78f40b502363053f348a95d42","src\/Config\/Config.php":"3049e56bf3e3a3f2b947f4a18cded93a","src\/Config\/DefaultConfig.php":"ff088b4e5124f40155cc198401134378","src\/Exceptions\/BuckarooException.php":"d2544fdaa34bf1de4d51630f8d9cc5a9","src\/Exceptions\/TransferException.php":"d6d7bc200cb3e9697368e423c2dfacd5","src\/Handlers\/Credentials.php":"72547a0871ef078f61217d9c387e8bf6","src\/Handlers\/HMAC\/Generator.php":"285cbc96e2eb0a709b1d541602257cae","src\/Handlers\/HMAC\/Hmac.php":"18f9016e7c5aea3a0b692d20723940a7","src\/Handlers\/HMAC\/Validator.php":"75a5227ff35b94611b9799121e026abc","src\/Handlers\/Logging\/DefaultLogger.php":"91e9a8fa50a5770f092be6a546f4f179","src\/Handlers\/Logging\/Loggable.php":"f4b7e8704cbbe37d9c354801bebbfc59","src\/Handlers\/Logging\/Observer.php":"060d6e5806f7d7e16004d03cab986d37","src\/Handlers\/Logging\/Observers\/ErrorReporter.php":"7ec7da9e92f3b23b4c5d4efce8d86bd9","src\/Handlers\/Logging\/Observers\/Monolog.php":"e7d485dc3bc8bb26769249749e590f27","src\/Handlers\/Logging\/Subject.php":"3d67799142a50aab2eef4e24219cb74e","src\/Handlers\/Reply\/HttpPost.php":"4e0f9906ba5d6cdd307ebfadee255542","src\/Handlers\/Reply\/Json.php":"c9843468bfb3433c27fcd733d659e28a","src\/Handlers\/Reply\/ReplyHandler.php":"845bd35eb1b47207345d1407b83e1266","src\/Handlers\/Reply\/ReplyStrategy.php":"5bab082004f01d9950a9bc1ff468cd69","src\/Models\/Adapters\/ServiceParametersKeysAdapter.php":"b9ba2ebeed2dcfc47dac37dca6f3546c","src\/Models\/AdditionalParameters.php":"4971bbecdfda4aafd081ff5dbc1e3dd0","src\/Models\/Address.php":"ceeab777c91d46aeae2d4e7ab5d7df99","src\/Models\/Article.php":"aa20190c5a3dd2ff6ae169268a2d34e0","src\/Models\/BankAccount.php":"e82a08360df8697c9e059178a7c8fbd8","src\/Models\/ClientIP.php":"e19df1c3fe6357c96c26e2f8ff1e5e29","src\/Models\/Company.php":"d47ad3497173c8fc6fb6fc3daa73aec9","src\/Models\/Debtor.php":"3e6ab2b25de1e477d44bfb1165913366","src\/Models\/Email.php":"982763a72eb2935b8a9b3e9982ed72ca","src\/Models\/Interfaces\/Recipient.php":"85589ae85ccc2fdeecc18b3b2a0fdcbb","src\/Models\/Model.php":"2c7d00151866c93051e081a74097bd88","src\/Models\/Payload\/PayPayload.php":"cca5ff8b604ae2aa749b6b3dfabbaf82","src\/Models\/Payload\/Payload.php":"cf211d0785d48099c6daf8e78813029b","src\/Models\/Payload\/RefundPayload.php":"50ca2b6fadd6d1dfc1af85e4e475a551","src\/Models\/Person.php":"da9fce2330f7dbe81553cdf6a6ff5474","src\/Models\/Phone.php":"1a9f7c4872419d316fdebb2703f658a8","src\/Models\/ServiceList.php":"e51064ef8722035a1af8577f1cdb29dc","src\/Models\/ServiceParameter.php":"dafc671a780a47388f2cf6067b9c08ce","src\/Models\/Services.php":"953ba8de24fdf96f25f87a19439528d4","src\/PaymentMethods\/Afterpay\/Afterpay.php":"5220a26153046c35a71c5f9544a8c07c","src\/PaymentMethods\/Afterpay\/Models\/Article.php":"1101df36002c534b8194c8f38b5f359c","src\/PaymentMethods\/Afterpay\/Models\/Pay.php":"e8d7f0818eb7078a61ca31056c8c1394","src\/PaymentMethods\/Afterpay\/Models\/Person.php":"400ed6119966980ff0c48ca7e75702c6","src\/PaymentMethods\/Afterpay\/Models\/Recipient.php":"1da6ea525690661c2237ab21382ed19e","src\/PaymentMethods\/Afterpay\/Models\/Refund.php":"bc0c928de027bd2c3eca4ad997d2ed10","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/AddressAdapter.php":"692191fd233a1ea93b3dea94a8b4a9d1","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/ArticleAdapter.php":"c9cf7fac3e8bd7554fb773180301ddfe","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/PhoneAdapter.php":"5a13e983066abe460ae4831cabe1c428","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/RecipientAdapter.php":"9ce22d14bc2d17220e3f5765720f713a","src\/PaymentMethods\/AfterpayDigiAccept\/AfterpayDigiAccept.php":"a17f362fc17716edaf11c5e6c2f1dc8f","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Pay.php":"59cb734c920506b03f62bd89b9590554","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Recipient.php":"049301de1c6a4ca82cba08830ff04eb0","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Refund.php":"0453cf9fdd07cd1ff5cb68feac2cc2c1","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/AddressAdapter.php":"81ac818062aaf5e4aca0deaef2d0f17c","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/ArticleAdapter.php":"54cb4aa29bbfa9d13250d7c90069eab0","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/EmailAdapter.php":"607a333d0355446d5b2bb5d78d2648af","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/PhoneAdapter.php":"e025168a23f2bc4033e4f08669604ee7","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/RecipientAdapter.php":"9f932e8753a8dd4bb8e2a4c5a5b4be9b","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/ServiceAdapter.php":"bc34e01a54c01929cda40c8bac36de03","src\/PaymentMethods\/Alipay\/Alipay.php":"dd908e596902c85130e0e4920da04272","src\/PaymentMethods\/Alipay\/Models\/Pay.php":"fb9572ebd5464e8a006c0681a452e951","src\/PaymentMethods\/ApplePay\/ApplePay.php":"877e953b5326ffa57f75dbe34496c185","src\/PaymentMethods\/ApplePay\/Models\/Pay.php":"3b614359549f91062e646ab56f436490","src\/PaymentMethods\/ApplePay\/Models\/PayPayload.php":"c676ee7ee1bcc1907a04a27f9e2ac160","src\/PaymentMethods\/Bancontact\/Bancontact.php":"bc5b720c1f4304c1319f48a757c6688f","src\/PaymentMethods\/Bancontact\/Models\/Authenticate.php":"62906afe0a165a35651eb394b951193d","src\/PaymentMethods\/Bancontact\/Models\/Pay.php":"8fc9760c4052b60eb79d5ffa3b0ae69b","src\/PaymentMethods\/Bancontact\/Models\/PayEncrypted.php":"f0f4283c57c8ab2bb06e5f5950f8e643","src\/PaymentMethods\/BankTransfer\/BankTransfer.php":"15b6812b9c8cc34f2d81aaa685c99f5d","src\/PaymentMethods\/BankTransfer\/Models\/Pay.php":"991cff07b81d31ad98343c9ccf674510","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/CustomerAdapter.php":"6c859ee4db8fc7fa505e5e7987da5977","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/EmailAdapter.php":"cdbdc24a8503270b046be3553bfe4583","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/PayAdapter.php":"ae9149be34d4d0912b490722b6756e86","src\/PaymentMethods\/Belfius\/Belfius.php":"6d0514225d9c9f5281900d7bc53e704c","src\/PaymentMethods\/Billink\/Billink.php":"adb3e9af9aea69f6ed8c2d0f8ecc280b","src\/PaymentMethods\/Billink\/Models\/Article.php":"ed916bb29315a44950f44604b5a6b399","src\/PaymentMethods\/Billink\/Models\/Capture.php":"d78606a9918a5925ed15a11cc29df1f6","src\/PaymentMethods\/Billink\/Models\/Pay.php":"74e1561269fdf63a24a696cb0de0c5fb","src\/PaymentMethods\/Billink\/Models\/Recipient.php":"39b57b32e18e6069844aad09f92b0f43","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/AddressAdapter.php":"8de6d09943d0621affdda7e724708274","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/ArticleAdapter.php":"4f5d6145f7becd1ed27ca33f22077397","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/PhoneAdapter.php":"0edca59d6e4c151f1c85fe465c6ef3bd","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/RecipientAdapter.php":"105fa7a29317a0b80f1a8b9b119c5fc1","src\/PaymentMethods\/BuckarooVoucher\/BuckarooVoucher.php":"b181c9e03dd924b899cac175e8c15259","src\/PaymentMethods\/BuckarooVoucher\/Models\/Create.php":"255d4fa0461244cad9aa4435ccb7e43c","src\/PaymentMethods\/BuckarooVoucher\/Models\/CreatePayload.php":"42913f90c793c2ed1b27fc855fae68c8","src\/PaymentMethods\/BuckarooVoucher\/Models\/Deactivate.php":"96bed609390d0ecb3dd8a94dd9ba240b","src\/PaymentMethods\/BuckarooVoucher\/Models\/GetBalance.php":"65b690ff91464e3898d3d960467c6690","src\/PaymentMethods\/BuckarooVoucher\/Models\/Pay.php":"e39a2921209a5c4ec9f5649dd3c4ac50","src\/PaymentMethods\/BuckarooWallet\/BuckarooWallet.php":"ef5b362c63a5fde93fa3281690c79c41","src\/PaymentMethods\/BuckarooWallet\/Models\/DepositReservePayload.php":"c57b8f8352bc2b4eac33fa49d8416958","src\/PaymentMethods\/BuckarooWallet\/Models\/ReleasePayload.php":"e31a198d3046222442855a7ec111d9ef","src\/PaymentMethods\/BuckarooWallet\/Models\/Wallet.php":"fd1d7d36ea9c27bc6da65aadb2d48a38","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/BankAccountAdapter.php":"3a433e884d2b0d755f469a20861a6430","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/CustomerAdapter.php":"303e6c1671897d735dd113cc4166af1d","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/EmailAdapter.php":"703b17e3e3fcb9175aab78ce7d317ef7","src\/PaymentMethods\/CreditCard\/CreditCard.php":"8430cd30423a606b9a9b8b5f9663762b","src\/PaymentMethods\/CreditCard\/Models\/CardData.php":"df7536390b7b2b7a63903a0ff3d24069","src\/PaymentMethods\/CreditCard\/Models\/SecurityCode.php":"d9a6a20c5ca807629e3b4a1877446132","src\/PaymentMethods\/CreditClick\/CreditClick.php":"9e5484352aa2b73cbf5ece5e238d826f","src\/PaymentMethods\/CreditClick\/Models\/Pay.php":"8e8763e5fdf905c1c58e689fc96a77d0","src\/PaymentMethods\/CreditClick\/Models\/Refund.php":"82ec73b5892602d35c0321150ec499b7","src\/PaymentMethods\/CreditClick\/Service\/ParameterKeys\/CustomerAdapter.php":"7f94f0737428a95fde806eec14d2be5d","src\/PaymentMethods\/CreditManagement\/CreditManagement.php":"2bb0a0507d143bc8d42ea4c6cb523f92","src\/PaymentMethods\/CreditManagement\/Models\/AddOrUpdateProductLines.php":"5275167ba0256eb6e0aeffe0f6ade3a5","src\/PaymentMethods\/CreditManagement\/Models\/Article.php":"61b8495754e71a08c69f4aa5267c5e0b","src\/PaymentMethods\/CreditManagement\/Models\/CreditNote.php":"386def7c4e3295db852923423ac99b9b","src\/PaymentMethods\/CreditManagement\/Models\/Debtor.php":"611fdd1a517f779701709420e7b0866e","src\/PaymentMethods\/CreditManagement\/Models\/DebtorFile.php":"59f4fe33c0156a68fb9153b492a3c824","src\/PaymentMethods\/CreditManagement\/Models\/DebtorInfo.php":"f78fdb63e146972a09975a234b7e1d44","src\/PaymentMethods\/CreditManagement\/Models\/Invoice.php":"6a0c3c9d3f6149bcdd5b7f5cd20f6170","src\/PaymentMethods\/CreditManagement\/Models\/MultipleInvoiceInfo.php":"e8b87aa2fcbd7357f0cea6ef05f4f0f0","src\/PaymentMethods\/CreditManagement\/Models\/PaymentPlan.php":"1e1c12e66f2091ba9a65090364ad62dd","src\/PaymentMethods\/CreditManagement\/Service\/ParameterKeys\/ArticleAdapter.php":"d644cfeb053b9ed4c585badae22c39cd","src\/PaymentMethods\/CreditManagement\/Service\/ParameterKeys\/DebtorInfoAdapter.php":"111483943c0c031041d2cf9c5bdd6896","src\/PaymentMethods\/EPS\/EPS.php":"4a19a3827ec83faed3a7abae33fb60c2","src\/PaymentMethods\/Emandates\/Emandates.php":"e1f0adf6f026b2004ca4db417295a483","src\/PaymentMethods\/Emandates\/Models\/Mandate.php":"825f7606cdce24b7cd87c85c56ef51be","src\/PaymentMethods\/GiftCard\/GiftCard.php":"605c12b4ba7a57b69538a94bcfd1bc48","src\/PaymentMethods\/GiftCard\/Models\/Pay.php":"5672b5bb84a6ec7989fb82b3c70f566f","src\/PaymentMethods\/GiftCard\/Models\/PayPayload.php":"6beb12d039bb1a75e9545860c3cbf9bc","src\/PaymentMethods\/Giropay\/Giropay.php":"afe9d431a68e56af845b5945c6ee6d72","src\/PaymentMethods\/Giropay\/Models\/Pay.php":"bd0fb92797290265baafbef8c143d77b","src\/PaymentMethods\/In3\/In3.php":"2ce32872023af75f0a60be62474f46a9","src\/PaymentMethods\/In3\/Models\/Pay.php":"bc41a5976dc954f06bab49e3451b4931","src\/PaymentMethods\/In3\/Models\/PayPayload.php":"5e1559127bd6bcc39af9cba5016f71fe","src\/PaymentMethods\/In3\/Models\/Subtotal.php":"1a9ac4476a45521af82482e1be6ba854","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/AddressAdapter.php":"53b92ce98c02ae7d93e6b14227563b47","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/ArticleAdapter.php":"58b9d16f6ea930ac4efc763a326e28ca","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/CompanyAdapter.php":"f5ea7377501c6af673f61849e5566f58","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/PhoneAdapter.php":"2d6f0fa594ab03430d55ec26dcd8ba39","src\/PaymentMethods\/Interfaces\/Combinable.php":"b3a8a715e15d40f1fec8e8aa69e23db4","src\/PaymentMethods\/KBC\/KBC.php":"1dd2a8585a64b8078339a1172f09bf10","src\/PaymentMethods\/KlarnaKP\/KlarnaKP.php":"2c5696440cc568dc337c0d7cb4ebfc48","src\/PaymentMethods\/KlarnaKP\/Models\/Payload.php":"b33d782fc49f5ec4e61aa240da52d2de","src\/PaymentMethods\/KlarnaKP\/Models\/Recipient.php":"1ea7c1ca72ea5b10c109db5752ed158f","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/AddressAdapter.php":"b683bbacf1c10c1e7b0dc3625b83730a","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/ArticleAdapter.php":"7d987920678ff84247fa9941d2a219d0","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/EmailAdapter.php":"6c7a63c151b2d52475ba843259e369da","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/PhoneAdapter.php":"3f18c0a203e29cdb2c7fbed3e5e78e71","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/RecipientAdapter.php":"a79df1fdeb4bcc7f4147218891a266df","src\/PaymentMethods\/KlarnaPay\/KlarnaPay.php":"74ffbf3cc7239a4dbb3ab30698e19792","src\/PaymentMethods\/KlarnaPay\/Models\/Pay.php":"158f36bcb659ea6d2fe6226c7dd6900c","src\/PaymentMethods\/KlarnaPay\/Models\/PayPayload.php":"74f8711b521078bc34dfb2abeef6bcb6","src\/PaymentMethods\/KlarnaPay\/Models\/Recipient.php":"d5cf4d926b5d08c514150fc4e98f6343","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/AddressAdapter.php":"ae4d5a23dc640095d90cbb919ecdeab2","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/ArticleAdapter.php":"99629484c73633b2fcef73e74a2016ca","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/PhoneAdapter.php":"dbede561858850c098431e29785363a4","src\/PaymentMethods\/Marketplaces\/Marketplaces.php":"a58ad6edd52a8da52e37c55f88bf6a42","src\/PaymentMethods\/Marketplaces\/Models\/Marketplace.php":"c56e09f922cdc3c84912ba11414f37cc","src\/PaymentMethods\/Marketplaces\/Models\/Seller.php":"36a79655bb1190ecb8781b3b7fcd7ddf","src\/PaymentMethods\/Marketplaces\/Models\/ServiceList.php":"a25677f4cb9f55a72f90c78d9e05fad9","src\/PaymentMethods\/PayPerEmail\/Models\/Attachment.php":"ccff70fe9482b7ac0c4ee99c0f1e3923","src\/PaymentMethods\/PayPerEmail\/Models\/PaymentInvitation.php":"db244fffd49b47138ad8d32d14af187d","src\/PaymentMethods\/PayPerEmail\/PayPerEmail.php":"c07cb576cd8f37362b11dac19a7898e6","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/AttachmentAdapter.php":"cc857add67db197985a4879125190f84","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/CustomerAdapter.php":"cff29d3c99971efd11d19fc7392d23e2","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/EmailAdapter.php":"b16e545c775b75e3ed3747ef2151154b","src\/PaymentMethods\/PayablePaymentMethod.php":"eeb8a8a289ad40f6c7bffea0efe56311","src\/PaymentMethods\/Payconiq\/Payconiq.php":"057415ee3ede1bbbc1d9cb67a5e51bc2","src\/PaymentMethods\/PaymentFacade.php":"d241ed41b8f0c5a8f1c6543385185baa","src\/PaymentMethods\/PaymentInterface.php":"accc043249c9d1184d4fb100f14fb303","src\/PaymentMethods\/PaymentMethod.php":"39c673e7942aeb2f4b702dd53a6b086c","src\/PaymentMethods\/PaymentMethodFactory.php":"38c7d8bb6deba14b026ddc4b01ce7c37","src\/PaymentMethods\/Paypal\/Models\/Address.php":"74d8d0bc2ac7235e4a1a657cc70827c9","src\/PaymentMethods\/Paypal\/Models\/ExtraInfo.php":"b1e13c02b0c39531358693233b028bf7","src\/PaymentMethods\/Paypal\/Models\/Pay.php":"67225ec2037509db760c99ad4038d459","src\/PaymentMethods\/Paypal\/Paypal.php":"ab57cc1612f2438ea246cd745bbd6b3c","src\/PaymentMethods\/Paypal\/Service\/ParameterKeys\/AddressAdapter.php":"d370a51df269afcfad9dc75e8e148dd4","src\/PaymentMethods\/Paypal\/Service\/ParameterKeys\/PhoneAdapter.php":"046f3a220b5602d42482a3a3ec389f9a","src\/PaymentMethods\/PointOfSale\/Models\/Pay.php":"e1842ac15bedd7a83aeaa296049252eb","src\/PaymentMethods\/PointOfSale\/PointOfSale.php":"25637901753d2c07d00ab6bf0beb381c","src\/PaymentMethods\/Przelewy24\/Models\/Pay.php":"814d22c0721a1c222f44dbd9a97383f7","src\/PaymentMethods\/Przelewy24\/Przelewy24.php":"1c983da62802be6050cfc74d8057f67f","src\/PaymentMethods\/Przelewy24\/Service\/ParameterKeys\/CustomerAdapter.php":"bc65a7576fe49c7c36d10f96f578fcc4","src\/PaymentMethods\/Przelewy24\/Service\/ParameterKeys\/EmailAdapter.php":"6af44a175667a1691e5161f8e7758d4e","src\/PaymentMethods\/SEPA\/Models\/ExtraInfo.php":"22e1282bfe0d8d4a619e2e3488781709","src\/PaymentMethods\/SEPA\/Models\/Pay.php":"830cef74f9747712da251f22dac45a8f","src\/PaymentMethods\/SEPA\/SEPA.php":"4b1ca116d0a6fdb1af60ce65d6d58ae5","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/AddressAdapter.php":"889d7bf15ae56a1e915e8174c98a7bad","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/CustomerAdapter.php":"2af215870b7bb4d3c8fcf7c2e2de2ade","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/PayAdapter.php":"d3b6a8f9c8bd89562484aa0d4d2fae45","src\/PaymentMethods\/Sofort\/Sofort.php":"c9569a2fd82566d49e0ab32049e31790","src\/PaymentMethods\/Subscriptions\/Models\/CombinedPayload.php":"291879ac2ef3c2ffe1e8ea281e422be1","src\/PaymentMethods\/Subscriptions\/Models\/Configuration.php":"26db1893644139846d4c54eb0eb7a5fc","src\/PaymentMethods\/Subscriptions\/Models\/RatePlan.php":"b2aba50e5921250f589f90b2dded6e74","src\/PaymentMethods\/Subscriptions\/Models\/RatePlanCharge.php":"a3d5fe992c41ce30d489ca5c47a60e39","src\/PaymentMethods\/Subscriptions\/Models\/ResumeSubscription.php":"919bca409c01c1aa94eb40f831217207","src\/PaymentMethods\/Subscriptions\/Models\/Subscription.php":"7391d0702787f876e07de142b3dd636c","src\/PaymentMethods\/Subscriptions\/Service\/ParameterKeys\/CompanyAdapter.php":"6f4f7e91f77c9a2479a11ae7f33a5362","src\/PaymentMethods\/Subscriptions\/Subscriptions.php":"eb54f618f94dfacfc4c99af8c789e629","src\/PaymentMethods\/Surepay\/Models\/Verify.php":"027841518d304cdf248d8cf1939ee0c8","src\/PaymentMethods\/Surepay\/Service\/ParameterKeys\/BankAccountAdapter.php":"9c1fa1ab42ab667878db82e1d6fbf8e0","src\/PaymentMethods\/Surepay\/Surepay.php":"bf44ddde109ed1fc424b6c585ab9bc51","src\/PaymentMethods\/Tinka\/Models\/Article.php":"2e2b75383981bd6bbff67cfe7a4ad566","src\/PaymentMethods\/Tinka\/Models\/Pay.php":"049ead8ce258a9e0ac6db008285ee31b","src\/PaymentMethods\/Tinka\/Models\/Recipient.php":"a1eb20125c466d0b48028c6c4f00f46c","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/AddressAdapter.php":"82e58c240201ff1468b8b9be353f33e9","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/ArticleAdapter.php":"05c428e81a33f41916f688964eb906da","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/CustomerAdapter.php":"be0e6db5b2a617fc6bc9e22af096ff9a","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/PhoneAdapter.php":"43c682cf85f9fbdeb64b9637df3a0240","src\/PaymentMethods\/Tinka\/Tinka.php":"90bf921d625064956a42dae45a155e1d","src\/PaymentMethods\/Traits\/CountableGroupKey.php":"bbaf4ac62c697e4ea8ecdc0ad979b08f","src\/PaymentMethods\/Trustly\/Models\/Pay.php":"4d7d1f5790586bb743c7205f34064b83","src\/PaymentMethods\/Trustly\/Service\/ParameterKeys\/CustomerAdapter.php":"e18c0a88bc3ba7f213623c11b2ddb78f","src\/PaymentMethods\/Trustly\/Service\/ParameterKeys\/PayAdapter.php":"ac193e9ad3cb7c91f33c93dba4876771","src\/PaymentMethods\/Trustly\/Trustly.php":"2e8290e1eaae8a1cd8e57b5e4f949f70","src\/PaymentMethods\/WeChatPay\/Models\/Pay.php":"b6752b57a0f3d33711c2d47ec6bcb4d8","src\/PaymentMethods\/WeChatPay\/WeChatPay.php":"7ff27945ea981100f38b22c0c529dfd7","src\/PaymentMethods\/iDeal\/Models\/Pay.php":"8953ccceaed38d93289ac3e4a0ed01b5","src\/PaymentMethods\/iDeal\/iDeal.php":"ca2c50211f06c227c318d85b59c130be","src\/PaymentMethods\/iDealQR\/Models\/Generate.php":"f62e5ea61ee49356adaecbee64b4614e","src\/PaymentMethods\/iDealQR\/iDealQR.php":"ae9ba3ead224c6442cf9db5d68db042f","src\/PaymentMethods\/iDin\/Models\/Issuer.php":"902e454bbfebb4bd52e6ef8b8ba98414","src\/PaymentMethods\/iDin\/Service\/ParameterKeys\/IssuerAdapter.php":"c94438083ea61affd5d9e93e408bb81e","src\/PaymentMethods\/iDin\/iDin.php":"90ce856c9fee3f40cb14d7c3a7af3ef5","src\/Resources\/Arrayable.php":"309daa9c8e87e451a36c15936d5096ea","src\/Resources\/Constants\/CreditManagementInstallmentInterval.php":"56be568c35303858ae97945530c21396","src\/Resources\/Constants\/Endpoints.php":"1ae5ae439f1e44add96c81154b667c00","src\/Resources\/Constants\/Gender.php":"97e49539071851397500521f9c89a12d","src\/Resources\/Constants\/IPProtocolVersion.php":"0db5ea9636219a2c7413db7123cf9bf6","src\/Resources\/Constants\/RecipientCategory.php":"5c1e88ed6130c05a6e70a7d63a93d35b","src\/Resources\/Constants\/ResponseStatus.php":"415427f1ee6d9d6f0ae0b493f35f7ced","src\/Services\/PayloadService.php":"b9389c2f502dba9d991deb80b0d35423","src\/Services\/ServiceListParameters\/DefaultParameters.php":"70310adb54e262d917a6f7cf56f33845","src\/Services\/ServiceListParameters\/ModelParameters.php":"95b6660ae0e9ea3b1c2a9b49c6464325","src\/Services\/ServiceListParameters\/ServiceListParameter.php":"6a3ee9bf76707933ca0e5f62b939b1ef","src\/Services\/TransactionHeaders\/CultureHeader.php":"a3c118a69ea9425294a401b4e535e366","src\/Services\/TransactionHeaders\/DefaultHeader.php":"49e846e47a97aec9e88e07876c91292b","src\/Services\/TransactionHeaders\/HmacHeader.php":"3dcf867cebc0e187c0f3689c274e93d9","src\/Services\/TransactionHeaders\/SoftwareHeader.php":"401661ee7e91717cc8e85dd287350697","src\/Services\/TransactionHeaders\/TransactionHeader.php":"3561b8da46cc8c2e30e388f4c14f43a2","src\/Services\/TransactionService.php":"92a316ca3f4c13ef79e80647b3eb667c","src\/Transaction\/Client.php":"03b658c31b936d5925a53da3754f3917","src\/Transaction\/Request\/HttpClient\/HttpClientAbstract.php":"fca81cd7e91893e62dc1e20e5550c4c6","src\/Transaction\/Request\/HttpClient\/HttpClientGuzzle.php":"8ce604417529a02cf77243adaee62ccd","src\/Transaction\/Request\/HttpClient\/HttpClientInterface.php":"848ed947a3d1fa37d02cd99052c278bc","src\/Transaction\/Request\/Request.php":"702c743d61aa070aa8c8407b70421a1d","src\/Transaction\/Request\/TransactionRequest.php":"5f53d3e7cd9db218ad1727721519496e","src\/Transaction\/Response\/Response.php":"7abe9d998466a8eb81fc26da385e80d8","src\/Transaction\/Response\/TransactionResponse.php":"49417487c7e4bb93c9c84b0eac0a9656","example\/additional_services\/credit_management.php":"32ebd2c0cd3cd10b074c35edd114e674","example\/additional_services\/idin.php":"7dd17bb4d43dd2ae991ebe4686a7c6d2","example\/additional_services\/marketplaces.php":"307e99ab0f2342eeb80c756b4d2e81ed","example\/additional_services\/pay_per_email.php":"d3e2fc698cd56d5c1379f29c587da5df","example\/additional_services\/subscriptions.php":"5f27b97869c216c34fa930c091521fa1","example\/additional_services\/surepay.php":"cf0dd7b1f1aa99c94a5bb68bfccc5445","example\/additional_services\/voucher.php":"bdb49b1d45e44bf5fdd705032e9f4d57","example\/additional_services\/wallets.php":"962b46e5e78ca375562dd7f864550e83","example\/bootstrap.php":"a3f3d709889533c8780df931a288e763","example\/responses\/push.php":"b01ea22e8d4bf8e41a62b66f83249694","example\/responses\/return.php":"88d46cf36ec3550a3c0daca8aad94849","example\/transactions\/afterpay.php":"f8dc471f412bb3fefbf6c5a5f50c55aa","example\/transactions\/afterpaydigiaccept.php":"81b4d5de6624b4dc52dd37d6eb44fed8","example\/transactions\/alipay.php":"3b87fc27ec2ac13b13553454ae632fcd","example\/transactions\/applepay.php":"0d507f91f2224307c33fe85c52f8e732","example\/transactions\/applepay_redirect.php":"00ba0cabc3a7bb547f8821fadf94c74b","example\/transactions\/bancontact.php":"d1ee54f16d05c1a9126cbf228951d44f","example\/transactions\/belfius.php":"16a0efb01febb9cbcd70f7badcf5c64d","example\/transactions\/billink.php":"9305b0ee2b569d5ea1b5ac3f702bfc4e","example\/transactions\/credit_click.php":"27463cb1ab953baa0b7a82d32b500996","example\/transactions\/creditcard.php":"98a19b4d843617f53bd93f447fe3df0a","example\/transactions\/eps.php":"46fa813019489d29dd68e02b9bfa2a92","example\/transactions\/giftcards.php":"89a4fd8eb260009808402066944f7b95","example\/transactions\/giftcards_redirect.php":"1e7c17cd1c83a39e4b230758fdc77e0c","example\/transactions\/giropay.php":"2c82c4a5aa0fee3dc8c0ad40d3c5d791","example\/transactions\/ideal.php":"b346b5816272e6b626850efffb1d5f28","example\/transactions\/ideal_qr.php":"65bf7d44865b1cbaa08c9d00967fc0b1","example\/transactions\/in3.php":"f078817d49c83c22232bc615fc721521","example\/transactions\/kbc.php":"5c55f714be73d80e632912f3acb56def","example\/transactions\/klarna.php":"6e8d1b91bdc5992e5e514d3e652d25c9","example\/transactions\/klarnakp.php":"716cfcbdbb24e47f772330a85c4f69c4","example\/transactions\/payconiq.php":"cd952b2d7a6ce6df0e25f6c5f03230e1","example\/transactions\/paypal.php":"d819893fca49ff7ccbf140133d2ea7ac","example\/transactions\/pos.php":"cd2118e471e77210a4b687a98d067989","example\/transactions\/przelewy24.php":"d92bb6501d79d637ca91b811bb6e82e7","example\/transactions\/sepa.php":"10268e103cd7c7df9dd4b66988bcda82","example\/transactions\/sofort.php":"a8552ca60ec035fc0d03eafdbecfcca7","example\/transactions\/tinka.php":"1e10d360bf3987b4bf2dd07446ad610d","example\/transactions\/transfer.php":"53a25922b9707797df8d6d9623dc6565","example\/transactions\/trustly.php":"98c0c06cf6b3b6cad2ce5894dad8bb9b","example\/transactions\/wechat.php":"5c4f687f253b3b1c557feedcd45ad05b"}} \ No newline at end of file diff --git a/composer.json b/composer.json index c8f19306..3010239a 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ }, "autoload-dev": { "psr-4": { - "BuckarooTests\\": "Tests/" + "Tests\\": "tests/" } } } diff --git a/example/transactions/klarna.php b/example/transactions/klarna.php index ebe45505..5ea0e212 100644 --- a/example/transactions/klarna.php +++ b/example/transactions/klarna.php @@ -1,4 +1,5 @@ + + Buckaroo SDK coding standard. + + src + + + + + *.php + + + + src/PaymentMethods/iDeal/iDeal.php + src/PaymentMethods/iDealQR/iDealQR.php + + + src + + \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index 6d543322..b57d1976 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ - - src/Tests/ + + tests diff --git a/src/Config/Config.php b/src/Config/Config.php index 215333ac..93d89aed 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -194,8 +194,7 @@ private function filterNonUpdatableKeys($payload) { $filter = ['websiteKey', 'secretKey']; - return array_filter($payload, function ($k) use ($filter) - { + return array_filter($payload, function ($k) use ($filter) { return ! in_array($k, $filter); }, ARRAY_FILTER_USE_KEY); } diff --git a/src/Handlers/Credentials.php b/src/Handlers/Credentials.php index b835ade9..5b7f8377 100644 --- a/src/Handlers/Credentials.php +++ b/src/Handlers/Credentials.php @@ -58,12 +58,9 @@ public function confirm(): bool $request = new TransactionRequest; - try - { + try { $response = $this->client->specification($request, 'ideal', 2); - } - catch (BuckarooException $e) - { + } catch (BuckarooException $e) { return false; } diff --git a/src/Handlers/Logging/DefaultLogger.php b/src/Handlers/Logging/DefaultLogger.php index 0cccc30c..70650d7f 100644 --- a/src/Handlers/Logging/DefaultLogger.php +++ b/src/Handlers/Logging/DefaultLogger.php @@ -75,8 +75,7 @@ public function attach($observer) */ public function detach(Observer $observer) { - $this->observers = array_filter($this->observers, function ($value) use ($observer) - { + $this->observers = array_filter($this->observers, function ($value) use ($observer) { return get_class($value) != get_class($observer); }); diff --git a/src/Handlers/Logging/Observers/Monolog.php b/src/Handlers/Logging/Observers/Monolog.php index e1cfbb4e..f331a518 100644 --- a/src/Handlers/Logging/Observers/Monolog.php +++ b/src/Handlers/Logging/Observers/Monolog.php @@ -5,9 +5,12 @@ use Buckaroo\Handlers\Logging\Observer; use Monolog\Handler\StreamHandler; use Monolog\Logger; +use Psr\Log\LoggerInterface; class Monolog implements Observer { + protected LoggerInterface $log; + public function __construct() { $this->log = new Logger('Buckaroo log'); diff --git a/src/Handlers/Reply/HttpPost.php b/src/Handlers/Reply/HttpPost.php index 30a6f9ac..d86e411e 100644 --- a/src/Handlers/Reply/HttpPost.php +++ b/src/Handlers/Reply/HttpPost.php @@ -51,8 +51,7 @@ public function __construct(Config $config, array $data) public function validate(): bool { //Remove brq_signature from the equation - $data = array_filter($this->data, function ($key) - { + $data = array_filter($this->data, function ($key) { $acceptable_top_level = ['brq', 'add', 'cust', 'BRQ', 'ADD', 'CUST']; return ( @@ -61,8 +60,7 @@ public function validate(): bool }, ARRAY_FILTER_USE_KEY); //Combine the array keys with value - $data = array_map(function ($value, $key) - { + $data = array_map(function ($value, $key) { return $key . '=' . html_entity_decode($value); }, $data, array_keys($data)); diff --git a/src/Handlers/Reply/ReplyHandler.php b/src/Handlers/Reply/ReplyHandler.php index 4d4e556e..785c3c79 100644 --- a/src/Handlers/Reply/ReplyHandler.php +++ b/src/Handlers/Reply/ReplyHandler.php @@ -118,12 +118,12 @@ private function contains(string $needle, array $data, bool $strict = false): bo { foreach (array_keys($data) as $key) { - if($strict && $key == $needle) + if ($strict && $key == $needle) { return true; } - if(!$strict && str_contains($key, $needle)) + if (! $strict && str_contains($key, $needle)) { return true; } diff --git a/src/PaymentMethods/BuckarooVoucher/Models/Create.php b/src/PaymentMethods/BuckarooVoucher/Models/Create.php index e1d58e95..9bb8229d 100644 --- a/src/PaymentMethods/BuckarooVoucher/Models/Create.php +++ b/src/PaymentMethods/BuckarooVoucher/Models/Create.php @@ -24,6 +24,8 @@ class Create extends ServiceParameter { + protected string $groupReference; + protected string $usageType; protected string $validFrom; diff --git a/src/PaymentMethods/PaymentFacade.php b/src/PaymentMethods/PaymentFacade.php index d9647706..bd6480b5 100644 --- a/src/PaymentMethods/PaymentFacade.php +++ b/src/PaymentMethods/PaymentFacade.php @@ -99,6 +99,11 @@ class PaymentFacade */ private bool $isManually = false; + /** + * @var Client + */ + protected Client $client; + /** * @param Client $client * @param string $method diff --git a/src/PaymentMethods/PaymentMethod.php b/src/PaymentMethods/PaymentMethod.php index 50a3889d..e458aaae 100644 --- a/src/PaymentMethods/PaymentMethod.php +++ b/src/PaymentMethods/PaymentMethod.php @@ -28,6 +28,9 @@ use Buckaroo\Transaction\Response\TransactionResponse; use Psr\Log\LoggerInterface; +/** + * + */ abstract class PaymentMethod implements PaymentInterface { /** @@ -74,6 +77,11 @@ abstract class PaymentMethod implements PaymentInterface */ protected bool $isManually = false; + /** + * @var string|null + */ + protected ?string $serviceCode; + /** * @param Client $client * @param string|null $serviceCode @@ -185,8 +193,7 @@ public function combinePayment(Combinable $combinablePayment) { $this->combinablePayment = $combinablePayment; - $payload_data = array_filter($combinablePayment->request->data(), function ($key) - { + $payload_data = array_filter($combinablePayment->request->data(), function ($key) { return ! in_array($key, ['Services']); }, ARRAY_FILTER_USE_KEY); diff --git a/src/PaymentMethods/Subscriptions/Models/Configuration.php b/src/PaymentMethods/Subscriptions/Models/Configuration.php index c963dc31..4d9f2cc7 100644 --- a/src/PaymentMethods/Subscriptions/Models/Configuration.php +++ b/src/PaymentMethods/Subscriptions/Models/Configuration.php @@ -38,4 +38,4 @@ class Configuration extends ServiceParameter * @var bool */ protected bool $skipPayPerEmail; -} \ No newline at end of file +} diff --git a/src/PaymentMethods/Subscriptions/Models/RatePlanCharge.php b/src/PaymentMethods/Subscriptions/Models/RatePlanCharge.php index c2cf3e21..4303aeeb 100644 --- a/src/PaymentMethods/Subscriptions/Models/RatePlanCharge.php +++ b/src/PaymentMethods/Subscriptions/Models/RatePlanCharge.php @@ -74,4 +74,4 @@ class RatePlanCharge extends ServiceParameter * @var string */ protected string $ratePlanChargeType; -} \ No newline at end of file +} diff --git a/src/PaymentMethods/Subscriptions/Models/Subscription.php b/src/PaymentMethods/Subscriptions/Models/Subscription.php index a8e96e35..955b35be 100644 --- a/src/PaymentMethods/Subscriptions/Models/Subscription.php +++ b/src/PaymentMethods/Subscriptions/Models/Subscription.php @@ -164,7 +164,7 @@ class Subscription extends ServiceParameter 'groupType' => 'AddRatePlan', ], 'configuration' => [ - 'groupType' => 'AddConfiguration' + 'groupType' => 'AddConfiguration', ], 'updateRatePlan' => [ 'groupType' => 'UpdateRatePlan', diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index c9e74025..0365cd8f 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -65,12 +65,9 @@ public function issuers(): array { $request = new TransactionRequest; - try - { + try { $response = $this->client->specification($request, 'ideal', 2); - } - catch (BuckarooException $e) - { + } catch (BuckarooException $e) { return []; } diff --git a/src/Services/TransactionHeaders/CultureHeader.php b/src/Services/TransactionHeaders/CultureHeader.php index 2de3e2cd..b76ab65b 100644 --- a/src/Services/TransactionHeaders/CultureHeader.php +++ b/src/Services/TransactionHeaders/CultureHeader.php @@ -20,8 +20,15 @@ namespace Buckaroo\Services\TransactionHeaders; +/** + * + */ class CultureHeader extends TransactionHeader { + /** + * @var string|null + */ + protected ?string $locale; /** * @param TransactionHeader $transactionHeader * @param string|null $locale diff --git a/src/Services/TransactionHeaders/HmacHeader.php b/src/Services/TransactionHeaders/HmacHeader.php index c3ce71b2..59988c5e 100644 --- a/src/Services/TransactionHeaders/HmacHeader.php +++ b/src/Services/TransactionHeaders/HmacHeader.php @@ -29,6 +29,8 @@ class HmacHeader extends TransactionHeader { + protected Generator $hmacGenerator; + public function __construct( TransactionHeader $transactionHeader, Config $config, diff --git a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php b/src/Transaction/Request/HttpClient/HttpClientGuzzle.php index b0b2a102..544cb425 100644 --- a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php +++ b/src/Transaction/Request/HttpClient/HttpClientGuzzle.php @@ -25,6 +25,7 @@ use Buckaroo\Exceptions\TransferException; use Buckaroo\Handlers\Logging\Subject; use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; @@ -36,6 +37,8 @@ class HttpClientGuzzle extends HttpClientAbstract */ protected Subject $logger; + protected ClientInterface $httpClient; + /** * @param Subject $logger */ @@ -66,17 +69,14 @@ public function call(string $url, array $headers, string $method, string $data = $request = new Request($method, $url, $headers, $data); - try - { + try { $response = $this->httpClient->send($request, ['http_errors' => false]); $result = (string) $response->getBody(); $this->logger->info('RESPONSE HEADERS: ' . json_encode($response->getHeaders())); $this->logger->info('RESPONSE BODY: ' . $response->getBody()); - } - catch (GuzzleException $e) - { + } catch (GuzzleException $e) { throw new TransferException($this->logger, "Transfer failed", 0, $e); } diff --git a/src/Transaction/Request/Request.php b/src/Transaction/Request/Request.php index 4cfe62f7..1227e4dd 100644 --- a/src/Transaction/Request/Request.php +++ b/src/Transaction/Request/Request.php @@ -48,9 +48,7 @@ public function offsetSet($offset, $value): void if (is_null($offset)) { $this->data[] = $value; - } - else - { + } else { $this->data[$offset] = $value; } } @@ -97,9 +95,7 @@ public function __call($method, $args) if ($prefix === 'set') { return $this->offsetSet($param, $arg); - } - elseif ($prefix === 'get') - { + } elseif ($prefix === 'get') { return $this->offsetGet($param); } @@ -148,8 +144,7 @@ public function getHeader($name) */ public function getHeaders(): array { - return array_map(function ($value, $key) - { + return array_map(function ($value, $key) { return $key . ': ' . $value; }, $this->headers); } diff --git a/src/Transaction/Response/Response.php b/src/Transaction/Response/Response.php index c3400314..6646db74 100644 --- a/src/Transaction/Response/Response.php +++ b/src/Transaction/Response/Response.php @@ -33,6 +33,8 @@ class Response implements ArrayAccess, Arrayable */ protected $data = []; + protected $httpResponse; + /** * @param $data */ diff --git a/src/Tests/BuckarooTestCase.php b/tests/Buckaroo/BuckarooTestCase.php similarity index 94% rename from src/Tests/BuckarooTestCase.php rename to tests/Buckaroo/BuckarooTestCase.php index bada7b58..5c97955e 100644 --- a/src/Tests/BuckarooTestCase.php +++ b/tests/Buckaroo/BuckarooTestCase.php @@ -18,7 +18,7 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests; +namespace Tests\Buckaroo; use Buckaroo\BuckarooClient; use Dotenv\Dotenv; @@ -26,6 +26,7 @@ class BuckarooTestCase extends TestCase { + protected BuckarooClient $buckaroo; public function __construct() { $dotenv = Dotenv::createImmutable(getcwd()); diff --git a/src/Tests/ConfirmingCredentialsTest.php b/tests/Buckaroo/ConfirmingCredentialsTest.php similarity index 97% rename from src/Tests/ConfirmingCredentialsTest.php rename to tests/Buckaroo/ConfirmingCredentialsTest.php index e774f77d..758d54c0 100644 --- a/src/Tests/ConfirmingCredentialsTest.php +++ b/tests/Buckaroo/ConfirmingCredentialsTest.php @@ -20,7 +20,7 @@ * */ -namespace Buckaroo\Tests; +namespace Tests\Buckaroo; class ConfirmingCredentialsTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/AfterpayDigiAcceptTest.php b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php similarity index 98% rename from src/Tests/Payments/AfterpayDigiAcceptTest.php rename to tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php index cb3fb2d5..22429966 100644 --- a/src/Tests/Payments/AfterpayDigiAcceptTest.php +++ b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php @@ -18,10 +18,10 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; +use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Resources\Constants\Gender; -use Buckaroo\Tests\BuckarooTestCase; class AfterpayDigiAcceptTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/AfterpayTest.php b/tests/Buckaroo/Payments/AfterpayTest.php similarity index 98% rename from src/Tests/Payments/AfterpayTest.php rename to tests/Buckaroo/Payments/AfterpayTest.php index 8d64f07a..6ee4676c 100644 --- a/src/Tests/Payments/AfterpayTest.php +++ b/tests/Buckaroo/Payments/AfterpayTest.php @@ -18,10 +18,10 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; +use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Resources\Constants\RecipientCategory; -use Buckaroo\Tests\BuckarooTestCase; class AfterpayTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/AlipayTest.php b/tests/Buckaroo/Payments/AlipayTest.php similarity index 95% rename from src/Tests/Payments/AlipayTest.php rename to tests/Buckaroo/Payments/AlipayTest.php index 47900794..5be4c432 100644 --- a/src/Tests/Payments/AlipayTest.php +++ b/tests/Buckaroo/Payments/AlipayTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class AlipayTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/ApplepayTest.php b/tests/Buckaroo/Payments/ApplepayTest.php similarity index 96% rename from src/Tests/Payments/ApplepayTest.php rename to tests/Buckaroo/Payments/ApplepayTest.php index 3cdb3134..0949a1f1 100644 --- a/src/Tests/Payments/ApplepayTest.php +++ b/tests/Buckaroo/Payments/ApplepayTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class ApplepayTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/BancontactTest.php b/tests/Buckaroo/Payments/BancontactTest.php similarity index 98% rename from src/Tests/Payments/BancontactTest.php rename to tests/Buckaroo/Payments/BancontactTest.php index 4fabc014..0ec74b7d 100644 --- a/src/Tests/Payments/BancontactTest.php +++ b/tests/Buckaroo/Payments/BancontactTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class BancontactTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/BelfiusTest.php b/tests/Buckaroo/Payments/BelfiusTest.php similarity index 95% rename from src/Tests/Payments/BelfiusTest.php rename to tests/Buckaroo/Payments/BelfiusTest.php index 9fe435a3..f98405fb 100644 --- a/src/Tests/Payments/BelfiusTest.php +++ b/tests/Buckaroo/Payments/BelfiusTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class BelfiusTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/BillinkTest.php b/tests/Buckaroo/Payments/BillinkTest.php similarity index 98% rename from src/Tests/Payments/BillinkTest.php rename to tests/Buckaroo/Payments/BillinkTest.php index 0a7910c1..34e9c128 100644 --- a/src/Tests/Payments/BillinkTest.php +++ b/tests/Buckaroo/Payments/BillinkTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class BillinkTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/BuckarooVoucherTest.php b/tests/Buckaroo/Payments/BuckarooVoucherTest.php similarity index 97% rename from src/Tests/Payments/BuckarooVoucherTest.php rename to tests/Buckaroo/Payments/BuckarooVoucherTest.php index bf2d06fd..4b103c96 100644 --- a/src/Tests/Payments/BuckarooVoucherTest.php +++ b/tests/Buckaroo/Payments/BuckarooVoucherTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class BuckarooVoucherTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/BuckarooWalletTest.php b/tests/Buckaroo/Payments/BuckarooWalletTest.php similarity index 98% rename from src/Tests/Payments/BuckarooWalletTest.php rename to tests/Buckaroo/Payments/BuckarooWalletTest.php index 18157b86..3da53e36 100644 --- a/src/Tests/Payments/BuckarooWalletTest.php +++ b/tests/Buckaroo/Payments/BuckarooWalletTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class BuckarooWalletTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/CreditClickTest.php b/tests/Buckaroo/Payments/CreditClickTest.php similarity index 95% rename from src/Tests/Payments/CreditClickTest.php rename to tests/Buckaroo/Payments/CreditClickTest.php index 0baa73cb..ab4db2d7 100644 --- a/src/Tests/Payments/CreditClickTest.php +++ b/tests/Buckaroo/Payments/CreditClickTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class CreditClickTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/CreditManagementTest.php b/tests/Buckaroo/Payments/CreditManagementTest.php similarity index 99% rename from src/Tests/Payments/CreditManagementTest.php rename to tests/Buckaroo/Payments/CreditManagementTest.php index b176bdc7..b9ee6915 100644 --- a/src/Tests/Payments/CreditManagementTest.php +++ b/tests/Buckaroo/Payments/CreditManagementTest.php @@ -18,11 +18,11 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; +use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Resources\Constants\CreditManagementInstallmentInterval; use Buckaroo\Resources\Constants\Gender; -use Buckaroo\Tests\BuckarooTestCase; class CreditManagementTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/CreditcardTest.php b/tests/Buckaroo/Payments/CreditcardTest.php similarity index 98% rename from src/Tests/Payments/CreditcardTest.php rename to tests/Buckaroo/Payments/CreditcardTest.php index b3a55602..a877af45 100644 --- a/src/Tests/Payments/CreditcardTest.php +++ b/tests/Buckaroo/Payments/CreditcardTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class CreditcardTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/EPSTest.php b/tests/Buckaroo/Payments/EPSTest.php similarity index 95% rename from src/Tests/Payments/EPSTest.php rename to tests/Buckaroo/Payments/EPSTest.php index fa529f35..dfe5beda 100644 --- a/src/Tests/Payments/EPSTest.php +++ b/tests/Buckaroo/Payments/EPSTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class EPSTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/EmandatesTest.php b/tests/Buckaroo/Payments/EmandatesTest.php similarity index 97% rename from src/Tests/Payments/EmandatesTest.php rename to tests/Buckaroo/Payments/EmandatesTest.php index 5805d387..b966198c 100644 --- a/src/Tests/Payments/EmandatesTest.php +++ b/tests/Buckaroo/Payments/EmandatesTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class EmandatesTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/GiftcardsTest.php b/tests/Buckaroo/Payments/GiftcardsTest.php similarity index 97% rename from src/Tests/Payments/GiftcardsTest.php rename to tests/Buckaroo/Payments/GiftcardsTest.php index 7e5fdf96..647303cd 100644 --- a/src/Tests/Payments/GiftcardsTest.php +++ b/tests/Buckaroo/Payments/GiftcardsTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class GiftcardsTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/GiropayTest.php b/tests/Buckaroo/Payments/GiropayTest.php similarity index 95% rename from src/Tests/Payments/GiropayTest.php rename to tests/Buckaroo/Payments/GiropayTest.php index 61ca6a88..5650a1e8 100644 --- a/src/Tests/Payments/GiropayTest.php +++ b/tests/Buckaroo/Payments/GiropayTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class GiropayTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/IdealQRTest.php b/tests/Buckaroo/Payments/IdealQRTest.php similarity index 95% rename from src/Tests/Payments/IdealQRTest.php rename to tests/Buckaroo/Payments/IdealQRTest.php index b2e76fb7..8d2791cb 100644 --- a/src/Tests/Payments/IdealQRTest.php +++ b/tests/Buckaroo/Payments/IdealQRTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class IdealQRTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/IdealTest.php b/tests/Buckaroo/Payments/IdealTest.php similarity index 97% rename from src/Tests/Payments/IdealTest.php rename to tests/Buckaroo/Payments/IdealTest.php index 0262ed38..d878510b 100644 --- a/src/Tests/Payments/IdealTest.php +++ b/tests/Buckaroo/Payments/IdealTest.php @@ -18,10 +18,10 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; +use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Config\Config; -use Buckaroo\Tests\BuckarooTestCase; class CustomConfig extends Config { diff --git a/src/Tests/Payments/In3Test.php b/tests/Buckaroo/Payments/In3Test.php similarity index 98% rename from src/Tests/Payments/In3Test.php rename to tests/Buckaroo/Payments/In3Test.php index 9d1ba572..eb818b56 100644 --- a/src/Tests/Payments/In3Test.php +++ b/tests/Buckaroo/Payments/In3Test.php @@ -18,10 +18,10 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; +use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Resources\Constants\Gender; -use Buckaroo\Tests\BuckarooTestCase; class In3Test extends BuckarooTestCase { diff --git a/src/Tests/Payments/KBCTest.php b/tests/Buckaroo/Payments/KBCTest.php similarity index 94% rename from src/Tests/Payments/KBCTest.php rename to tests/Buckaroo/Payments/KBCTest.php index 9732deb3..5fa57174 100644 --- a/src/Tests/Payments/KBCTest.php +++ b/tests/Buckaroo/Payments/KBCTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class KBCTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/KlarnaKPTest.php b/tests/Buckaroo/Payments/KlarnaKPTest.php similarity index 98% rename from src/Tests/Payments/KlarnaKPTest.php rename to tests/Buckaroo/Payments/KlarnaKPTest.php index 249be58a..867eb3ef 100644 --- a/src/Tests/Payments/KlarnaKPTest.php +++ b/tests/Buckaroo/Payments/KlarnaKPTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class KlarnaKPTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/KlarnaTest.php b/tests/Buckaroo/Payments/KlarnaTest.php similarity index 98% rename from src/Tests/Payments/KlarnaTest.php rename to tests/Buckaroo/Payments/KlarnaTest.php index dcbd16f2..91dee781 100644 --- a/src/Tests/Payments/KlarnaTest.php +++ b/tests/Buckaroo/Payments/KlarnaTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class KlarnaTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/MarketplacesTest.php b/tests/Buckaroo/Payments/MarketplacesTest.php similarity index 97% rename from src/Tests/Payments/MarketplacesTest.php rename to tests/Buckaroo/Payments/MarketplacesTest.php index 3e13e900..715f12c6 100644 --- a/src/Tests/Payments/MarketplacesTest.php +++ b/tests/Buckaroo/Payments/MarketplacesTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class MarketplacesTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/PayPerEmailTest.php b/tests/Buckaroo/Payments/PayPerEmailTest.php similarity index 97% rename from src/Tests/Payments/PayPerEmailTest.php rename to tests/Buckaroo/Payments/PayPerEmailTest.php index 5bea74ef..bc33ca93 100644 --- a/src/Tests/Payments/PayPerEmailTest.php +++ b/tests/Buckaroo/Payments/PayPerEmailTest.php @@ -18,10 +18,10 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; +use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Resources\Constants\Gender; -use Buckaroo\Tests\BuckarooTestCase; class PayPerEmailTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/PayconiqTest.php b/tests/Buckaroo/Payments/PayconiqTest.php similarity index 95% rename from src/Tests/Payments/PayconiqTest.php rename to tests/Buckaroo/Payments/PayconiqTest.php index 7a0705b4..65234815 100644 --- a/src/Tests/Payments/PayconiqTest.php +++ b/tests/Buckaroo/Payments/PayconiqTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class PayconiqTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/PaypalTest.php b/tests/Buckaroo/Payments/PaypalTest.php similarity index 97% rename from src/Tests/Payments/PaypalTest.php rename to tests/Buckaroo/Payments/PaypalTest.php index a16356cb..470bf7d9 100644 --- a/src/Tests/Payments/PaypalTest.php +++ b/tests/Buckaroo/Payments/PaypalTest.php @@ -18,10 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Resources\Constants\Gender; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class PaypalTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/PosTest.php b/tests/Buckaroo/Payments/PosTest.php similarity index 93% rename from src/Tests/Payments/PosTest.php rename to tests/Buckaroo/Payments/PosTest.php index 542e83b4..c5df6554 100644 --- a/src/Tests/Payments/PosTest.php +++ b/tests/Buckaroo/Payments/PosTest.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class PosTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/Przelewy24Test.php b/tests/Buckaroo/Payments/Przelewy24Test.php similarity index 95% rename from src/Tests/Payments/Przelewy24Test.php rename to tests/Buckaroo/Payments/Przelewy24Test.php index 246fa88d..a0a2cc58 100644 --- a/src/Tests/Payments/Przelewy24Test.php +++ b/tests/Buckaroo/Payments/Przelewy24Test.php @@ -18,9 +18,9 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Tests\BuckarooTestCase; +use Tests\Buckaroo\BuckarooTestCase; class Przelewy24Test extends BuckarooTestCase { diff --git a/src/Tests/Payments/PushTest.php b/tests/Buckaroo/Payments/PushTest.php similarity index 98% rename from src/Tests/Payments/PushTest.php rename to tests/Buckaroo/Payments/PushTest.php index b00461cc..3aab3f4d 100644 --- a/src/Tests/Payments/PushTest.php +++ b/tests/Buckaroo/Payments/PushTest.php @@ -18,11 +18,10 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\Tests\Payments; +namespace Tests\Buckaroo\Payments; -use Buckaroo\Handlers\HMAC\Generator; +use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Handlers\Reply\ReplyHandler; -use Buckaroo\Tests\BuckarooTestCase; class PushTest extends BuckarooTestCase { diff --git a/src/Tests/Payments/SepaTest.php b/tests/Buckaroo/Payments/SepaTest.php similarity index 97% rename from src/Tests/Payments/SepaTest.php rename to tests/Buckaroo/Payments/SepaTest.php index 7e069750..5a6194ac 100644 --- a/src/Tests/Payments/SepaTest.php +++ b/tests/Buckaroo/Payments/SepaTest.php @@ -1,8 +1,8 @@ Date: Thu, 23 Mar 2023 09:20:10 +0100 Subject: [PATCH 17/81] Release 1.5.0 (#97) --- CHANGELOG.md | 7 +++++++ composer.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64ef01f2..af27f97d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file. ## [Released] +## [1.5.0] +- BP-2351 Bugfix in transaction response in sub status code +- Subscription example updated. +- Github action added for PSR12 and PHPlint validation. Contributed by @avido +- iDeal QR Test updated. +- BP-2404 PHP 8.2 support + ## [1.4.0] - Fixed an issue with getting issuers for iDEAL. Reported by @reflie-nxte - Add Bancontact alias and fixing typo in method name diff --git a/composer.json b/composer.json index 3010239a..546a07d5 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.4.0", + "version": "1.5.0", "type": "library", "require": { "php": ">=7.4|^8.0", From d3ef257da31e6edc66eaf9e2e08f87a4cb327bd0 Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Fri, 7 Apr 2023 09:22:46 +0200 Subject: [PATCH 18/81] BP-2441 Added support for transaction requests without specifying a service code (#102) --- example/transactions/noservicespecified.php | 27 +++++++++++ src/BuckarooClient.php | 2 +- .../NoServiceSpecifiedPayment.php | 34 ++++++++++++++ src/PaymentMethods/PaymentFacade.php | 4 +- src/PaymentMethods/PaymentMethod.php | 5 ++- src/PaymentMethods/PaymentMethodFactory.php | 20 +++++---- .../NoServiceSpecifiedPaymentTest.php | 45 +++++++++++++++++++ 7 files changed, 124 insertions(+), 13 deletions(-) create mode 100644 example/transactions/noservicespecified.php create mode 100644 src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php create mode 100644 tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php diff --git a/example/transactions/noservicespecified.php b/example/transactions/noservicespecified.php new file mode 100644 index 00000000..7fb25973 --- /dev/null +++ b/example/transactions/noservicespecified.php @@ -0,0 +1,27 @@ +method(null)->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', + 'servicesExcludedForClient' => 'ideal', + 'continueOnIncomplete' => '1' +]); + + +//Refund +$response = $buckaroo->method(null)->refund([ + 'invoice' => '', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '', //Set transaction key of the transaction to refund + 'amountCredit' => 10.10, +]); diff --git a/src/BuckarooClient.php b/src/BuckarooClient.php index 6c20a039..964f7800 100644 --- a/src/BuckarooClient.php +++ b/src/BuckarooClient.php @@ -56,7 +56,7 @@ public function __construct(string $websiteKey, string $secretKey, string $mode * @param string $method * @return PaymentFacade */ - public function method(string $method): PaymentFacade + public function method(?string $method): PaymentFacade { return new PaymentFacade($this->client, $method); } diff --git a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php new file mode 100644 index 00000000..be63334f --- /dev/null +++ b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php @@ -0,0 +1,34 @@ +client = $client; @@ -163,7 +163,7 @@ public function paymentMethod(): PaymentMethod * @return mixed * @throws BuckarooException */ - public function __call(string $name, array $arguments) + public function __call(?string $name, array $arguments) { if (method_exists($this->paymentMethod, $name)) { diff --git a/src/PaymentMethods/PaymentMethod.php b/src/PaymentMethods/PaymentMethod.php index e458aaae..d3e5cd24 100644 --- a/src/PaymentMethods/PaymentMethod.php +++ b/src/PaymentMethods/PaymentMethod.php @@ -146,8 +146,11 @@ protected function dataRequest() * @param Model|null $model * @return $this */ - protected function setServiceList(string $action, ?Model $model = null) + protected function setServiceList(?string $action, ?Model $model = null) { + if($this->paymentName = 'noservice'){ + return; + } $serviceList = new ServiceList($this->paymentName(), $this->serviceVersion(), $action, $model); $this->request->getServices()->pushServiceList($serviceList); diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 00dc9ee4..ae9817df 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -46,6 +46,7 @@ use Buckaroo\PaymentMethods\KlarnaKP\KlarnaKP; use Buckaroo\PaymentMethods\KlarnaPay\KlarnaPay; use Buckaroo\PaymentMethods\Marketplaces\Marketplaces; +use Buckaroo\PaymentMethods\NoServiceSpecifiedPayment\NoServiceSpecifiedPayment; use Buckaroo\PaymentMethods\Payconiq\Payconiq; use Buckaroo\PaymentMethods\Paypal\Paypal; use Buckaroo\PaymentMethods\PayPerEmail\PayPerEmail; @@ -101,6 +102,7 @@ class PaymentMethodFactory Sofort::class => ['sofort', 'sofortueberweisung'], Tinka::class => ['tinka'], Marketplaces::class => ['marketplaces'], + NoServiceSpecifiedPayment::class => ['noservice'], Payconiq::class => ['payconiq'], Przelewy24::class => ['przelewy24'], PointOfSale::class => ['pospayment'], @@ -135,7 +137,7 @@ class PaymentMethodFactory * @param Client $client * @param string $paymentMethod */ - public function __construct(Client $client, string $paymentMethod) + public function __construct(Client $client, ?string $paymentMethod) { $this->client = $client; $this->paymentMethod = strtolower($paymentMethod); @@ -146,15 +148,15 @@ public function __construct(Client $client, string $paymentMethod) */ public function getPaymentMethod(): PaymentMethod { - foreach (self::$payments as $class => $alias) - { - if (in_array($this->paymentMethod, $alias)) - { - return new $class($this->client, $this->paymentMethod); + if ($this->paymentMethod) { + foreach (self::$payments as $class => $alias) { + if (in_array($this->paymentMethod, $alias)) { + return new $class($this->client, $this->paymentMethod); + } } + throw new BuckarooException($this->client->config()->getLogger(), "Wrong payment method code has been given"); } - - throw new BuckarooException($this->client->config()->getLogger(), "Wrong payment method code has been given"); + return new NoServiceSpecifiedPayment($this->client, $this->paymentMethod); } /** @@ -162,7 +164,7 @@ public function getPaymentMethod(): PaymentMethod * @param string $paymentMethod * @return PaymentMethod */ - public static function get(Client $client, string $paymentMethod): PaymentMethod + public static function get(Client $client, ?string $paymentMethod): PaymentMethod { $factory = new self($client, $paymentMethod); diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php new file mode 100644 index 00000000..397e7c12 --- /dev/null +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -0,0 +1,45 @@ +paymentPayload = ([ + 'amountDebit' => 10, + 'invoice' => uniqid(), + 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', + 'servicesExcludedForClient' => 'ideal', + 'continueOnIncomplete' => '1', + ]); + } + /** + * @test + */ + public function it_creates_a_noservice_payment() + { + $response = $this->buckaroo->method(null)->pay($this->paymentPayload); + $this->assertTrue($response->isWaitingOnUserInput()); + } +} From 5bf7acc7bd660a6bbd202b5c449f611f0715294f Mon Sep 17 00:00:00 2001 From: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Date: Fri, 7 Apr 2023 12:24:25 +0500 Subject: [PATCH 19/81] Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb674e58..e0123a39 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ $buckaroo->method('creditcard') // Input the desire payment method. After you create a transaction, you can retrieve several transaction information on demand. ```php -# Create a new payment +# Retrieve transaction information $transaction = $buckaroo->transaction('YOUR-TRANSACTION-KEY') $transaction->status(); // Retrieve transaction status From 0b1871ac585ccdab547061db0cb0a7c631b5e01e Mon Sep 17 00:00:00 2001 From: vegim carkaxhija Date: Wed, 12 Apr 2023 10:22:22 +0200 Subject: [PATCH 20/81] created new PayablePaymentMethod for when no service is specified --- src/PaymentMethods/PayablePaymentMethod.php | 11 +++++++++++ src/PaymentMethods/PaymentFacade.php | 1 + src/PaymentMethods/PaymentMethod.php | 5 +---- .../Payments/NoServiceSpecifiedPaymentTest.php | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/PaymentMethods/PayablePaymentMethod.php b/src/PaymentMethods/PayablePaymentMethod.php index f19fb9d8..b40982df 100644 --- a/src/PaymentMethods/PayablePaymentMethod.php +++ b/src/PaymentMethods/PayablePaymentMethod.php @@ -52,6 +52,17 @@ public function pay(?Model $model = null) return $this->postRequest(); } + /** + * @param Model|null $model + * @return PayablePaymentMethod|mixed + */ + public function payNoService(?Model $model = null) + { + $this->setPayPayload(); + + return $this->postRequest(); + } + /** * @param Model|null $model * @return PayablePaymentMethod|mixed diff --git a/src/PaymentMethods/PaymentFacade.php b/src/PaymentMethods/PaymentFacade.php index 9096a1d6..538625db 100644 --- a/src/PaymentMethods/PaymentFacade.php +++ b/src/PaymentMethods/PaymentFacade.php @@ -28,6 +28,7 @@ /** * @method TransactionResponse pay(array $data) + * @method TransactionResponse payNoService(array $data) * @method TransactionResponse refund(array $data) * @method TransactionResponse payRecurrent(array $data) * @method TransactionResponse extraInfo(array $data) diff --git a/src/PaymentMethods/PaymentMethod.php b/src/PaymentMethods/PaymentMethod.php index d3e5cd24..e458aaae 100644 --- a/src/PaymentMethods/PaymentMethod.php +++ b/src/PaymentMethods/PaymentMethod.php @@ -146,11 +146,8 @@ protected function dataRequest() * @param Model|null $model * @return $this */ - protected function setServiceList(?string $action, ?Model $model = null) + protected function setServiceList(string $action, ?Model $model = null) { - if($this->paymentName = 'noservice'){ - return; - } $serviceList = new ServiceList($this->paymentName(), $this->serviceVersion(), $action, $model); $this->request->getServices()->pushServiceList($serviceList); diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index 397e7c12..51ca1004 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -22,7 +22,7 @@ use Tests\Buckaroo\BuckarooTestCase; -class NoServiceSpecifiedTest extends BuckarooTestCase +class NoServiceSpecifiedPaymentTest extends BuckarooTestCase { protected function setUp(): void { @@ -39,7 +39,7 @@ protected function setUp(): void */ public function it_creates_a_noservice_payment() { - $response = $this->buckaroo->method(null)->pay($this->paymentPayload); + $response = $this->buckaroo->method(null)->payNoService($this->paymentPayload); $this->assertTrue($response->isWaitingOnUserInput()); } } From 8ed0bdc5ba31688725bd947aec542943193d6e4e Mon Sep 17 00:00:00 2001 From: vegim carkaxhija Date: Wed, 12 Apr 2023 11:02:20 +0200 Subject: [PATCH 21/81] fix style --- .../NoServiceSpecifiedPayment.php | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php index be63334f..712f8ff1 100644 --- a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php +++ b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php @@ -1,34 +1,34 @@ - Date: Wed, 12 Apr 2023 11:06:30 +0200 Subject: [PATCH 22/81] Minor fixes --- src/PaymentMethods/PaymentMethodFactory.php | 4 ++-- .../Payments/NoServiceSpecifiedPaymentTest.php | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index ae9817df..0c029a13 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -131,7 +131,7 @@ class PaymentMethodFactory /** * @var string */ - private string $paymentMethod; + private ?string $paymentMethod; /** * @param Client $client @@ -140,7 +140,7 @@ class PaymentMethodFactory public function __construct(Client $client, ?string $paymentMethod) { $this->client = $client; - $this->paymentMethod = strtolower($paymentMethod); + $this->paymentMethod = ($paymentMethod)? strtolower($paymentMethod) : null; } /** diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index 51ca1004..e471d5d1 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -24,22 +24,19 @@ class NoServiceSpecifiedPaymentTest extends BuckarooTestCase { - protected function setUp(): void + /** + * @test + */ + public function it_creates_a_noservice_payment() { - $this->paymentPayload = ([ + $response = $this->buckaroo->method(null)->pay([ 'amountDebit' => 10, 'invoice' => uniqid(), 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', 'servicesExcludedForClient' => 'ideal', 'continueOnIncomplete' => '1', ]); - } - /** - * @test - */ - public function it_creates_a_noservice_payment() - { - $response = $this->buckaroo->method(null)->payNoService($this->paymentPayload); + $this->assertTrue($response->isWaitingOnUserInput()); } } From be8e919d298a2db0301f350464fb7c33a07a1790 Mon Sep 17 00:00:00 2001 From: vegim carkaxhija Date: Wed, 12 Apr 2023 11:08:08 +0200 Subject: [PATCH 23/81] update phpdoc, and fix Line exceeds 120 characters --- src/PaymentMethods/PaymentMethodFactory.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index ae9817df..01e6ab15 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -135,7 +135,7 @@ class PaymentMethodFactory /** * @param Client $client - * @param string $paymentMethod + * @param string|null $paymentMethod */ public function __construct(Client $client, ?string $paymentMethod) { @@ -145,6 +145,7 @@ public function __construct(Client $client, ?string $paymentMethod) /** * @return PaymentMethod + * @throws BuckarooException */ public function getPaymentMethod(): PaymentMethod { @@ -154,15 +155,19 @@ public function getPaymentMethod(): PaymentMethod return new $class($this->client, $this->paymentMethod); } } - throw new BuckarooException($this->client->config()->getLogger(), "Wrong payment method code has been given"); + throw new BuckarooException( + $this->client->config()->getLogger(), + "Wrong payment method code has been given" + ); } return new NoServiceSpecifiedPayment($this->client, $this->paymentMethod); } /** * @param Client $client - * @param string $paymentMethod + * @param string|null $paymentMethod * @return PaymentMethod + * @throws BuckarooException */ public static function get(Client $client, ?string $paymentMethod): PaymentMethod { From 4e67787270e325c68d1267820131ae1ed6d6468a Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 12 Apr 2023 11:10:47 +0200 Subject: [PATCH 24/81] Remove method paynoservice --- .../NoServiceSpecifiedPayment.php | 7 +++++++ src/PaymentMethods/PayablePaymentMethod.php | 11 ----------- src/PaymentMethods/PaymentFacade.php | 1 - 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php index 712f8ff1..2b3f746d 100644 --- a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php +++ b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php @@ -31,4 +31,11 @@ class NoServiceSpecifiedPayment extends PayablePaymentMethod implements Combinable { protected string $paymentName = 'noservice'; + + public function pay(?Model $model = null) + { + $this->setPayPayload(); + + return $this->postRequest(); + } } diff --git a/src/PaymentMethods/PayablePaymentMethod.php b/src/PaymentMethods/PayablePaymentMethod.php index b40982df..f19fb9d8 100644 --- a/src/PaymentMethods/PayablePaymentMethod.php +++ b/src/PaymentMethods/PayablePaymentMethod.php @@ -52,17 +52,6 @@ public function pay(?Model $model = null) return $this->postRequest(); } - /** - * @param Model|null $model - * @return PayablePaymentMethod|mixed - */ - public function payNoService(?Model $model = null) - { - $this->setPayPayload(); - - return $this->postRequest(); - } - /** * @param Model|null $model * @return PayablePaymentMethod|mixed diff --git a/src/PaymentMethods/PaymentFacade.php b/src/PaymentMethods/PaymentFacade.php index 538625db..9096a1d6 100644 --- a/src/PaymentMethods/PaymentFacade.php +++ b/src/PaymentMethods/PaymentFacade.php @@ -28,7 +28,6 @@ /** * @method TransactionResponse pay(array $data) - * @method TransactionResponse payNoService(array $data) * @method TransactionResponse refund(array $data) * @method TransactionResponse payRecurrent(array $data) * @method TransactionResponse extraInfo(array $data) From 8758d534860340539459a37fec60980901c3f8eb Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 14 Apr 2023 15:57:32 +0200 Subject: [PATCH 25/81] Inlcude monolog version 3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a474b32f..6ef113e0 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "ext-json": "*", "ext-pcre": "*", "ext-fileinfo": "*", - "monolog/monolog": "^2.2", + "monolog/monolog": "^2.2|^3", "guzzlehttp/guzzle": "^7.0", "composer/ca-bundle": "^1.3", "ramsey/uuid": "^3.9.7" From 6871cabd630acf89c1c6f6d95efacb57c567c2af Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 14 Apr 2023 15:59:11 +0200 Subject: [PATCH 26/81] Include ramsey version 4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6ef113e0..ccd1f129 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "monolog/monolog": "^2.2|^3", "guzzlehttp/guzzle": "^7.0", "composer/ca-bundle": "^1.3", - "ramsey/uuid": "^3.9.7" + "ramsey/uuid": "^3.9.7|^4" }, "require-dev": { "squizlabs/php_codesniffer": "3.*", From 5ea6d83e6fd8555064babddd0b7f0d03de2696f9 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 28 Apr 2023 13:58:49 +0200 Subject: [PATCH 27/81] Add missing property --- src/Exceptions/BuckarooException.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Exceptions/BuckarooException.php b/src/Exceptions/BuckarooException.php index 0e9f5694..0eba822a 100644 --- a/src/Exceptions/BuckarooException.php +++ b/src/Exceptions/BuckarooException.php @@ -32,6 +32,9 @@ class BuckarooException extends Exception * @param int $code * @param Throwable|null $previous */ + + protected ?Subject $logger; + public function __construct(?Subject $logger, string $message = "", int $code = 0, Throwable $previous = null) { $message = $this->message($message); From a6763d7cac413d871a0ca339b76c3a248474d22d Mon Sep 17 00:00:00 2001 From: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Date: Tue, 16 May 2023 13:40:54 +0300 Subject: [PATCH 28/81] Add PayRemainder in KlarnaPay (#112) --- src/PaymentMethods/KlarnaPay/KlarnaPay.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/PaymentMethods/KlarnaPay/KlarnaPay.php b/src/PaymentMethods/KlarnaPay/KlarnaPay.php index 2741c35b..3f0e564d 100644 --- a/src/PaymentMethods/KlarnaPay/KlarnaPay.php +++ b/src/PaymentMethods/KlarnaPay/KlarnaPay.php @@ -59,4 +59,13 @@ public function payInInstallments(): TransactionResponse return $this->postRequest(); } + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function payRemainder(?Model $model = null): TransactionResponse + { + return parent::payRemainder($model ?? new Pay($this->payload)); + } } From 07e0c70a4b39253d7cae9bf29f88300e09e7226c Mon Sep 17 00:00:00 2001 From: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Date: Tue, 23 May 2023 13:18:43 +0300 Subject: [PATCH 29/81] Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq --- src/PaymentMethods/Afterpay/Afterpay.php | 9 +++++++++ src/PaymentMethods/Alipay/Alipay.php | 9 +++++++++ src/PaymentMethods/Paypal/Paypal.php | 9 +++++++++ src/PaymentMethods/Przelewy24/Przelewy24.php | 9 +++++++++ src/PaymentMethods/Trustly/Trustly.php | 9 +++++++++ 5 files changed, 45 insertions(+) diff --git a/src/PaymentMethods/Afterpay/Afterpay.php b/src/PaymentMethods/Afterpay/Afterpay.php index 3acdd554..666e91f5 100644 --- a/src/PaymentMethods/Afterpay/Afterpay.php +++ b/src/PaymentMethods/Afterpay/Afterpay.php @@ -94,4 +94,13 @@ public function refund(?Model $model = null): TransactionResponse { return parent::refund($model ?? new Refund($this->payload)); } + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function payRemainder(?Model $model = null): TransactionResponse + { + return parent::payRemainder($model ?? new Pay($this->payload)); + } } diff --git a/src/PaymentMethods/Alipay/Alipay.php b/src/PaymentMethods/Alipay/Alipay.php index 423c0988..3fa388d7 100644 --- a/src/PaymentMethods/Alipay/Alipay.php +++ b/src/PaymentMethods/Alipay/Alipay.php @@ -40,4 +40,13 @@ public function pay(?Model $model = null): TransactionResponse { return parent::pay($model ?? new Pay($this->payload)); } + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function payRemainder(?Model $model = null): TransactionResponse + { + return parent::payRemainder($model ?? new Pay($this->payload)); + } } diff --git a/src/PaymentMethods/Paypal/Paypal.php b/src/PaymentMethods/Paypal/Paypal.php index 2ec73266..19c34276 100644 --- a/src/PaymentMethods/Paypal/Paypal.php +++ b/src/PaymentMethods/Paypal/Paypal.php @@ -70,4 +70,13 @@ public function extraInfo() return $this->postRequest(); } + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function payRemainder(?Model $model = null): TransactionResponse + { + return parent::payRemainder($model ?? new Pay($this->payload)); + } } diff --git a/src/PaymentMethods/Przelewy24/Przelewy24.php b/src/PaymentMethods/Przelewy24/Przelewy24.php index e61a07be..a1ec0dfb 100644 --- a/src/PaymentMethods/Przelewy24/Przelewy24.php +++ b/src/PaymentMethods/Przelewy24/Przelewy24.php @@ -40,4 +40,13 @@ public function pay(?Model $model = null): TransactionResponse { return parent::pay($model ?? new Pay($this->payload)); } + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function payRemainder(?Model $model = null): TransactionResponse + { + return parent::payRemainder($model ?? new Pay($this->payload)); + } } diff --git a/src/PaymentMethods/Trustly/Trustly.php b/src/PaymentMethods/Trustly/Trustly.php index 1082d855..bafe3891 100644 --- a/src/PaymentMethods/Trustly/Trustly.php +++ b/src/PaymentMethods/Trustly/Trustly.php @@ -34,4 +34,13 @@ public function pay(?Model $model = null): TransactionResponse { return parent::pay($model ?? new PayAdapter(new Pay($this->payload))); } + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function payRemainder(?Model $model = null): TransactionResponse + { + return parent::payRemainder($model ?? new Pay($this->payload)); + } } From 91426e399ab8935d8151ead0855285620cb27435 Mon Sep 17 00:00:00 2001 From: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Date: Tue, 23 May 2023 12:23:56 +0200 Subject: [PATCH 30/81] BP-2509 Add Instant refunds,no service payment refactor (#109) --- src/BuckarooClient.php | 2 +- .../NoServiceSpecifiedPayment.php | 77 +++++++++---------- src/PaymentMethods/PayablePaymentMethod.php | 1 - src/PaymentMethods/Payconiq/Payconiq.php | 15 ++++ src/PaymentMethods/PaymentMethod.php | 2 +- src/PaymentMethods/Sofort/Sofort.php | 15 ++++ src/PaymentMethods/iDeal/iDeal.php | 13 ++++ .../NoServiceSpecifiedPaymentTest.php | 1 - 8 files changed, 81 insertions(+), 45 deletions(-) diff --git a/src/BuckarooClient.php b/src/BuckarooClient.php index 964f7800..fb891446 100644 --- a/src/BuckarooClient.php +++ b/src/BuckarooClient.php @@ -56,7 +56,7 @@ public function __construct(string $websiteKey, string $secretKey, string $mode * @param string $method * @return PaymentFacade */ - public function method(?string $method): PaymentFacade + public function method(string $method = null): PaymentFacade { return new PaymentFacade($this->client, $method); } diff --git a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php index 2b3f746d..b550c708 100644 --- a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php +++ b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php @@ -1,41 +1,36 @@ -setPayPayload(); - - return $this->postRequest(); - } -} +validate(); - return $this->postRequest(); } diff --git a/src/PaymentMethods/Payconiq/Payconiq.php b/src/PaymentMethods/Payconiq/Payconiq.php index 451a37d2..61a3bc21 100644 --- a/src/PaymentMethods/Payconiq/Payconiq.php +++ b/src/PaymentMethods/Payconiq/Payconiq.php @@ -20,10 +20,25 @@ namespace Buckaroo\PaymentMethods\Payconiq; +use Buckaroo\Models\Model; use Buckaroo\PaymentMethods\Interfaces\Combinable; use Buckaroo\PaymentMethods\PayablePaymentMethod; +use Buckaroo\Transaction\Response\TransactionResponse; class Payconiq extends PayablePaymentMethod implements Combinable { protected string $paymentName = 'payconiq'; + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function instantRefund(?Model $model = null):TransactionResponse + { + $this->setRefundPayload(); + + $this->setServiceList('instantRefund', $model); + + return $this->postRequest(); + } } diff --git a/src/PaymentMethods/PaymentMethod.php b/src/PaymentMethods/PaymentMethod.php index e458aaae..95809628 100644 --- a/src/PaymentMethods/PaymentMethod.php +++ b/src/PaymentMethods/PaymentMethod.php @@ -146,7 +146,7 @@ protected function dataRequest() * @param Model|null $model * @return $this */ - protected function setServiceList(string $action, ?Model $model = null) + protected function setServiceList(?string $action, ?Model $model = null): PaymentMethod { $serviceList = new ServiceList($this->paymentName(), $this->serviceVersion(), $action, $model); diff --git a/src/PaymentMethods/Sofort/Sofort.php b/src/PaymentMethods/Sofort/Sofort.php index 99e158e3..f595d89d 100644 --- a/src/PaymentMethods/Sofort/Sofort.php +++ b/src/PaymentMethods/Sofort/Sofort.php @@ -22,11 +22,26 @@ namespace Buckaroo\PaymentMethods\Sofort; +use Buckaroo\Models\Model; use Buckaroo\PaymentMethods\Interfaces\Combinable; use Buckaroo\PaymentMethods\PayablePaymentMethod; +use Buckaroo\Transaction\Response\TransactionResponse; class Sofort extends PayablePaymentMethod implements Combinable { protected string $paymentName = 'sofortueberweisung'; protected int $serviceVersion = 1; + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function instantRefund(?Model $model = null):TransactionResponse + { + $this->setRefundPayload(); + + $this->setServiceList('instantRefund', $model); + + return $this->postRequest(); + } } diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index 0365cd8f..29b3b728 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -57,6 +57,19 @@ public function payRemainder(?Model $model = null): TransactionResponse return parent::payRemainder($model ?? new Pay($this->payload)); } + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function instantRefund(?Model $model = null):TransactionResponse + { + $this->setRefundPayload(); + + $this->setServiceList('instantRefund', $model); + + return $this->postRequest(); + } + /** * @return array * @throws \Buckaroo\Exceptions\BuckarooException diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index e471d5d1..94ea5f67 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -36,7 +36,6 @@ public function it_creates_a_noservice_payment() 'servicesExcludedForClient' => 'ideal', 'continueOnIncomplete' => '1', ]); - $this->assertTrue($response->isWaitingOnUserInput()); } } From c6c0765226eeeeff1f1d3813f527648de9bd47b5 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 23 May 2023 15:37:52 +0200 Subject: [PATCH 31/81] BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix --- .gitignore | 2 + .php-cs-fixer.cache | 1 - .php-cs-fixer.dist.php => .php-cs-fixer.php | 4 + example/transactions/noservicespecified.php | 54 ++++++------ src/BuckarooClient.php | 13 +++ src/Handlers/Credentials.php | 3 +- src/PaymentMethods/BatchTransactions.php | 41 +++++++++ .../NoServiceSpecifiedPayment.php | 83 ++++++++++-------- src/PaymentMethods/PaymentMethod.php | 5 ++ src/PaymentMethods/PaymentMethodFactory.php | 11 ++- src/PaymentMethods/iDeal/iDeal.php | 5 +- src/Transaction/Client.php | 26 ++++++ src/Transaction/Request/BatchRequest.php | 34 ++++++++ .../Request/HttpClient/HttpClientGuzzle.php | 3 +- src/Transaction/Request/Request.php | 3 +- tests/Buckaroo/Payments/BatchTest.php | 85 +++++++++++++++++++ 16 files changed, 301 insertions(+), 72 deletions(-) delete mode 100644 .php-cs-fixer.cache rename .php-cs-fixer.dist.php => .php-cs-fixer.php (86%) create mode 100644 src/PaymentMethods/BatchTransactions.php create mode 100644 src/Transaction/Request/BatchRequest.php create mode 100644 tests/Buckaroo/Payments/BatchTest.php diff --git a/.gitignore b/.gitignore index e1ce02c8..6e5adff6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ example/logs .phpunit.result.cache logs/ + +.php-cs-fixer.cache diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache deleted file mode 100644 index 5c8d2e10..00000000 --- a/.php-cs-fixer.cache +++ /dev/null @@ -1 +0,0 @@ -{"php":"8.2.4","version":"3.15.1:v3.15.1#d48755372a113bddb99f749e34805d83f3acfe04","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":{"allow_single_line_closure":false,"position_after_functions_and_oop_constructs":"next","position_after_anonymous_constructs":"next","position_after_control_structures":"next"},"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sort_algorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true,"single_trait_insert_per_statement":true},"hashes":{"src\/BuckarooClient.php":"a04feed78f40b502363053f348a95d42","src\/Config\/Config.php":"3049e56bf3e3a3f2b947f4a18cded93a","src\/Config\/DefaultConfig.php":"ff088b4e5124f40155cc198401134378","src\/Exceptions\/BuckarooException.php":"d2544fdaa34bf1de4d51630f8d9cc5a9","src\/Exceptions\/TransferException.php":"d6d7bc200cb3e9697368e423c2dfacd5","src\/Handlers\/Credentials.php":"72547a0871ef078f61217d9c387e8bf6","src\/Handlers\/HMAC\/Generator.php":"285cbc96e2eb0a709b1d541602257cae","src\/Handlers\/HMAC\/Hmac.php":"18f9016e7c5aea3a0b692d20723940a7","src\/Handlers\/HMAC\/Validator.php":"75a5227ff35b94611b9799121e026abc","src\/Handlers\/Logging\/DefaultLogger.php":"91e9a8fa50a5770f092be6a546f4f179","src\/Handlers\/Logging\/Loggable.php":"f4b7e8704cbbe37d9c354801bebbfc59","src\/Handlers\/Logging\/Observer.php":"060d6e5806f7d7e16004d03cab986d37","src\/Handlers\/Logging\/Observers\/ErrorReporter.php":"7ec7da9e92f3b23b4c5d4efce8d86bd9","src\/Handlers\/Logging\/Observers\/Monolog.php":"e7d485dc3bc8bb26769249749e590f27","src\/Handlers\/Logging\/Subject.php":"3d67799142a50aab2eef4e24219cb74e","src\/Handlers\/Reply\/HttpPost.php":"4e0f9906ba5d6cdd307ebfadee255542","src\/Handlers\/Reply\/Json.php":"c9843468bfb3433c27fcd733d659e28a","src\/Handlers\/Reply\/ReplyHandler.php":"845bd35eb1b47207345d1407b83e1266","src\/Handlers\/Reply\/ReplyStrategy.php":"5bab082004f01d9950a9bc1ff468cd69","src\/Models\/Adapters\/ServiceParametersKeysAdapter.php":"b9ba2ebeed2dcfc47dac37dca6f3546c","src\/Models\/AdditionalParameters.php":"4971bbecdfda4aafd081ff5dbc1e3dd0","src\/Models\/Address.php":"ceeab777c91d46aeae2d4e7ab5d7df99","src\/Models\/Article.php":"aa20190c5a3dd2ff6ae169268a2d34e0","src\/Models\/BankAccount.php":"e82a08360df8697c9e059178a7c8fbd8","src\/Models\/ClientIP.php":"e19df1c3fe6357c96c26e2f8ff1e5e29","src\/Models\/Company.php":"d47ad3497173c8fc6fb6fc3daa73aec9","src\/Models\/Debtor.php":"3e6ab2b25de1e477d44bfb1165913366","src\/Models\/Email.php":"982763a72eb2935b8a9b3e9982ed72ca","src\/Models\/Interfaces\/Recipient.php":"85589ae85ccc2fdeecc18b3b2a0fdcbb","src\/Models\/Model.php":"2c7d00151866c93051e081a74097bd88","src\/Models\/Payload\/PayPayload.php":"cca5ff8b604ae2aa749b6b3dfabbaf82","src\/Models\/Payload\/Payload.php":"cf211d0785d48099c6daf8e78813029b","src\/Models\/Payload\/RefundPayload.php":"50ca2b6fadd6d1dfc1af85e4e475a551","src\/Models\/Person.php":"da9fce2330f7dbe81553cdf6a6ff5474","src\/Models\/Phone.php":"1a9f7c4872419d316fdebb2703f658a8","src\/Models\/ServiceList.php":"e51064ef8722035a1af8577f1cdb29dc","src\/Models\/ServiceParameter.php":"dafc671a780a47388f2cf6067b9c08ce","src\/Models\/Services.php":"953ba8de24fdf96f25f87a19439528d4","src\/PaymentMethods\/Afterpay\/Afterpay.php":"5220a26153046c35a71c5f9544a8c07c","src\/PaymentMethods\/Afterpay\/Models\/Article.php":"1101df36002c534b8194c8f38b5f359c","src\/PaymentMethods\/Afterpay\/Models\/Pay.php":"e8d7f0818eb7078a61ca31056c8c1394","src\/PaymentMethods\/Afterpay\/Models\/Person.php":"400ed6119966980ff0c48ca7e75702c6","src\/PaymentMethods\/Afterpay\/Models\/Recipient.php":"1da6ea525690661c2237ab21382ed19e","src\/PaymentMethods\/Afterpay\/Models\/Refund.php":"bc0c928de027bd2c3eca4ad997d2ed10","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/AddressAdapter.php":"692191fd233a1ea93b3dea94a8b4a9d1","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/ArticleAdapter.php":"c9cf7fac3e8bd7554fb773180301ddfe","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/PhoneAdapter.php":"5a13e983066abe460ae4831cabe1c428","src\/PaymentMethods\/Afterpay\/Service\/ParameterKeys\/RecipientAdapter.php":"9ce22d14bc2d17220e3f5765720f713a","src\/PaymentMethods\/AfterpayDigiAccept\/AfterpayDigiAccept.php":"a17f362fc17716edaf11c5e6c2f1dc8f","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Pay.php":"59cb734c920506b03f62bd89b9590554","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Recipient.php":"049301de1c6a4ca82cba08830ff04eb0","src\/PaymentMethods\/AfterpayDigiAccept\/Models\/Refund.php":"0453cf9fdd07cd1ff5cb68feac2cc2c1","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/AddressAdapter.php":"81ac818062aaf5e4aca0deaef2d0f17c","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/ArticleAdapter.php":"54cb4aa29bbfa9d13250d7c90069eab0","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/EmailAdapter.php":"607a333d0355446d5b2bb5d78d2648af","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/PhoneAdapter.php":"e025168a23f2bc4033e4f08669604ee7","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/RecipientAdapter.php":"9f932e8753a8dd4bb8e2a4c5a5b4be9b","src\/PaymentMethods\/AfterpayDigiAccept\/Service\/ParameterKeys\/ServiceAdapter.php":"bc34e01a54c01929cda40c8bac36de03","src\/PaymentMethods\/Alipay\/Alipay.php":"dd908e596902c85130e0e4920da04272","src\/PaymentMethods\/Alipay\/Models\/Pay.php":"fb9572ebd5464e8a006c0681a452e951","src\/PaymentMethods\/ApplePay\/ApplePay.php":"877e953b5326ffa57f75dbe34496c185","src\/PaymentMethods\/ApplePay\/Models\/Pay.php":"3b614359549f91062e646ab56f436490","src\/PaymentMethods\/ApplePay\/Models\/PayPayload.php":"c676ee7ee1bcc1907a04a27f9e2ac160","src\/PaymentMethods\/Bancontact\/Bancontact.php":"bc5b720c1f4304c1319f48a757c6688f","src\/PaymentMethods\/Bancontact\/Models\/Authenticate.php":"62906afe0a165a35651eb394b951193d","src\/PaymentMethods\/Bancontact\/Models\/Pay.php":"8fc9760c4052b60eb79d5ffa3b0ae69b","src\/PaymentMethods\/Bancontact\/Models\/PayEncrypted.php":"f0f4283c57c8ab2bb06e5f5950f8e643","src\/PaymentMethods\/BankTransfer\/BankTransfer.php":"15b6812b9c8cc34f2d81aaa685c99f5d","src\/PaymentMethods\/BankTransfer\/Models\/Pay.php":"991cff07b81d31ad98343c9ccf674510","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/CustomerAdapter.php":"6c859ee4db8fc7fa505e5e7987da5977","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/EmailAdapter.php":"cdbdc24a8503270b046be3553bfe4583","src\/PaymentMethods\/BankTransfer\/Service\/ParameterKeys\/PayAdapter.php":"ae9149be34d4d0912b490722b6756e86","src\/PaymentMethods\/Belfius\/Belfius.php":"6d0514225d9c9f5281900d7bc53e704c","src\/PaymentMethods\/Billink\/Billink.php":"adb3e9af9aea69f6ed8c2d0f8ecc280b","src\/PaymentMethods\/Billink\/Models\/Article.php":"ed916bb29315a44950f44604b5a6b399","src\/PaymentMethods\/Billink\/Models\/Capture.php":"d78606a9918a5925ed15a11cc29df1f6","src\/PaymentMethods\/Billink\/Models\/Pay.php":"74e1561269fdf63a24a696cb0de0c5fb","src\/PaymentMethods\/Billink\/Models\/Recipient.php":"39b57b32e18e6069844aad09f92b0f43","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/AddressAdapter.php":"8de6d09943d0621affdda7e724708274","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/ArticleAdapter.php":"4f5d6145f7becd1ed27ca33f22077397","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/PhoneAdapter.php":"0edca59d6e4c151f1c85fe465c6ef3bd","src\/PaymentMethods\/Billink\/Service\/ParameterKeys\/RecipientAdapter.php":"105fa7a29317a0b80f1a8b9b119c5fc1","src\/PaymentMethods\/BuckarooVoucher\/BuckarooVoucher.php":"b181c9e03dd924b899cac175e8c15259","src\/PaymentMethods\/BuckarooVoucher\/Models\/Create.php":"255d4fa0461244cad9aa4435ccb7e43c","src\/PaymentMethods\/BuckarooVoucher\/Models\/CreatePayload.php":"42913f90c793c2ed1b27fc855fae68c8","src\/PaymentMethods\/BuckarooVoucher\/Models\/Deactivate.php":"96bed609390d0ecb3dd8a94dd9ba240b","src\/PaymentMethods\/BuckarooVoucher\/Models\/GetBalance.php":"65b690ff91464e3898d3d960467c6690","src\/PaymentMethods\/BuckarooVoucher\/Models\/Pay.php":"e39a2921209a5c4ec9f5649dd3c4ac50","src\/PaymentMethods\/BuckarooWallet\/BuckarooWallet.php":"ef5b362c63a5fde93fa3281690c79c41","src\/PaymentMethods\/BuckarooWallet\/Models\/DepositReservePayload.php":"c57b8f8352bc2b4eac33fa49d8416958","src\/PaymentMethods\/BuckarooWallet\/Models\/ReleasePayload.php":"e31a198d3046222442855a7ec111d9ef","src\/PaymentMethods\/BuckarooWallet\/Models\/Wallet.php":"fd1d7d36ea9c27bc6da65aadb2d48a38","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/BankAccountAdapter.php":"3a433e884d2b0d755f469a20861a6430","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/CustomerAdapter.php":"303e6c1671897d735dd113cc4166af1d","src\/PaymentMethods\/BuckarooWallet\/Service\/ParameterKeys\/EmailAdapter.php":"703b17e3e3fcb9175aab78ce7d317ef7","src\/PaymentMethods\/CreditCard\/CreditCard.php":"8430cd30423a606b9a9b8b5f9663762b","src\/PaymentMethods\/CreditCard\/Models\/CardData.php":"df7536390b7b2b7a63903a0ff3d24069","src\/PaymentMethods\/CreditCard\/Models\/SecurityCode.php":"d9a6a20c5ca807629e3b4a1877446132","src\/PaymentMethods\/CreditClick\/CreditClick.php":"9e5484352aa2b73cbf5ece5e238d826f","src\/PaymentMethods\/CreditClick\/Models\/Pay.php":"8e8763e5fdf905c1c58e689fc96a77d0","src\/PaymentMethods\/CreditClick\/Models\/Refund.php":"82ec73b5892602d35c0321150ec499b7","src\/PaymentMethods\/CreditClick\/Service\/ParameterKeys\/CustomerAdapter.php":"7f94f0737428a95fde806eec14d2be5d","src\/PaymentMethods\/CreditManagement\/CreditManagement.php":"2bb0a0507d143bc8d42ea4c6cb523f92","src\/PaymentMethods\/CreditManagement\/Models\/AddOrUpdateProductLines.php":"5275167ba0256eb6e0aeffe0f6ade3a5","src\/PaymentMethods\/CreditManagement\/Models\/Article.php":"61b8495754e71a08c69f4aa5267c5e0b","src\/PaymentMethods\/CreditManagement\/Models\/CreditNote.php":"386def7c4e3295db852923423ac99b9b","src\/PaymentMethods\/CreditManagement\/Models\/Debtor.php":"611fdd1a517f779701709420e7b0866e","src\/PaymentMethods\/CreditManagement\/Models\/DebtorFile.php":"59f4fe33c0156a68fb9153b492a3c824","src\/PaymentMethods\/CreditManagement\/Models\/DebtorInfo.php":"f78fdb63e146972a09975a234b7e1d44","src\/PaymentMethods\/CreditManagement\/Models\/Invoice.php":"6a0c3c9d3f6149bcdd5b7f5cd20f6170","src\/PaymentMethods\/CreditManagement\/Models\/MultipleInvoiceInfo.php":"e8b87aa2fcbd7357f0cea6ef05f4f0f0","src\/PaymentMethods\/CreditManagement\/Models\/PaymentPlan.php":"1e1c12e66f2091ba9a65090364ad62dd","src\/PaymentMethods\/CreditManagement\/Service\/ParameterKeys\/ArticleAdapter.php":"d644cfeb053b9ed4c585badae22c39cd","src\/PaymentMethods\/CreditManagement\/Service\/ParameterKeys\/DebtorInfoAdapter.php":"111483943c0c031041d2cf9c5bdd6896","src\/PaymentMethods\/EPS\/EPS.php":"4a19a3827ec83faed3a7abae33fb60c2","src\/PaymentMethods\/Emandates\/Emandates.php":"e1f0adf6f026b2004ca4db417295a483","src\/PaymentMethods\/Emandates\/Models\/Mandate.php":"825f7606cdce24b7cd87c85c56ef51be","src\/PaymentMethods\/GiftCard\/GiftCard.php":"605c12b4ba7a57b69538a94bcfd1bc48","src\/PaymentMethods\/GiftCard\/Models\/Pay.php":"5672b5bb84a6ec7989fb82b3c70f566f","src\/PaymentMethods\/GiftCard\/Models\/PayPayload.php":"6beb12d039bb1a75e9545860c3cbf9bc","src\/PaymentMethods\/Giropay\/Giropay.php":"afe9d431a68e56af845b5945c6ee6d72","src\/PaymentMethods\/Giropay\/Models\/Pay.php":"bd0fb92797290265baafbef8c143d77b","src\/PaymentMethods\/In3\/In3.php":"2ce32872023af75f0a60be62474f46a9","src\/PaymentMethods\/In3\/Models\/Pay.php":"bc41a5976dc954f06bab49e3451b4931","src\/PaymentMethods\/In3\/Models\/PayPayload.php":"5e1559127bd6bcc39af9cba5016f71fe","src\/PaymentMethods\/In3\/Models\/Subtotal.php":"1a9ac4476a45521af82482e1be6ba854","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/AddressAdapter.php":"53b92ce98c02ae7d93e6b14227563b47","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/ArticleAdapter.php":"58b9d16f6ea930ac4efc763a326e28ca","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/CompanyAdapter.php":"f5ea7377501c6af673f61849e5566f58","src\/PaymentMethods\/In3\/Service\/ParameterKeys\/PhoneAdapter.php":"2d6f0fa594ab03430d55ec26dcd8ba39","src\/PaymentMethods\/Interfaces\/Combinable.php":"b3a8a715e15d40f1fec8e8aa69e23db4","src\/PaymentMethods\/KBC\/KBC.php":"1dd2a8585a64b8078339a1172f09bf10","src\/PaymentMethods\/KlarnaKP\/KlarnaKP.php":"2c5696440cc568dc337c0d7cb4ebfc48","src\/PaymentMethods\/KlarnaKP\/Models\/Payload.php":"b33d782fc49f5ec4e61aa240da52d2de","src\/PaymentMethods\/KlarnaKP\/Models\/Recipient.php":"1ea7c1ca72ea5b10c109db5752ed158f","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/AddressAdapter.php":"b683bbacf1c10c1e7b0dc3625b83730a","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/ArticleAdapter.php":"7d987920678ff84247fa9941d2a219d0","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/EmailAdapter.php":"6c7a63c151b2d52475ba843259e369da","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/PhoneAdapter.php":"3f18c0a203e29cdb2c7fbed3e5e78e71","src\/PaymentMethods\/KlarnaKP\/Service\/ParameterKeys\/RecipientAdapter.php":"a79df1fdeb4bcc7f4147218891a266df","src\/PaymentMethods\/KlarnaPay\/KlarnaPay.php":"74ffbf3cc7239a4dbb3ab30698e19792","src\/PaymentMethods\/KlarnaPay\/Models\/Pay.php":"158f36bcb659ea6d2fe6226c7dd6900c","src\/PaymentMethods\/KlarnaPay\/Models\/PayPayload.php":"74f8711b521078bc34dfb2abeef6bcb6","src\/PaymentMethods\/KlarnaPay\/Models\/Recipient.php":"d5cf4d926b5d08c514150fc4e98f6343","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/AddressAdapter.php":"ae4d5a23dc640095d90cbb919ecdeab2","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/ArticleAdapter.php":"99629484c73633b2fcef73e74a2016ca","src\/PaymentMethods\/KlarnaPay\/Service\/ParameterKeys\/PhoneAdapter.php":"dbede561858850c098431e29785363a4","src\/PaymentMethods\/Marketplaces\/Marketplaces.php":"a58ad6edd52a8da52e37c55f88bf6a42","src\/PaymentMethods\/Marketplaces\/Models\/Marketplace.php":"c56e09f922cdc3c84912ba11414f37cc","src\/PaymentMethods\/Marketplaces\/Models\/Seller.php":"36a79655bb1190ecb8781b3b7fcd7ddf","src\/PaymentMethods\/Marketplaces\/Models\/ServiceList.php":"a25677f4cb9f55a72f90c78d9e05fad9","src\/PaymentMethods\/PayPerEmail\/Models\/Attachment.php":"ccff70fe9482b7ac0c4ee99c0f1e3923","src\/PaymentMethods\/PayPerEmail\/Models\/PaymentInvitation.php":"db244fffd49b47138ad8d32d14af187d","src\/PaymentMethods\/PayPerEmail\/PayPerEmail.php":"c07cb576cd8f37362b11dac19a7898e6","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/AttachmentAdapter.php":"cc857add67db197985a4879125190f84","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/CustomerAdapter.php":"cff29d3c99971efd11d19fc7392d23e2","src\/PaymentMethods\/PayPerEmail\/Service\/ParameterKeys\/EmailAdapter.php":"b16e545c775b75e3ed3747ef2151154b","src\/PaymentMethods\/PayablePaymentMethod.php":"eeb8a8a289ad40f6c7bffea0efe56311","src\/PaymentMethods\/Payconiq\/Payconiq.php":"057415ee3ede1bbbc1d9cb67a5e51bc2","src\/PaymentMethods\/PaymentFacade.php":"d241ed41b8f0c5a8f1c6543385185baa","src\/PaymentMethods\/PaymentInterface.php":"accc043249c9d1184d4fb100f14fb303","src\/PaymentMethods\/PaymentMethod.php":"39c673e7942aeb2f4b702dd53a6b086c","src\/PaymentMethods\/PaymentMethodFactory.php":"38c7d8bb6deba14b026ddc4b01ce7c37","src\/PaymentMethods\/Paypal\/Models\/Address.php":"74d8d0bc2ac7235e4a1a657cc70827c9","src\/PaymentMethods\/Paypal\/Models\/ExtraInfo.php":"b1e13c02b0c39531358693233b028bf7","src\/PaymentMethods\/Paypal\/Models\/Pay.php":"67225ec2037509db760c99ad4038d459","src\/PaymentMethods\/Paypal\/Paypal.php":"ab57cc1612f2438ea246cd745bbd6b3c","src\/PaymentMethods\/Paypal\/Service\/ParameterKeys\/AddressAdapter.php":"d370a51df269afcfad9dc75e8e148dd4","src\/PaymentMethods\/Paypal\/Service\/ParameterKeys\/PhoneAdapter.php":"046f3a220b5602d42482a3a3ec389f9a","src\/PaymentMethods\/PointOfSale\/Models\/Pay.php":"e1842ac15bedd7a83aeaa296049252eb","src\/PaymentMethods\/PointOfSale\/PointOfSale.php":"25637901753d2c07d00ab6bf0beb381c","src\/PaymentMethods\/Przelewy24\/Models\/Pay.php":"814d22c0721a1c222f44dbd9a97383f7","src\/PaymentMethods\/Przelewy24\/Przelewy24.php":"1c983da62802be6050cfc74d8057f67f","src\/PaymentMethods\/Przelewy24\/Service\/ParameterKeys\/CustomerAdapter.php":"bc65a7576fe49c7c36d10f96f578fcc4","src\/PaymentMethods\/Przelewy24\/Service\/ParameterKeys\/EmailAdapter.php":"6af44a175667a1691e5161f8e7758d4e","src\/PaymentMethods\/SEPA\/Models\/ExtraInfo.php":"22e1282bfe0d8d4a619e2e3488781709","src\/PaymentMethods\/SEPA\/Models\/Pay.php":"830cef74f9747712da251f22dac45a8f","src\/PaymentMethods\/SEPA\/SEPA.php":"4b1ca116d0a6fdb1af60ce65d6d58ae5","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/AddressAdapter.php":"889d7bf15ae56a1e915e8174c98a7bad","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/CustomerAdapter.php":"2af215870b7bb4d3c8fcf7c2e2de2ade","src\/PaymentMethods\/SEPA\/Service\/ParameterKeys\/PayAdapter.php":"d3b6a8f9c8bd89562484aa0d4d2fae45","src\/PaymentMethods\/Sofort\/Sofort.php":"c9569a2fd82566d49e0ab32049e31790","src\/PaymentMethods\/Subscriptions\/Models\/CombinedPayload.php":"291879ac2ef3c2ffe1e8ea281e422be1","src\/PaymentMethods\/Subscriptions\/Models\/Configuration.php":"26db1893644139846d4c54eb0eb7a5fc","src\/PaymentMethods\/Subscriptions\/Models\/RatePlan.php":"b2aba50e5921250f589f90b2dded6e74","src\/PaymentMethods\/Subscriptions\/Models\/RatePlanCharge.php":"a3d5fe992c41ce30d489ca5c47a60e39","src\/PaymentMethods\/Subscriptions\/Models\/ResumeSubscription.php":"919bca409c01c1aa94eb40f831217207","src\/PaymentMethods\/Subscriptions\/Models\/Subscription.php":"7391d0702787f876e07de142b3dd636c","src\/PaymentMethods\/Subscriptions\/Service\/ParameterKeys\/CompanyAdapter.php":"6f4f7e91f77c9a2479a11ae7f33a5362","src\/PaymentMethods\/Subscriptions\/Subscriptions.php":"eb54f618f94dfacfc4c99af8c789e629","src\/PaymentMethods\/Surepay\/Models\/Verify.php":"027841518d304cdf248d8cf1939ee0c8","src\/PaymentMethods\/Surepay\/Service\/ParameterKeys\/BankAccountAdapter.php":"9c1fa1ab42ab667878db82e1d6fbf8e0","src\/PaymentMethods\/Surepay\/Surepay.php":"bf44ddde109ed1fc424b6c585ab9bc51","src\/PaymentMethods\/Tinka\/Models\/Article.php":"2e2b75383981bd6bbff67cfe7a4ad566","src\/PaymentMethods\/Tinka\/Models\/Pay.php":"049ead8ce258a9e0ac6db008285ee31b","src\/PaymentMethods\/Tinka\/Models\/Recipient.php":"a1eb20125c466d0b48028c6c4f00f46c","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/AddressAdapter.php":"82e58c240201ff1468b8b9be353f33e9","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/ArticleAdapter.php":"05c428e81a33f41916f688964eb906da","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/CustomerAdapter.php":"be0e6db5b2a617fc6bc9e22af096ff9a","src\/PaymentMethods\/Tinka\/Service\/ParameterKeys\/PhoneAdapter.php":"43c682cf85f9fbdeb64b9637df3a0240","src\/PaymentMethods\/Tinka\/Tinka.php":"90bf921d625064956a42dae45a155e1d","src\/PaymentMethods\/Traits\/CountableGroupKey.php":"bbaf4ac62c697e4ea8ecdc0ad979b08f","src\/PaymentMethods\/Trustly\/Models\/Pay.php":"4d7d1f5790586bb743c7205f34064b83","src\/PaymentMethods\/Trustly\/Service\/ParameterKeys\/CustomerAdapter.php":"e18c0a88bc3ba7f213623c11b2ddb78f","src\/PaymentMethods\/Trustly\/Service\/ParameterKeys\/PayAdapter.php":"ac193e9ad3cb7c91f33c93dba4876771","src\/PaymentMethods\/Trustly\/Trustly.php":"2e8290e1eaae8a1cd8e57b5e4f949f70","src\/PaymentMethods\/WeChatPay\/Models\/Pay.php":"b6752b57a0f3d33711c2d47ec6bcb4d8","src\/PaymentMethods\/WeChatPay\/WeChatPay.php":"7ff27945ea981100f38b22c0c529dfd7","src\/PaymentMethods\/iDeal\/Models\/Pay.php":"8953ccceaed38d93289ac3e4a0ed01b5","src\/PaymentMethods\/iDeal\/iDeal.php":"ca2c50211f06c227c318d85b59c130be","src\/PaymentMethods\/iDealQR\/Models\/Generate.php":"f62e5ea61ee49356adaecbee64b4614e","src\/PaymentMethods\/iDealQR\/iDealQR.php":"ae9ba3ead224c6442cf9db5d68db042f","src\/PaymentMethods\/iDin\/Models\/Issuer.php":"902e454bbfebb4bd52e6ef8b8ba98414","src\/PaymentMethods\/iDin\/Service\/ParameterKeys\/IssuerAdapter.php":"c94438083ea61affd5d9e93e408bb81e","src\/PaymentMethods\/iDin\/iDin.php":"90ce856c9fee3f40cb14d7c3a7af3ef5","src\/Resources\/Arrayable.php":"309daa9c8e87e451a36c15936d5096ea","src\/Resources\/Constants\/CreditManagementInstallmentInterval.php":"56be568c35303858ae97945530c21396","src\/Resources\/Constants\/Endpoints.php":"1ae5ae439f1e44add96c81154b667c00","src\/Resources\/Constants\/Gender.php":"97e49539071851397500521f9c89a12d","src\/Resources\/Constants\/IPProtocolVersion.php":"0db5ea9636219a2c7413db7123cf9bf6","src\/Resources\/Constants\/RecipientCategory.php":"5c1e88ed6130c05a6e70a7d63a93d35b","src\/Resources\/Constants\/ResponseStatus.php":"415427f1ee6d9d6f0ae0b493f35f7ced","src\/Services\/PayloadService.php":"b9389c2f502dba9d991deb80b0d35423","src\/Services\/ServiceListParameters\/DefaultParameters.php":"70310adb54e262d917a6f7cf56f33845","src\/Services\/ServiceListParameters\/ModelParameters.php":"95b6660ae0e9ea3b1c2a9b49c6464325","src\/Services\/ServiceListParameters\/ServiceListParameter.php":"6a3ee9bf76707933ca0e5f62b939b1ef","src\/Services\/TransactionHeaders\/CultureHeader.php":"a3c118a69ea9425294a401b4e535e366","src\/Services\/TransactionHeaders\/DefaultHeader.php":"49e846e47a97aec9e88e07876c91292b","src\/Services\/TransactionHeaders\/HmacHeader.php":"3dcf867cebc0e187c0f3689c274e93d9","src\/Services\/TransactionHeaders\/SoftwareHeader.php":"401661ee7e91717cc8e85dd287350697","src\/Services\/TransactionHeaders\/TransactionHeader.php":"3561b8da46cc8c2e30e388f4c14f43a2","src\/Services\/TransactionService.php":"92a316ca3f4c13ef79e80647b3eb667c","src\/Transaction\/Client.php":"03b658c31b936d5925a53da3754f3917","src\/Transaction\/Request\/HttpClient\/HttpClientAbstract.php":"fca81cd7e91893e62dc1e20e5550c4c6","src\/Transaction\/Request\/HttpClient\/HttpClientGuzzle.php":"8ce604417529a02cf77243adaee62ccd","src\/Transaction\/Request\/HttpClient\/HttpClientInterface.php":"848ed947a3d1fa37d02cd99052c278bc","src\/Transaction\/Request\/Request.php":"702c743d61aa070aa8c8407b70421a1d","src\/Transaction\/Request\/TransactionRequest.php":"5f53d3e7cd9db218ad1727721519496e","src\/Transaction\/Response\/Response.php":"7abe9d998466a8eb81fc26da385e80d8","src\/Transaction\/Response\/TransactionResponse.php":"49417487c7e4bb93c9c84b0eac0a9656","example\/additional_services\/credit_management.php":"32ebd2c0cd3cd10b074c35edd114e674","example\/additional_services\/idin.php":"7dd17bb4d43dd2ae991ebe4686a7c6d2","example\/additional_services\/marketplaces.php":"307e99ab0f2342eeb80c756b4d2e81ed","example\/additional_services\/pay_per_email.php":"d3e2fc698cd56d5c1379f29c587da5df","example\/additional_services\/subscriptions.php":"5f27b97869c216c34fa930c091521fa1","example\/additional_services\/surepay.php":"cf0dd7b1f1aa99c94a5bb68bfccc5445","example\/additional_services\/voucher.php":"bdb49b1d45e44bf5fdd705032e9f4d57","example\/additional_services\/wallets.php":"962b46e5e78ca375562dd7f864550e83","example\/bootstrap.php":"a3f3d709889533c8780df931a288e763","example\/responses\/push.php":"b01ea22e8d4bf8e41a62b66f83249694","example\/responses\/return.php":"88d46cf36ec3550a3c0daca8aad94849","example\/transactions\/afterpay.php":"f8dc471f412bb3fefbf6c5a5f50c55aa","example\/transactions\/afterpaydigiaccept.php":"81b4d5de6624b4dc52dd37d6eb44fed8","example\/transactions\/alipay.php":"3b87fc27ec2ac13b13553454ae632fcd","example\/transactions\/applepay.php":"0d507f91f2224307c33fe85c52f8e732","example\/transactions\/applepay_redirect.php":"00ba0cabc3a7bb547f8821fadf94c74b","example\/transactions\/bancontact.php":"d1ee54f16d05c1a9126cbf228951d44f","example\/transactions\/belfius.php":"16a0efb01febb9cbcd70f7badcf5c64d","example\/transactions\/billink.php":"9305b0ee2b569d5ea1b5ac3f702bfc4e","example\/transactions\/credit_click.php":"27463cb1ab953baa0b7a82d32b500996","example\/transactions\/creditcard.php":"98a19b4d843617f53bd93f447fe3df0a","example\/transactions\/eps.php":"46fa813019489d29dd68e02b9bfa2a92","example\/transactions\/giftcards.php":"89a4fd8eb260009808402066944f7b95","example\/transactions\/giftcards_redirect.php":"1e7c17cd1c83a39e4b230758fdc77e0c","example\/transactions\/giropay.php":"2c82c4a5aa0fee3dc8c0ad40d3c5d791","example\/transactions\/ideal.php":"b346b5816272e6b626850efffb1d5f28","example\/transactions\/ideal_qr.php":"65bf7d44865b1cbaa08c9d00967fc0b1","example\/transactions\/in3.php":"f078817d49c83c22232bc615fc721521","example\/transactions\/kbc.php":"5c55f714be73d80e632912f3acb56def","example\/transactions\/klarna.php":"6e8d1b91bdc5992e5e514d3e652d25c9","example\/transactions\/klarnakp.php":"716cfcbdbb24e47f772330a85c4f69c4","example\/transactions\/payconiq.php":"cd952b2d7a6ce6df0e25f6c5f03230e1","example\/transactions\/paypal.php":"d819893fca49ff7ccbf140133d2ea7ac","example\/transactions\/pos.php":"cd2118e471e77210a4b687a98d067989","example\/transactions\/przelewy24.php":"d92bb6501d79d637ca91b811bb6e82e7","example\/transactions\/sepa.php":"10268e103cd7c7df9dd4b66988bcda82","example\/transactions\/sofort.php":"a8552ca60ec035fc0d03eafdbecfcca7","example\/transactions\/tinka.php":"1e10d360bf3987b4bf2dd07446ad610d","example\/transactions\/transfer.php":"53a25922b9707797df8d6d9623dc6565","example\/transactions\/trustly.php":"98c0c06cf6b3b6cad2ce5894dad8bb9b","example\/transactions\/wechat.php":"5c4f687f253b3b1c557feedcd45ad05b"}} \ No newline at end of file diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.php similarity index 86% rename from .php-cs-fixer.dist.php rename to .php-cs-fixer.php index 1f539060..21867d19 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.php @@ -31,6 +31,10 @@ 'position_after_anonymous_constructs' => 'next', 'position_after_control_structures' => 'next', ], + 'curly_braces_position' => [ + 'classes_opening_brace' => 'next_line_unless_newline_at_signature_end', + 'control_structures_opening_brace' => 'next_line_unless_newline_at_signature_end' + ], 'phpdoc_single_line_var_spacing' => true, 'phpdoc_var_without_name' => true, 'method_argument_space' => [ diff --git a/example/transactions/noservicespecified.php b/example/transactions/noservicespecified.php index 7fb25973..c68fde4f 100644 --- a/example/transactions/noservicespecified.php +++ b/example/transactions/noservicespecified.php @@ -1,27 +1,27 @@ -method(null)->pay([ - 'invoice' => uniqid(), - 'amountDebit' => 10.10, - 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', - 'servicesExcludedForClient' => 'ideal', - 'continueOnIncomplete' => '1' -]); - - -//Refund -$response = $buckaroo->method(null)->refund([ - 'invoice' => '', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '', //Set transaction key of the transaction to refund - 'amountCredit' => 10.10, -]); +method(null)->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', + 'servicesExcludedForClient' => 'ideal', + 'continueOnIncomplete' => '1', +]); + + +//Refund +$response = $buckaroo->method(null)->refund([ + 'invoice' => '', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '', //Set transaction key of the transaction to refund + 'amountCredit' => 10.10, +]); diff --git a/src/BuckarooClient.php b/src/BuckarooClient.php index fb891446..8568e96f 100644 --- a/src/BuckarooClient.php +++ b/src/BuckarooClient.php @@ -25,10 +25,14 @@ use Buckaroo\Exceptions\BuckarooException; use Buckaroo\Handlers\Credentials; use Buckaroo\Handlers\Logging\Observer as LoggingObserver; +use Buckaroo\PaymentMethods\BatchTransactions; use Buckaroo\PaymentMethods\PaymentFacade; use Buckaroo\Services\TransactionService; use Buckaroo\Transaction\Client; +/** + * + */ class BuckarooClient { /** @@ -61,6 +65,15 @@ public function method(string $method = null): PaymentFacade return new PaymentFacade($this->client, $method); } + /** + * @param array $transactions + * @return BatchTransactions + */ + public function batch(array $transactions): BatchTransactions + { + return new BatchTransactions($this->client, $transactions); + } + /** * @param string $transactionKey * @return TransactionService diff --git a/src/Handlers/Credentials.php b/src/Handlers/Credentials.php index 5b7f8377..2bc49081 100644 --- a/src/Handlers/Credentials.php +++ b/src/Handlers/Credentials.php @@ -60,7 +60,8 @@ public function confirm(): bool try { $response = $this->client->specification($request, 'ideal', 2); - } catch (BuckarooException $e) { + } catch (BuckarooException $e) + { return false; } diff --git a/src/PaymentMethods/BatchTransactions.php b/src/PaymentMethods/BatchTransactions.php new file mode 100644 index 00000000..14aed589 --- /dev/null +++ b/src/PaymentMethods/BatchTransactions.php @@ -0,0 +1,41 @@ +client = $client; + + $this->batch_transactions = new BatchRequest($transactions); + } + + /** + * @return mixed + * @throws \Buckaroo\Exceptions\BuckarooException + */ + public function execute() + { + return $this->client->dataBatchRequest($this->batch_transactions); + } +} diff --git a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php index b550c708..bb02a8f8 100644 --- a/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php +++ b/src/PaymentMethods/NoServiceSpecifiedPayment/NoServiceSpecifiedPayment.php @@ -1,36 +1,47 @@ -request; + } } diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 1da0dcf7..107a232c 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -149,17 +149,22 @@ public function __construct(Client $client, ?string $paymentMethod) */ public function getPaymentMethod(): PaymentMethod { - if ($this->paymentMethod) { - foreach (self::$payments as $class => $alias) { - if (in_array($this->paymentMethod, $alias)) { + if ($this->paymentMethod) + { + foreach (self::$payments as $class => $alias) + { + if (in_array($this->paymentMethod, $alias)) + { return new $class($this->client, $this->paymentMethod); } } + throw new BuckarooException( $this->client->config()->getLogger(), "Wrong payment method code has been given" ); } + return new NoServiceSpecifiedPayment($this->client, $this->paymentMethod); } diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index 29b3b728..daa26282 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -43,7 +43,7 @@ class iDeal extends PayablePaymentMethod * @param Model|null $model * @return TransactionResponse */ - public function pay(?Model $model = null): TransactionResponse + public function pay(?Model $model = null) { return parent::pay($model ?? new Pay($this->payload)); } @@ -80,7 +80,8 @@ public function issuers(): array try { $response = $this->client->specification($request, 'ideal', 2); - } catch (BuckarooException $e) { + } catch (BuckarooException $e) + { return []; } diff --git a/src/Transaction/Client.php b/src/Transaction/Client.php index 435f497d..7b0aefc9 100644 --- a/src/Transaction/Client.php +++ b/src/Transaction/Client.php @@ -137,6 +137,32 @@ public function dataRequest(Request $data = null, $responseClass = TransactionRe return $this->call(self::METHOD_POST, $data, $responseClass, $endPoint); } + /** + * @param Request|null $data + * @param $responseClass + * @return mixed + * @throws BuckarooException + */ + public function dataBatchRequest(Request $data = null, $responseClass = TransactionResponse::class) + { + $endPoint = $this->getEndpoint('json/batch/DataRequests'); + + return $this->call(self::METHOD_POST, $data, $responseClass, $endPoint); + } + + /** + * @param Request|null $data + * @param $responseClass + * @return mixed + * @throws BuckarooException + */ + public function transactionBatchRequest(Request $data = null, $responseClass = TransactionResponse::class) + { + $endPoint = $this->getEndpoint('json/batch/Transactions'); + + return $this->call(self::METHOD_POST, $data, $responseClass, $endPoint); + } + /** * @param Request|null $data * @param string $paymentName diff --git a/src/Transaction/Request/BatchRequest.php b/src/Transaction/Request/BatchRequest.php new file mode 100644 index 00000000..773812b5 --- /dev/null +++ b/src/Transaction/Request/BatchRequest.php @@ -0,0 +1,34 @@ +transactions = $transactions; + } + + /** + * @return string + */ + public function toJson(): string + { + $data = array_map(function ($transaction) { + return $transaction->request()->toArray(); + }, $this->transactions); + + return json_encode($data); + } +} diff --git a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php b/src/Transaction/Request/HttpClient/HttpClientGuzzle.php index 544cb425..92dcf1e4 100644 --- a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php +++ b/src/Transaction/Request/HttpClient/HttpClientGuzzle.php @@ -76,7 +76,8 @@ public function call(string $url, array $headers, string $method, string $data = $this->logger->info('RESPONSE HEADERS: ' . json_encode($response->getHeaders())); $this->logger->info('RESPONSE BODY: ' . $response->getBody()); - } catch (GuzzleException $e) { + } catch (GuzzleException $e) + { throw new TransferException($this->logger, "Transfer failed", 0, $e); } diff --git a/src/Transaction/Request/Request.php b/src/Transaction/Request/Request.php index 1227e4dd..afb4936e 100644 --- a/src/Transaction/Request/Request.php +++ b/src/Transaction/Request/Request.php @@ -95,7 +95,8 @@ public function __call($method, $args) if ($prefix === 'set') { return $this->offsetSet($param, $arg); - } elseif ($prefix === 'get') { + } elseif ($prefix === 'get') + { return $this->offsetGet($param); } diff --git a/tests/Buckaroo/Payments/BatchTest.php b/tests/Buckaroo/Payments/BatchTest.php new file mode 100644 index 00000000..aa3db504 --- /dev/null +++ b/tests/Buckaroo/Payments/BatchTest.php @@ -0,0 +1,85 @@ +buckaroo->method('credit_management')->manually()->createCombinedInvoice([ + 'invoice' => rand(1000, 9999), + 'applyStartRecurrent' => 'False', + 'invoiceAmount' => 10.00, + 'invoiceAmountVAT' => 1.00, + 'invoiceDate' => date('Y-m-d'), + 'dueDate' => date('Y-m-d'), + 'schemeKey' => '2amq34', + 'maxStepIndex' => 1, + 'allowedServices' => 'ideal,mastercard', + 'debtor' => [ + 'code' => 'johnsmith4', + ], + 'email' => 'youremail@example.nl', + 'phone' => [ + 'mobile' => '06198765432', + ], + 'person' => [ + 'culture' => 'nl-NL', + 'title' => 'Msc', + 'initials' => 'JS', + 'firstName' => 'Test', + 'lastNamePrefix' => 'Jones', + 'lastName' => 'Aflever', + 'gender' => Gender::MALE, + ], + 'company' => [ + 'culture' => 'nl-NL', + 'name' => 'My Company Corporation', + 'vatApplicable' => true, + 'vatNumber' => 'NL140619562B01', + 'chamberOfCommerce' => '20091741', + ], + 'address' => [ + 'street' => 'Hoofdtraat', + 'houseNumber' => '90', + 'houseNumberSuffix' => 'A', + 'zipcode' => '8441ER', + 'city' => 'Heerenveen', + 'state' => 'Friesland', + 'country' => 'NL', + ], + ]); + + $transactions[] = $this->buckaroo->method('sepadirectdebit')->combine($invoice)->manually()->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + 'iban' => 'NL13TEST0123456789', + 'bic' => 'TESTNL2A', + 'collectdate' => date('Y-m-d'), + 'mandateReference' => '1DCtestreference', + 'mandateDate' => '2022-07-03', + 'customer' => [ + 'name' => 'John Smith', + ], + ]); + } + + $response = $this->buckaroo->batch($transactions)->execute(); + + $this->assertTrue($response->data('Message') == '3 data requests were queued for processing.'); + } +} \ No newline at end of file From 405ee48c3d89fb884ce5e016780fba889d6f1759 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 23 May 2023 21:38:43 +0800 Subject: [PATCH 32/81] V1.6.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ccd1f129..189018b1 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.5.2", + "version": "1.6.0", "type": "library", "require": { "php": ">=7.4|^8.0", From f3b21df4c9ffc0a5aac6fe5b9153dfb88fadabdf Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Fri, 26 May 2023 10:08:54 +0200 Subject: [PATCH 33/81] BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes --- example/transactions/giftcards_redirect.php | 2 +- src/PaymentMethods/PaymentMethodFactory.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/example/transactions/giftcards_redirect.php b/example/transactions/giftcards_redirect.php index 8503b384..007e2ae6 100644 --- a/example/transactions/giftcards_redirect.php +++ b/example/transactions/giftcards_redirect.php @@ -11,7 +11,7 @@ $response = $buckaroo->method('giftcard')->payRedirect([ 'amountDebit' => 10, 'invoice' => uniqid(), - 'servicesSelectableByClient' => 'westlandbon,ideal,ippies,babygiftcard,babyparkgiftcard,beautywellness,boekenbon,boekenvoordeel,designshopsgiftcard,fashioncheque,fashionucadeaukaart,fijncadeau,koffiecadeau,kokenzo,kookcadeau,nationaleentertainmentcard,naturesgift,podiumcadeaukaart,shoesaccessories,webshopgiftcard,wijncadeau,wonenzo,yourgift,vvvgiftcard,parfumcadeaukaart', + 'servicesSelectableByClient' => 'westlandbon,ideal,babygiftcard,babyparkgiftcard,beautywellness,boekenbon,boekenvoordeel,designshopsgiftcard,fashioncheque,fashionucadeaukaart,fijncadeau,koffiecadeau,kokenzo,kookcadeau,nationaleentertainmentcard,naturesgift,podiumcadeaukaart,shoesaccessories,webshopgiftcard,wijncadeau,wonenzo,yourgift,vvvgiftcard,parfumcadeaukaart', 'continueOnIncomplete' => '1', ]); diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 107a232c..46b2a15b 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -108,8 +108,7 @@ class PaymentMethodFactory PointOfSale::class => ['pospayment'], Giropay::class => ['giropay'], GiftCard::class => [ - 'giftcard', 'westlandbon', 'ideal', - 'ippies', 'babygiftcard', 'babyparkgiftcard', + 'giftcard', 'westlandbon', 'babygiftcard', 'babyparkgiftcard', 'beautywellness', 'boekenbon', 'boekenvoordeel', 'designshopsgiftcard', 'fashioncheque', 'fashionucadeaukaart', 'fijncadeau', 'koffiecadeau', 'kokenzo', From 6ae918946b4955834c7db057b993feedf4ded84d Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Fri, 26 May 2023 10:09:40 +0200 Subject: [PATCH 34/81] BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php --- example/transactions/thunes.php | 29 ++++++++ src/PaymentMethods/PaymentMethodFactory.php | 5 ++ src/PaymentMethods/Thunes/Models/Pay.php | 55 ++++++++++++++ .../Service/ParameterKeys/ArticleAdapter.php | 32 +++++++++ src/PaymentMethods/Thunes/Thunes.php | 55 ++++++++++++++ tests/Buckaroo/Payments/ThunesTest.php | 72 +++++++++++++++++++ 6 files changed, 248 insertions(+) create mode 100644 example/transactions/thunes.php create mode 100644 src/PaymentMethods/Thunes/Models/Pay.php create mode 100644 src/PaymentMethods/Thunes/Service/ParameterKeys/ArticleAdapter.php create mode 100644 src/PaymentMethods/Thunes/Thunes.php create mode 100644 tests/Buckaroo/Payments/ThunesTest.php diff --git a/example/transactions/thunes.php b/example/transactions/thunes.php new file mode 100644 index 00000000..0551656f --- /dev/null +++ b/example/transactions/thunes.php @@ -0,0 +1,29 @@ +method('thunes')->pay([ + 'amountDebit' => 30.20, + 'name' => 'monizzeecovoucher', + 'order' => uniqid(), + 'invoice' => uniqid(), + 'clientIP' => '127.0.0.1', + 'articles' => [ + [ + 'identifier' => 'Articlenumber1', + 'description' => 'Blue Toy Car', + 'price' => '20.10', + ], + [ + 'identifier' => 'Articlenumber2', + 'description' => 'Red Toy Car', + 'price' => '10.10', + ], + ], +]); diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 46b2a15b..72fc12aa 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -56,6 +56,7 @@ use Buckaroo\PaymentMethods\Sofort\Sofort; use Buckaroo\PaymentMethods\Subscriptions\Subscriptions; use Buckaroo\PaymentMethods\Surepay\Surepay; +use Buckaroo\PaymentMethods\Thunes\Thunes; use Buckaroo\PaymentMethods\Tinka\Tinka; use Buckaroo\PaymentMethods\Trustly\Trustly; use Buckaroo\PaymentMethods\WeChatPay\WeChatPay; @@ -117,6 +118,10 @@ class PaymentMethodFactory 'wijncadeau', 'wonenzo', 'yourgift', 'vvvgiftcard', 'parfumcadeaukaart', ], + Thunes::class => [ + 'thunes', 'monizzemealvoucher', 'monizzeecovoucher', 'monizzegiftvoucher', + 'sodexomealvoucher', 'sodexoecovoucher', 'sodexogiftvoucher', + ], Trustly::class => ['trustly'], BankTransfer::class => ['transfer'], WeChatPay::class => ['wechatpay'], diff --git a/src/PaymentMethods/Thunes/Models/Pay.php b/src/PaymentMethods/Thunes/Models/Pay.php new file mode 100644 index 00000000..0db86017 --- /dev/null +++ b/src/PaymentMethods/Thunes/Models/Pay.php @@ -0,0 +1,55 @@ + [ + 'groupType' => 'Article', + ], + ]; + public function articles(?array $articles = null) + { + if (is_array($articles)) + { + foreach ($articles as $article) + { + $this->articles[] = new ArticleAdapter(new Article($article)); + } + } + + return $this->articles; + } +} diff --git a/src/PaymentMethods/Thunes/Service/ParameterKeys/ArticleAdapter.php b/src/PaymentMethods/Thunes/Service/ParameterKeys/ArticleAdapter.php new file mode 100644 index 00000000..2fa96196 --- /dev/null +++ b/src/PaymentMethods/Thunes/Service/ParameterKeys/ArticleAdapter.php @@ -0,0 +1,32 @@ + 'ArticleId', + 'description' => 'ArticleLabel', + 'price' => 'ArticleUnitPrice', + ]; +} diff --git a/src/PaymentMethods/Thunes/Thunes.php b/src/PaymentMethods/Thunes/Thunes.php new file mode 100644 index 00000000..28e28606 --- /dev/null +++ b/src/PaymentMethods/Thunes/Thunes.php @@ -0,0 +1,55 @@ +payload)); + } + public function paymentName(): string + { + if (isset($this->payload['name'])) + { + return $this->payload['name']; + } + + return 'thunes'; + } +} diff --git a/tests/Buckaroo/Payments/ThunesTest.php b/tests/Buckaroo/Payments/ThunesTest.php new file mode 100644 index 00000000..458d0aa6 --- /dev/null +++ b/tests/Buckaroo/Payments/ThunesTest.php @@ -0,0 +1,72 @@ +buckaroo->method('thunes')->pay($this->getPaymentPayload()); + + $this->assertTrue($response->isPendingProcessing()); + } + + /** + * @return void + * @test + */ + private function getPaymentPayload(?array $additional = null): array + { + $payload = [ + 'amountDebit' => 3, + 'order' => uniqid(), + 'invoice' => uniqid(), + 'name' => 'monizzeecovoucher', + 'clientIP' => '127.0.0.1', + 'articles' => [ + [ + 'identifier' => 'Articlenumber1', + 'description' => 'Articledesciption1', + 'price' => '1', + ], + [ + 'identifier' => 'Articlenumber2', + 'description' => 'Articledesciption2', + 'price' => '2', + ], + ] + ]; + + if ($additional) + { + return array_merge($additional, $payload); + } + + return $payload; + } +} From 667eb3970e8f73229e2c9017d2df0407580a0323 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 31 May 2023 09:52:51 +0200 Subject: [PATCH 35/81] BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize --- src/PaymentMethods/Bancontact/Bancontact.php | 41 +++++++++++++++++++- tests/Buckaroo/Payments/BancontactTest.php | 35 ++++++++++++++++- 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/src/PaymentMethods/Bancontact/Bancontact.php b/src/PaymentMethods/Bancontact/Bancontact.php index e82684eb..29a9561b 100644 --- a/src/PaymentMethods/Bancontact/Bancontact.php +++ b/src/PaymentMethods/Bancontact/Bancontact.php @@ -12,6 +12,9 @@ use Buckaroo\PaymentMethods\PayablePaymentMethod; use Buckaroo\Transaction\Response\TransactionResponse; +/** + * + */ class Bancontact extends PayablePaymentMethod implements Combinable { /** @@ -72,15 +75,51 @@ public function payOneClick(): TransactionResponse /** * @return TransactionResponse + * @deprecated deprecated since version 1.7.0, please use authorize method */ public function authenticate(): TransactionResponse + { + return $this->authorize(); + } + + /** + * @return Bancontact|mixed + */ + public function authorize() + { + $authenticate = new Authenticate($this->payload); + + $this->setPayPayload(); + + $this->setServiceList('Authorize', $authenticate); + + return $this->postRequest(); + } + + /** + * @return Bancontact|mixed + */ + public function capture() { $authenticate = new Authenticate($this->payload); $this->setPayPayload(); - $this->setServiceList('Authenticate', $authenticate); + $this->setServiceList('Capture', $authenticate); return $this->postRequest(); } + + /** + * @return Bancontact|mixed + */ + public function cancelAuthorize() + { + $this->setPayPayload(); + + $this->setServiceList('CancelAuthorize'); + + return $this->postRequest(); + } + } diff --git a/tests/Buckaroo/Payments/BancontactTest.php b/tests/Buckaroo/Payments/BancontactTest.php index 0ec74b7d..be9606f5 100644 --- a/tests/Buckaroo/Payments/BancontactTest.php +++ b/tests/Buckaroo/Payments/BancontactTest.php @@ -103,9 +103,9 @@ public function it_creates_a_bancontact_pay_one_click_payment() * @return void * @test */ - public function it_creates_a_bancontact_authenticate() + public function it_creates_a_bancontact_authorize() { - $response = $this->buckaroo->method('bancontactmrcash')->authenticate([ + $response = $this->buckaroo->method('bancontactmrcash')->authorize([ 'invoice' => 'Bancontact Authenticate SaveToken', 'description' => 'Bancontact Authenticate SaveToken', 'amountDebit' => 0.02, @@ -114,4 +114,35 @@ public function it_creates_a_bancontact_authenticate() $this->assertTrue($response->isWaitingOnUserInput()); } + + /** + * @return void + * @test + */ + public function it_creates_a_bancontact_capture() + { + $response = $this->buckaroo->method('bancontactmrcash')->capture([ + 'invoice' => 'Bancontact Authenticate SaveToken', + 'description' => 'Bancontact Authenticate SaveToken', + 'originalTransactionKey' => 'D3EEF5279D9047A0B202334D8050B6CF', + 'amountDebit' => 0.02, + ]); + + $this->assertTrue($response->isWaitingOnUserInput()); + } + + /** + * @return void + * @test + */ + public function it_creates_a_bancontact_cancel_authorize() + { + $response = $this->buckaroo->method('bancontactmrcash')->cancelAuthorize([ + 'invoice' => 'Bancontact Authenticate SaveToken', + 'description' => 'Bancontact Authenticate SaveToken', + 'originalTransactionKey' => '122862F217D44C4DAF4012D93301E168', + ]); + + $this->assertTrue($response->isValidationFailure()); + } } From cc987996b899ec483f3f5121d023c0fad8d1634f Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 31 May 2023 09:53:08 +0200 Subject: [PATCH 36/81] BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters --- src/Models/CustomParameters.php | 46 +++++++++++++++++++++++++++ src/Models/Payload/Payload.php | 19 ++++++++--- tests/Buckaroo/Payments/IdealTest.php | 3 ++ 3 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 src/Models/CustomParameters.php diff --git a/src/Models/CustomParameters.php b/src/Models/CustomParameters.php new file mode 100644 index 00000000..3702b86d --- /dev/null +++ b/src/Models/CustomParameters.php @@ -0,0 +1,46 @@ + $value) + { + $this->List[] = [ + 'Value' => $value, + 'Name' => $name, + ]; + } + + return parent::setProperties($data); + } +} diff --git a/src/Models/Payload/Payload.php b/src/Models/Payload/Payload.php index 201c7fda..6907d64e 100644 --- a/src/Models/Payload/Payload.php +++ b/src/Models/Payload/Payload.php @@ -22,8 +22,12 @@ use Buckaroo\Models\AdditionalParameters; use Buckaroo\Models\ClientIP; +use Buckaroo\Models\CustomParameters; use Buckaroo\Models\Model; +/** + * + */ class Payload extends Model { /** @@ -101,18 +105,16 @@ class Payload extends Model * @var string */ protected string $servicesExcludedForClient; - /** - * @var array - */ - protected array $customParameters; /** * @var AdditionalParameters */ protected AdditionalParameters $additionalParameters; + /** - * @var string + * @var CustomParameters */ + protected CustomParameters $customParameters; /** * @param array|null $data @@ -120,6 +122,13 @@ class Payload extends Model */ public function setProperties(?array $data) { + if (isset($data['customParameters'])) + { + $this->customParameters = new CustomParameters($data['customParameters']); + + unset($data['customParameters']); + } + if (isset($data['additionalParameters'])) { $this->additionalParameters = new AdditionalParameters($data['additionalParameters']); diff --git a/tests/Buckaroo/Payments/IdealTest.php b/tests/Buckaroo/Payments/IdealTest.php index d878510b..22f42b4a 100644 --- a/tests/Buckaroo/Payments/IdealTest.php +++ b/tests/Buckaroo/Payments/IdealTest.php @@ -48,6 +48,9 @@ protected function setUp(): void 'address' => '123.456.789.123', 'type' => 0, ], + 'customParameters' => [ + 'CustomerBillingFirstName' => 'test' + ], 'additionalParameters' => [ 'initiated_by_magento' => 1, 'service_action' => 'something', From 76ccd36f1c49431263e8bbc2bdcf45a86d11648b Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 15 Jun 2023 19:07:31 +0800 Subject: [PATCH 37/81] Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter --- src/Models/AdditionalParameters.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/AdditionalParameters.php b/src/Models/AdditionalParameters.php index f0efa7cd..5f5e68c5 100644 --- a/src/Models/AdditionalParameters.php +++ b/src/Models/AdditionalParameters.php @@ -25,7 +25,7 @@ class AdditionalParameters extends Model /** * @var array */ - protected array $AdditionalParameter; + protected array $List; /** * @param array|null $data @@ -35,7 +35,7 @@ public function setProperties(?array $data) { foreach ($data ?? [] as $name => $value) { - $this->AdditionalParameter[] = [ + $this->List[] = [ 'Value' => $value, 'Name' => $name, ]; From c3ee4c2cf51144f57934ddb4f31b9bfa1f386ef8 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Mon, 19 Jun 2023 16:35:23 +0800 Subject: [PATCH 38/81] Retain float in json_encode (#121) --- src/Handlers/HMAC/Hmac.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handlers/HMAC/Hmac.php b/src/Handlers/HMAC/Hmac.php index e5e670f4..8a2b6181 100644 --- a/src/Handlers/HMAC/Hmac.php +++ b/src/Handlers/HMAC/Hmac.php @@ -50,7 +50,7 @@ public function base64Data($data = null) { if (is_array($data)) { - $data = json_encode($data, JSON_UNESCAPED_UNICODE); + $data = json_encode($data, JSON_UNESCAPED_UNICODE|JSON_PRESERVE_ZERO_FRACTION); } $md5 = md5($data, true); From 60266b8f3f0cc5c159731346a537b742b70c9e3b Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Mon, 19 Jun 2023 16:36:02 +0800 Subject: [PATCH 39/81] Version change --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 189018b1..95be5d3d 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.6.0", + "version": "1.6.1", "type": "library", "require": { "php": ">=7.4|^8.0", From 62e773094d45b9e0f0015b0eb474027b2136fef0 Mon Sep 17 00:00:00 2001 From: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Date: Tue, 20 Jun 2023 11:07:12 +0200 Subject: [PATCH 40/81] BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs --- src/PaymentMethods/Bancontact/Bancontact.php | 1 - src/PaymentMethods/PaymentFacade.php | 1 + .../PaymentInitiation/Models/Pay.php | 12 +++ .../PaymentInitiation/PaymentInitiation.php | 24 ++++++ src/PaymentMethods/PaymentMethodFactory.php | 4 +- .../NoServiceSpecifiedPaymentTest.php | 83 ++++++++++--------- tests/Buckaroo/Payments/PaymentInitiation.php | 39 +++++++++ tests/Buckaroo/Payments/SofortTest.php | 15 ++++ 8 files changed, 136 insertions(+), 43 deletions(-) create mode 100644 src/PaymentMethods/PaymentInitiation/Models/Pay.php create mode 100644 src/PaymentMethods/PaymentInitiation/PaymentInitiation.php create mode 100644 tests/Buckaroo/Payments/PaymentInitiation.php diff --git a/src/PaymentMethods/Bancontact/Bancontact.php b/src/PaymentMethods/Bancontact/Bancontact.php index 29a9561b..e89115d2 100644 --- a/src/PaymentMethods/Bancontact/Bancontact.php +++ b/src/PaymentMethods/Bancontact/Bancontact.php @@ -121,5 +121,4 @@ public function cancelAuthorize() return $this->postRequest(); } - } diff --git a/src/PaymentMethods/PaymentFacade.php b/src/PaymentMethods/PaymentFacade.php index 9096a1d6..584472ac 100644 --- a/src/PaymentMethods/PaymentFacade.php +++ b/src/PaymentMethods/PaymentFacade.php @@ -70,6 +70,7 @@ * @method TransactionResponse payRemainderEncrypted(array $data) * @method TransactionResponse generate(array $data) * @method TransactionResponse identify(array $data) + * @method TransactionResponse instantRefund(array $data) * @method TransactionResponse verify(array $data) * @method TransactionResponse login(array $data) * @method TransactionResponse payInInstallments(array $data) diff --git a/src/PaymentMethods/PaymentInitiation/Models/Pay.php b/src/PaymentMethods/PaymentInitiation/Models/Pay.php new file mode 100644 index 00000000..456450f4 --- /dev/null +++ b/src/PaymentMethods/PaymentInitiation/Models/Pay.php @@ -0,0 +1,12 @@ +payload)); + } +} diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 72fc12aa..e5d54cfc 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -48,6 +48,7 @@ use Buckaroo\PaymentMethods\Marketplaces\Marketplaces; use Buckaroo\PaymentMethods\NoServiceSpecifiedPayment\NoServiceSpecifiedPayment; use Buckaroo\PaymentMethods\Payconiq\Payconiq; +use Buckaroo\PaymentMethods\PaymentInitiation\PaymentInitiation; use Buckaroo\PaymentMethods\Paypal\Paypal; use Buckaroo\PaymentMethods\PayPerEmail\PayPerEmail; use Buckaroo\PaymentMethods\PointOfSale\PointOfSale; @@ -98,16 +99,17 @@ class PaymentMethodFactory KBC::class => ['kbcpaymentbutton'], Paypal::class => ['paypal'], PayPerEmail::class => ['payperemail'], + PaymentInitiation::class => ['paymentinitiation','paybybank'], EPS::class => ['eps'], Emandates::class => ['emandates'], Sofort::class => ['sofort', 'sofortueberweisung'], Tinka::class => ['tinka'], Marketplaces::class => ['marketplaces'], - NoServiceSpecifiedPayment::class => ['noservice'], Payconiq::class => ['payconiq'], Przelewy24::class => ['przelewy24'], PointOfSale::class => ['pospayment'], Giropay::class => ['giropay'], + NoServiceSpecifiedPayment::class => ['noservice'], GiftCard::class => [ 'giftcard', 'westlandbon', 'babygiftcard', 'babyparkgiftcard', 'beautywellness', 'boekenbon', 'boekenvoordeel', diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index 94ea5f67..bef3e411 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -1,41 +1,42 @@ -buckaroo->method(null)->pay([ - 'amountDebit' => 10, - 'invoice' => uniqid(), - 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', - 'servicesExcludedForClient' => 'ideal', - 'continueOnIncomplete' => '1', - ]); - $this->assertTrue($response->isWaitingOnUserInput()); - } -} +buckaroo->method('noservice')->pay([ + 'amountDebit' => 10, + 'invoice' => uniqid(), + 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', + 'servicesExcludedForClient' => 'ideal', + 'continueOnIncomplete' => '1', + ]); + + $this->assertTrue($response->isWaitingOnUserInput()); + } +} \ No newline at end of file diff --git a/tests/Buckaroo/Payments/PaymentInitiation.php b/tests/Buckaroo/Payments/PaymentInitiation.php new file mode 100644 index 00000000..3759c63d --- /dev/null +++ b/tests/Buckaroo/Payments/PaymentInitiation.php @@ -0,0 +1,39 @@ +buckaroo->method('paybybank')->pay([ + 'amountDebit' => 10, + 'description' => 'Payment for testinvoice123', + 'invoice' => uniqid(), + 'issuer' => 'ABNANL2A', + 'countryCode' => 'NL' + ]); + + $this->assertTrue($response->isFailed()); + } + + /** + * @test + */ + public function it_creates_a_payment_initiation_refund() + { + $response = $this->buckaroo->method('paybybank')->refund([ + 'amountCredit' => 10, + 'invoice' => 'testinvoice 123', + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + ]); + + $this->assertTrue($response->isFailed()); + } +} diff --git a/tests/Buckaroo/Payments/SofortTest.php b/tests/Buckaroo/Payments/SofortTest.php index 2276b7d9..227ced80 100644 --- a/tests/Buckaroo/Payments/SofortTest.php +++ b/tests/Buckaroo/Payments/SofortTest.php @@ -42,4 +42,19 @@ public function it_creates_a_sofort_payment() $this->assertTrue($response->isPendingProcessing()); } + + + /** + * @return void + * @test + */ + public function it_creates_a_sofort_instant_refund() + { + $response = $this->buckaroo->method('sofortueberweisung')->instantRefund([ + 'invoice' => uniqid(), + 'amountCredit' => 10.10, + ]); + + $this->assertTrue($response->isPendingProcessing()); + } } From 2af90efde67190d82dda463765556d288f76407b Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 20 Jun 2023 18:19:29 +0800 Subject: [PATCH 41/81] Add missing shipping cost to refund in afterpay (#124) --- src/PaymentMethods/AfterpayDigiAccept/Models/Refund.php | 8 ++++++++ tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php | 1 + 2 files changed, 9 insertions(+) diff --git a/src/PaymentMethods/AfterpayDigiAccept/Models/Refund.php b/src/PaymentMethods/AfterpayDigiAccept/Models/Refund.php index e87339cc..dd5a52f3 100644 --- a/src/PaymentMethods/AfterpayDigiAccept/Models/Refund.php +++ b/src/PaymentMethods/AfterpayDigiAccept/Models/Refund.php @@ -25,10 +25,18 @@ use Buckaroo\PaymentMethods\AfterpayDigiAccept\Service\ParameterKeys\ArticleAdapter; use Buckaroo\PaymentMethods\Traits\CountableGroupKey; +/** + * + */ class Refund extends ServiceParameter { use CountableGroupKey; + /** + * @var float + */ + protected float $shippingCosts; + /** * @var array|string[] */ diff --git a/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php index 22429966..95409eff 100644 --- a/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php +++ b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php @@ -83,6 +83,7 @@ public function it_creates_a_afterpaydigiaccept_refund() { $response = $this->buckaroo->method('afterpaydigiaccept')->refund([ 'amountCredit' => 10, + 'shippingCosts' => 0.5, 'invoice' => '10000480', 'originalTransactionKey' => '9AA4C81A08A84FA7B68E6A6A6291XXXX', ]); From 6a5be5804624aa4fed58eb39459fc328d419c3bc Mon Sep 17 00:00:00 2001 From: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> Date: Wed, 21 Jun 2023 07:50:50 +0200 Subject: [PATCH 42/81] Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> --- README.md | 4 ++-- src/PaymentMethods/PaymentMethodFactory.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d9d33579..225b0055 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ### About -Buckaroo is the the Payment Service Provider for all your online payments with more than 15,000 companies relying on Buckaroo's platform to securely process their payments, subscriptions and unpaid invoices. +Buckaroo is the the Payment Service Provider for all your online payments with more than 30,000 companies relying on Buckaroo's platform to securely process their payments, subscriptions and unpaid invoices. Buckaroo developed their own PHP SDK. The SDK is a modern, open-source PHP library that makes it easy to integrate your PHP application with Buckaroo's services. Start accepting payments today with Buckaroo. @@ -98,7 +98,7 @@ If you want to contribute as well, then please follow our [Contribution Guidelin - **PATCHES:** Bug and hotfixes only ### Additional information -- **Support:** https://support.buckaroo.eu/contact +- **Support:** https://docs.buckaroo.io/docs/contact-us - **Contact:** [support@buckaroo.nl](mailto:support@buckaroo.nl) or [+31 (0)30 711 50 50](tel:+310307115050) ## License diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index e5d54cfc..01f96a54 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -105,6 +105,7 @@ class PaymentMethodFactory Sofort::class => ['sofort', 'sofortueberweisung'], Tinka::class => ['tinka'], Marketplaces::class => ['marketplaces'], + NoServiceSpecifiedPayment::class => ['noservice'], Payconiq::class => ['payconiq'], Przelewy24::class => ['przelewy24'], PointOfSale::class => ['pospayment'], From a0feca4ad812ac58c915db250756278b8c847a72 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 21 Jun 2023 16:21:25 +0800 Subject: [PATCH 43/81] BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword --- phpcs.xml | 5 +- src/BuckarooClient.php | 14 +++- src/Config/Config.php | 80 +++++++++++++++++++ src/Handlers/Credentials.php | 3 +- src/PaymentMethods/Thunes/Models/Pay.php | 2 +- src/PaymentMethods/Thunes/Thunes.php | 3 +- src/PaymentMethods/iDeal/iDeal.php | 3 +- .../TransactionHeaders/SoftwareHeader.php | 20 +++-- src/Transaction/Client.php | 2 +- .../Request/HttpClient/HttpClientGuzzle.php | 3 +- src/Transaction/Request/Request.php | 3 +- tests/Buckaroo/BuckarooTestCase.php | 28 ++++++- tests/Buckaroo/Payments/IdealTest.php | 8 +- 13 files changed, 153 insertions(+), 21 deletions(-) diff --git a/phpcs.xml b/phpcs.xml index 4a12f864..7391a251 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -4,7 +4,9 @@ src - + + src + *.php @@ -15,6 +17,5 @@ src/PaymentMethods/iDealQR/iDealQR.php - src \ No newline at end of file diff --git a/src/BuckarooClient.php b/src/BuckarooClient.php index 8568e96f..ad682cc4 100644 --- a/src/BuckarooClient.php +++ b/src/BuckarooClient.php @@ -45,13 +45,21 @@ class BuckarooClient private Config $config; /** - * @param string $websiteKey + * @param string|Config $websiteKey * @param string $secretKey * @param string|null $mode */ - public function __construct(string $websiteKey, string $secretKey, string $mode = null) + public function __construct($websiteKey, string $secretKey = null, string $mode = null) { - $this->config = $this->getConfig($websiteKey, $secretKey, $mode); + if ($websiteKey instanceof Config) + { + $this->config = $websiteKey; + } + + if (is_string($websiteKey)) + { + $this->config = $this->getConfig($websiteKey, $secretKey, $mode); + } $this->client = new Client($this->config); } diff --git a/src/Config/Config.php b/src/Config/Config.php index 93d89aed..c7047e7c 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -26,9 +26,18 @@ use Buckaroo\Handlers\Logging\Loggable; use Buckaroo\Handlers\Logging\Subject; +/** + * + */ abstract class Config implements Loggable { + /** + * + */ const LIVE_MODE = 'live'; + /** + * + */ const TEST_MODE = 'test'; /** @@ -60,6 +69,27 @@ abstract class Config implements Loggable */ private string $pushURL; + /** + * @var string|mixed + */ + private string $platformName; + /** + * @var string|mixed + */ + private string $platformVersion; + /** + * @var string|mixed + */ + private string $moduleSupplier; + /** + * @var string|mixed + */ + private string $moduleName; + /** + * @var string|mixed + */ + private string $moduleVersion; + /** * @var Subject */ @@ -83,6 +113,11 @@ public function __construct( ?string $returnURL = null, ?string $returnURLCancel = null, ?string $pushURL = null, + ?string $platformName = null, + ?string $platformVersion = null, + ?string $moduleSupplier = null, + ?string $moduleName = null, + ?string $moduleVersion = null, Subject $logger = null ) { $this->websiteKey = $websiteKey; @@ -93,6 +128,11 @@ public function __construct( $this->returnURL = $_ENV['BPE_RETURN_URL'] ?? $returnURL ?? ''; $this->returnURLCancel = $_ENV['BPE_RETURN_URL_CANCEL'] ?? $returnURLCancel ?? ''; $this->pushURL = $_ENV['BPE_PUSH_URL'] ?? $pushURL ?? ''; + $this->platformName = $_ENV['PlatformName'] ?? $platformName ?? ''; + $this->platformVersion = $_ENV['PlatformVersion'] ?? $platformVersion ?? ''; + $this->moduleSupplier = $_ENV['ModuleSupplier'] ?? $moduleSupplier ?? ''; + $this->moduleName = $_ENV['ModuleName'] ?? $moduleName ?? ''; + $this->moduleVersion = $_ENV['ModuleVersion'] ?? $moduleVersion ?? ''; $this->setLogger($logger ?? new DefaultLogger()); } @@ -167,6 +207,46 @@ public function pushURL(): string return $this->pushURL; } + /** + * @return string + */ + public function platformName(): string + { + return $this->platformName; + } + + /** + * @return string + */ + public function platformVersion(): string + { + return $this->platformVersion; + } + + /** + * @return string + */ + public function moduleSupplier(): string + { + return $this->moduleSupplier; + } + + /** + * @return string + */ + public function moduleName(): string + { + return $this->moduleName; + } + + /** + * @return string + */ + public function moduleVersion(): string + { + return $this->moduleVersion; + } + /** * @param array $payload * @return $this diff --git a/src/Handlers/Credentials.php b/src/Handlers/Credentials.php index 2bc49081..f21b5604 100644 --- a/src/Handlers/Credentials.php +++ b/src/Handlers/Credentials.php @@ -58,7 +58,8 @@ public function confirm(): bool $request = new TransactionRequest; - try { + try + { $response = $this->client->specification($request, 'ideal', 2); } catch (BuckarooException $e) { diff --git a/src/PaymentMethods/Thunes/Models/Pay.php b/src/PaymentMethods/Thunes/Models/Pay.php index 0db86017..ccab3839 100644 --- a/src/PaymentMethods/Thunes/Models/Pay.php +++ b/src/PaymentMethods/Thunes/Models/Pay.php @@ -21,8 +21,8 @@ namespace Buckaroo\PaymentMethods\Thunes\Models; use Buckaroo\Models\ServiceParameter; -use Buckaroo\PaymentMethods\Traits\CountableGroupKey; use Buckaroo\PaymentMethods\Thunes\Service\ParameterKeys\ArticleAdapter; +use Buckaroo\PaymentMethods\Traits\CountableGroupKey; class Pay extends ServiceParameter { diff --git a/src/PaymentMethods/Thunes/Thunes.php b/src/PaymentMethods/Thunes/Thunes.php index 28e28606..122371ea 100644 --- a/src/PaymentMethods/Thunes/Thunes.php +++ b/src/PaymentMethods/Thunes/Thunes.php @@ -23,9 +23,8 @@ namespace Buckaroo\PaymentMethods\Thunes; use Buckaroo\Models\Model; -use Buckaroo\PaymentMethods\Thunes\Models\Pay; use Buckaroo\PaymentMethods\PayablePaymentMethod; -use Buckaroo\Transaction\Request\TransactionRequest; +use Buckaroo\PaymentMethods\Thunes\Models\Pay; use Buckaroo\Transaction\Response\TransactionResponse; class Thunes extends PayablePaymentMethod diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index daa26282..2596c684 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -78,7 +78,8 @@ public function issuers(): array { $request = new TransactionRequest; - try { + try + { $response = $this->client->specification($request, 'ideal', 2); } catch (BuckarooException $e) { diff --git a/src/Services/TransactionHeaders/SoftwareHeader.php b/src/Services/TransactionHeaders/SoftwareHeader.php index 32195133..111a1b11 100644 --- a/src/Services/TransactionHeaders/SoftwareHeader.php +++ b/src/Services/TransactionHeaders/SoftwareHeader.php @@ -22,8 +22,18 @@ namespace Buckaroo\Services\TransactionHeaders; +use Buckaroo\Config\Config; + class SoftwareHeader extends TransactionHeader { + protected Config $config; + + public function __construct(TransactionHeader $transactionHeader, Config $config) + { + $this->config = $config; + + parent::__construct($transactionHeader); + } /** * @return array */ @@ -32,11 +42,11 @@ public function getHeaders(): array $headers = $this->transactionHeader->getHeaders(); $headers[] = "Software: " . json_encode([ - "PlatformName" => "SDK", - "PlatformVersion" => '0.0.1', - "ModuleSupplier" => "Buckaroo", - "ModuleName" => "BuckarooPayments", - "ModuleVersion" => '0.0.1', + "PlatformName" => $this->config->platformName(), + "PlatformVersion" => $this->config->platformVersion(), + "ModuleSupplier" => $this->config->moduleSupplier(), + "ModuleName" => $this->config->moduleName(), + "ModuleVersion" => $this->config->moduleVersion(), ]); return $headers; diff --git a/src/Transaction/Client.php b/src/Transaction/Client.php index 7b0aefc9..46f9762c 100644 --- a/src/Transaction/Client.php +++ b/src/Transaction/Client.php @@ -98,7 +98,7 @@ protected function getHeaders(string $url, string $data, string $method): array $headers = new HmacHeader($headers, $this->config, $url, $data, $method); $headers = new CultureHeader($headers); - $headers = new SoftwareHeader($headers); + $headers = new SoftwareHeader($headers, $this->config); return $headers->getHeaders(); } diff --git a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php b/src/Transaction/Request/HttpClient/HttpClientGuzzle.php index 92dcf1e4..d15a2fd7 100644 --- a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php +++ b/src/Transaction/Request/HttpClient/HttpClientGuzzle.php @@ -69,7 +69,8 @@ public function call(string $url, array $headers, string $method, string $data = $request = new Request($method, $url, $headers, $data); - try { + try + { $response = $this->httpClient->send($request, ['http_errors' => false]); $result = (string) $response->getBody(); diff --git a/src/Transaction/Request/Request.php b/src/Transaction/Request/Request.php index afb4936e..aa5f3700 100644 --- a/src/Transaction/Request/Request.php +++ b/src/Transaction/Request/Request.php @@ -48,7 +48,8 @@ public function offsetSet($offset, $value): void if (is_null($offset)) { $this->data[] = $value; - } else { + } else + { $this->data[$offset] = $value; } } diff --git a/tests/Buckaroo/BuckarooTestCase.php b/tests/Buckaroo/BuckarooTestCase.php index 5c97955e..020c4c35 100644 --- a/tests/Buckaroo/BuckarooTestCase.php +++ b/tests/Buckaroo/BuckarooTestCase.php @@ -21,6 +21,7 @@ namespace Tests\Buckaroo; use Buckaroo\BuckarooClient; +use Buckaroo\Config\DefaultConfig; use Dotenv\Dotenv; use PHPUnit\Framework\TestCase; @@ -32,7 +33,32 @@ public function __construct() $dotenv = Dotenv::createImmutable(getcwd()); $dotenv->load(); - $this->buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']); +// $this->buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']); +// +// ?string $mode = null, +// ?string $currency = null, +// ?string $returnURL = null, +// ?string $returnURLCancel = null, +// ?string $pushURL = null, +// ?string $platformName = null, +// ?string $moduleSupplier = null, +// ?string $moduleName = null, +// ?string $moduleVersion = null, + + $this->buckaroo = new BuckarooClient(new DefaultConfig( + $_ENV['BPE_WEBSITE_KEY'], + $_ENV['BPE_SECRET_KEY'], + $_ENV['BPE_MODE'] ?? null, + $_ENV['BPE_CURRENCY_CODE'] ?? null, + $_ENV['BPE_RETURN_URL'] ?? null, + $_ENV['BPE_RETURN_URL_CANCEL'] ?? null, + $_ENV['BPE_PUSH_URL'] ?? null, + 'TestingPlatform', + '3.0.0', + 'TestingModule', + 'Testing', + '2.4.0' + )); parent::__construct(); } diff --git a/tests/Buckaroo/Payments/IdealTest.php b/tests/Buckaroo/Payments/IdealTest.php index 22f42b4a..a8f5c177 100644 --- a/tests/Buckaroo/Payments/IdealTest.php +++ b/tests/Buckaroo/Payments/IdealTest.php @@ -23,6 +23,7 @@ use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Config\Config; + class CustomConfig extends Config { public function __construct() @@ -36,9 +37,12 @@ public function __construct() class IdealTest extends BuckarooTestCase { + protected array $paymentPayload; + protected array $refundPayload; + protected function setUp(): void { - $this->paymentPayload = ([ + $this->paymentPayload = [ 'invoice' => uniqid(), 'amountDebit' => 10.10, 'issuer' => 'ABNANL2A', @@ -55,7 +59,7 @@ protected function setUp(): void 'initiated_by_magento' => 1, 'service_action' => 'something', ], - ]); + ]; $this->refundPayload = [ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund From 5e00369f830f0764029650d55a2ef200d096f271 Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Mon, 26 Jun 2023 15:02:46 +0200 Subject: [PATCH 44/81] BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen --- src/Config/Config.php | 35 +++++++++++++++++-- src/Handlers/HMAC/Hmac.php | 2 +- .../PaymentInitiation/PaymentInitiation.php | 3 +- .../TransactionHeaders/CultureHeader.php | 26 ++++---------- src/Transaction/Client.php | 2 +- tests/Buckaroo/BuckarooTestCase.php | 3 +- 6 files changed, 44 insertions(+), 27 deletions(-) diff --git a/src/Config/Config.php b/src/Config/Config.php index c7047e7c..81ef5aef 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -90,6 +90,11 @@ abstract class Config implements Loggable */ private string $moduleVersion; + /** + * @var string|mixed + */ + private string $culture; + /** * @var Subject */ @@ -103,11 +108,17 @@ abstract class Config implements Loggable * @param string|null $returnURL * @param string|null $returnURLCancel * @param string|null $pushURL + * @param string|null $platformName + * @param string|null $platformVersion + * @param string|null $moduleSupplier + * @param string|null $moduleName + * @param string|null $moduleVersion + * @param string|null $culture * @param Subject|null $logger */ public function __construct( - string $websiteKey, - string $secretKey, + string $websiteKey, + string $secretKey, ?string $mode = null, ?string $currency = null, ?string $returnURL = null, @@ -118,6 +129,7 @@ public function __construct( ?string $moduleSupplier = null, ?string $moduleName = null, ?string $moduleVersion = null, + ?string $culture = null, Subject $logger = null ) { $this->websiteKey = $websiteKey; @@ -133,6 +145,7 @@ public function __construct( $this->moduleSupplier = $_ENV['ModuleSupplier'] ?? $moduleSupplier ?? ''; $this->moduleName = $_ENV['ModuleName'] ?? $moduleName ?? ''; $this->moduleVersion = $_ENV['ModuleVersion'] ?? $moduleVersion ?? ''; + $this->culture = $_ENV['Culture'] ?? $culture ?? ''; $this->setLogger($logger ?? new DefaultLogger()); } @@ -247,6 +260,24 @@ public function moduleVersion(): string return $this->moduleVersion; } + /** + * @return string + */ + public function culture(): string + { + if (! empty($this->culture)) + { + return $this->culture; + } + + if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + { + return substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 5); + } + + return 'en-GB'; + } + /** * @param array $payload * @return $this diff --git a/src/Handlers/HMAC/Hmac.php b/src/Handlers/HMAC/Hmac.php index 8a2b6181..0ef34533 100644 --- a/src/Handlers/HMAC/Hmac.php +++ b/src/Handlers/HMAC/Hmac.php @@ -50,7 +50,7 @@ public function base64Data($data = null) { if (is_array($data)) { - $data = json_encode($data, JSON_UNESCAPED_UNICODE|JSON_PRESERVE_ZERO_FRACTION); + $data = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION); } $md5 = md5($data, true); diff --git a/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php b/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php index c9f7e450..5c3cbafd 100644 --- a/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php +++ b/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php @@ -3,13 +3,12 @@ namespace Buckaroo\PaymentMethods\PaymentInitiation; use Buckaroo\Models\Model; -use Buckaroo\PaymentMethods\PaymentInitiation\Models\Pay; use Buckaroo\PaymentMethods\PayablePaymentMethod; +use Buckaroo\PaymentMethods\PaymentInitiation\Models\Pay; use Buckaroo\Transaction\Response\TransactionResponse; class PaymentInitiation extends PayablePaymentMethod { - protected string $paymentName = 'PayByBank'; protected array $requiredConfigFields = ['currency', 'returnURL', 'returnURLCancel', 'pushURL']; diff --git a/src/Services/TransactionHeaders/CultureHeader.php b/src/Services/TransactionHeaders/CultureHeader.php index b76ab65b..d65f0679 100644 --- a/src/Services/TransactionHeaders/CultureHeader.php +++ b/src/Services/TransactionHeaders/CultureHeader.php @@ -20,6 +20,8 @@ namespace Buckaroo\Services\TransactionHeaders; +use Buckaroo\Config\Config; + /** * */ @@ -31,11 +33,11 @@ class CultureHeader extends TransactionHeader protected ?string $locale; /** * @param TransactionHeader $transactionHeader - * @param string|null $locale + * @param Config $config */ - public function __construct(TransactionHeader $transactionHeader, string $locale = null) + public function __construct(TransactionHeader $transactionHeader, Config $config) { - $this->locale = $locale; + $this->config = $config; parent::__construct($transactionHeader); } @@ -47,24 +49,8 @@ public function getHeaders(): array { $headers = $this->transactionHeader->getHeaders(); - $headers[] = "Culture: " . $this->getLocale(); + $headers[] = "Culture: " . $this->config->culture(); return $headers; } - - /** - * @return string - */ - public function getLocale(): string - { - switch ($this->locale) - { - case 'nl': - return 'nl-NL'; - case 'de': - return 'de-DE'; - } - - return 'en-GB'; - } } diff --git a/src/Transaction/Client.php b/src/Transaction/Client.php index 46f9762c..3d7e707f 100644 --- a/src/Transaction/Client.php +++ b/src/Transaction/Client.php @@ -97,7 +97,7 @@ protected function getHeaders(string $url, string $data, string $method): array ]); $headers = new HmacHeader($headers, $this->config, $url, $data, $method); - $headers = new CultureHeader($headers); + $headers = new CultureHeader($headers, $this->config); $headers = new SoftwareHeader($headers, $this->config); return $headers->getHeaders(); diff --git a/tests/Buckaroo/BuckarooTestCase.php b/tests/Buckaroo/BuckarooTestCase.php index 020c4c35..dd8792c8 100644 --- a/tests/Buckaroo/BuckarooTestCase.php +++ b/tests/Buckaroo/BuckarooTestCase.php @@ -57,7 +57,8 @@ public function __construct() '3.0.0', 'TestingModule', 'Testing', - '2.4.0' + '2.4.0', + 'nl-NL' )); parent::__construct(); From 8e3ddc96b4970e1eec34ecbe30a6dc5d08f96339 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 27 Jun 2023 14:13:37 +0800 Subject: [PATCH 45/81] Prepare v1.7.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 95be5d3d..3a2907a7 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.6.1", + "version": "1.7.0", "type": "library", "require": { "php": ">=7.4|^8.0", From ef80095e07245862122be9aa218c5d4a297e6580 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 27 Jun 2023 14:18:46 +0800 Subject: [PATCH 46/81] Merge conflict resolved --- composer.json | 4 -- src/Handlers/HMAC/Hmac.php | 4 -- .../NoServiceSpecifiedPaymentTest.php | 45 +------------------ 3 files changed, 1 insertion(+), 52 deletions(-) diff --git a/composer.json b/composer.json index d91ec4da..3a2907a7 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", -<<<<<<< HEAD "version": "1.7.0", -======= - "version": "1.6.1", ->>>>>>> master "type": "library", "require": { "php": ">=7.4|^8.0", diff --git a/src/Handlers/HMAC/Hmac.php b/src/Handlers/HMAC/Hmac.php index 223999c8..0ef34533 100644 --- a/src/Handlers/HMAC/Hmac.php +++ b/src/Handlers/HMAC/Hmac.php @@ -50,11 +50,7 @@ public function base64Data($data = null) { if (is_array($data)) { -<<<<<<< HEAD $data = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION); -======= - $data = json_encode($data, JSON_UNESCAPED_UNICODE|JSON_PRESERVE_ZERO_FRACTION); ->>>>>>> master } $md5 = md5($data, true); diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index 26efec64..0f96c9d8 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -40,47 +40,4 @@ public function it_creates_a_noservice_payment() $this->assertTrue($response->isWaitingOnUserInput()); } -} -======= -buckaroo->method(null)->pay([ - 'amountDebit' => 10, - 'invoice' => uniqid(), - 'servicesSelectableByClient' => 'ideal,bancontactmrcash,paypal', - 'servicesExcludedForClient' => 'ideal', - 'continueOnIncomplete' => '1', - ]); - $this->assertTrue($response->isWaitingOnUserInput()); - } -} ->>>>>>> master +} \ No newline at end of file From 17915287a808c9641dc1e387de6a77d74ca66bfe Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 27 Jun 2023 16:23:07 +0800 Subject: [PATCH 47/81] Remove head merge conflict --- tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index 0f96c9d8..bef3e411 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -1,4 +1,3 @@ -<<<<<<< HEAD Date: Tue, 27 Jun 2023 16:23:56 +0800 Subject: [PATCH 48/81] Comment removal --- src/Config/Config.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Config/Config.php b/src/Config/Config.php index 81ef5aef..417af30a 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -26,9 +26,6 @@ use Buckaroo\Handlers\Logging\Loggable; use Buckaroo\Handlers\Logging\Subject; -/** - * - */ abstract class Config implements Loggable { /** From a2bbb2ca571568a422c88a38a54d24d188db4362 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 27 Jun 2023 16:25:41 +0800 Subject: [PATCH 49/81] Comment removal --- src/Models/Payload/Payload.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Models/Payload/Payload.php b/src/Models/Payload/Payload.php index 6907d64e..942fe4d9 100644 --- a/src/Models/Payload/Payload.php +++ b/src/Models/Payload/Payload.php @@ -25,9 +25,6 @@ use Buckaroo\Models\CustomParameters; use Buckaroo\Models\Model; -/** - * - */ class Payload extends Model { /** From ed299243e1554bb309dd1dc0734164a3ca53569c Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 6 Jul 2023 19:34:45 +0800 Subject: [PATCH 50/81] Add pay by bank example (#128) --- example/transactions/payment_initiation.php | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 example/transactions/payment_initiation.php diff --git a/example/transactions/payment_initiation.php b/example/transactions/payment_initiation.php new file mode 100644 index 00000000..b8eb9eb2 --- /dev/null +++ b/example/transactions/payment_initiation.php @@ -0,0 +1,23 @@ +method('paybybank')->pay([ + 'returnURL' => 'https://example.com/return', + 'amountDebit' => 10, + 'description' => 'Payment for testinvoice123', + 'issuer' => 'ABNANL2A', +]); + +//Refund +$response = $buckaroo->method('paybybank')->refund([ + 'invoice' => '', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '', //Set transaction key of the transaction to refund + 'amountCredit' => 10, +]); \ No newline at end of file From 7204cc3e25d57b4cd4ef6a3d3b66bcd2ec001a7e Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:02:13 +0200 Subject: [PATCH 51/81] BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload --- src/Config/Config.php | 20 ++++++- .../TransactionHeaders/ChannelHeader.php | 56 +++++++++++++++++++ src/Transaction/Client.php | 2 + 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 src/Services/TransactionHeaders/ChannelHeader.php diff --git a/src/Config/Config.php b/src/Config/Config.php index 93bedd1a..6452feff 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -91,7 +91,10 @@ abstract class Config implements Loggable * @var string|mixed */ private string $culture; - + /** + * @var string|mixed + */ + private string $channel; /** * @var Subject */ @@ -111,6 +114,7 @@ abstract class Config implements Loggable * @param string|null $moduleName * @param string|null $moduleVersion * @param string|null $culture + * @param string|null $channel * @param Subject|null $logger */ public function __construct( @@ -127,6 +131,7 @@ public function __construct( ?string $moduleName = null, ?string $moduleVersion = null, ?string $culture = null, + ?string $channel = null, Subject $logger = null ) { $this->websiteKey = $websiteKey; @@ -143,6 +148,7 @@ public function __construct( $this->moduleName = $_ENV['ModuleName'] ?? $moduleName ?? 'Empty Module name'; $this->moduleVersion = $_ENV['ModuleVersion'] ?? $moduleVersion ?? '1.0.0'; $this->culture = $_ENV['Culture'] ?? $culture ?? ''; + $this->channel = $_ENV['Channel'] ?? $channel ?? ''; $this->setLogger($logger ?? new DefaultLogger()); } @@ -275,6 +281,18 @@ public function culture(): string return 'en-GB'; } + /** + * @return string + */ + public function channel(): string + { + if (! empty($this->channel)) + { + return $this->channel; + } + return 'Web'; + } + /** * @param array $payload * @return $this diff --git a/src/Services/TransactionHeaders/ChannelHeader.php b/src/Services/TransactionHeaders/ChannelHeader.php new file mode 100644 index 00000000..f63beb5b --- /dev/null +++ b/src/Services/TransactionHeaders/ChannelHeader.php @@ -0,0 +1,56 @@ +config = $config; + + parent::__construct($transactionHeader); + } + + /** + * @return array + */ + public function getHeaders(): array + { + $headers = $this->transactionHeader->getHeaders(); + + $headers[] = "Channel: " . $this->config->channel(); + + return $headers; + } +} diff --git a/src/Transaction/Client.php b/src/Transaction/Client.php index 3d7e707f..b3116fac 100644 --- a/src/Transaction/Client.php +++ b/src/Transaction/Client.php @@ -27,6 +27,7 @@ use Buckaroo\Handlers\Logging\Subject; use Buckaroo\Resources\Constants\Endpoints; use Buckaroo\Services\TransactionHeaders\CultureHeader; +use Buckaroo\Services\TransactionHeaders\ChannelHeader; use Buckaroo\Services\TransactionHeaders\DefaultHeader; use Buckaroo\Services\TransactionHeaders\HmacHeader; use Buckaroo\Services\TransactionHeaders\SoftwareHeader; @@ -98,6 +99,7 @@ protected function getHeaders(string $url, string $data, string $method): array $headers = new HmacHeader($headers, $this->config, $url, $data, $method); $headers = new CultureHeader($headers, $this->config); + $headers = new ChannelHeader($headers, $this->config); $headers = new SoftwareHeader($headers, $this->config); return $headers->getHeaders(); From e8654fb897ae91f0c132c946106ab569f377173a Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Wed, 30 Aug 2023 07:43:34 +0200 Subject: [PATCH 52/81] Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen --- example/transactions/in3.php | 116 ++++++---- example/transactions/in3old.php | 78 +++++++ src/Models/Phone.php | 1 + src/PaymentMethods/In3/In3.php | 21 +- src/PaymentMethods/In3/Models/Article.php | 27 +++ src/PaymentMethods/In3/Models/Company.php | 26 +++ src/PaymentMethods/In3/Models/Pay.php | 159 ++++--------- src/PaymentMethods/In3/Models/Person.php | 28 +++ src/PaymentMethods/In3/Models/Recipient.php | 154 +++++++++++++ src/PaymentMethods/In3/Models/Refund.php | 58 +++++ .../Service/ParameterKeys/AddressAdapter.php | 6 +- .../Service/ParameterKeys/ArticleAdapter.php | 6 +- .../Service/ParameterKeys/PhoneAdapter.php | 4 +- .../ParameterKeys/RecipientAdapter.php | 34 +++ src/PaymentMethods/In3Old/In3Old.php | 63 ++++++ src/PaymentMethods/In3Old/Models/Pay.php | 211 ++++++++++++++++++ .../{In3 => In3Old}/Models/PayPayload.php | 2 +- .../{In3 => In3Old}/Models/Subtotal.php | 2 +- .../Service/ParameterKeys/AddressAdapter.php | 31 +++ .../Service/ParameterKeys/ArticleAdapter.php | 33 +++ .../Service/ParameterKeys/CompanyAdapter.php | 2 +- .../Service/ParameterKeys/PhoneAdapter.php | 30 +++ src/PaymentMethods/PaymentMethodFactory.php | 2 + tests/Buckaroo/Payments/AfterpayTest.php | 5 +- tests/Buckaroo/Payments/In3OldTest.php | 123 ++++++++++ tests/Buckaroo/Payments/In3Test.php | 137 +++++++----- 26 files changed, 1101 insertions(+), 258 deletions(-) create mode 100644 example/transactions/in3old.php create mode 100644 src/PaymentMethods/In3/Models/Article.php create mode 100644 src/PaymentMethods/In3/Models/Company.php create mode 100644 src/PaymentMethods/In3/Models/Person.php create mode 100644 src/PaymentMethods/In3/Models/Recipient.php create mode 100644 src/PaymentMethods/In3/Models/Refund.php create mode 100644 src/PaymentMethods/In3/Service/ParameterKeys/RecipientAdapter.php create mode 100644 src/PaymentMethods/In3Old/In3Old.php create mode 100644 src/PaymentMethods/In3Old/Models/Pay.php rename src/PaymentMethods/{In3 => In3Old}/Models/PayPayload.php (95%) rename src/PaymentMethods/{In3 => In3Old}/Models/Subtotal.php (94%) create mode 100644 src/PaymentMethods/In3Old/Service/ParameterKeys/AddressAdapter.php create mode 100644 src/PaymentMethods/In3Old/Service/ParameterKeys/ArticleAdapter.php rename src/PaymentMethods/{In3 => In3Old}/Service/ParameterKeys/CompanyAdapter.php (93%) create mode 100644 src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php create mode 100644 tests/Buckaroo/Payments/In3OldTest.php diff --git a/example/transactions/in3.php b/example/transactions/in3.php index 2fc03cc4..64ec35df 100644 --- a/example/transactions/in3.php +++ b/example/transactions/in3.php @@ -3,73 +3,93 @@ require('../bootstrap.php'); use Buckaroo\BuckarooClient; -use Buckaroo\Resources\Constants\Gender; $buckaroo = new BuckarooClient($_ENV['BPE_WEBSITE_KEY'], $_ENV['BPE_SECRET_KEY']); $payload = [ - 'amountDebit' => 9.5, - 'order' => uniqid(), - 'invoice' => uniqid(), - 'description' => 'This is a test order', - 'invoiceDate' => '22-01-2018', - 'customerType' => 'Company', - 'email' => 'test@buckaroo.nl', - 'phone' => [ - 'mobile' => '0612345678', - ], - 'articles' => [ - [ - 'identifier' => uniqid(), - 'description' => 'Blue Toy Car', - 'quantity' => '1', - 'price' => 10.00, + 'amountDebit' => 52.30, + 'description' => 'in3 pay', + 'order' => uniqid(), + 'invoice' => uniqid(), + 'clientIP' => '127.0.0.1', + 'billing' => [ + 'recipient' => [ + 'category' => 'B2C', + 'initials' => 'J', + 'firstName' => 'John', + 'lastName' => 'Dona', + 'birthDate' => '1990-01-01', + 'customerNumber' => '12345', + 'phone' => '0612345678', + 'country' => 'NL', + 'companyName' => 'My Company B.V.', + 'chamberOfCommerce' => '123456' ], + 'address' => [ + 'street' => 'Hoofdstraat', + 'houseNumber' => '13', + 'houseNumberAdditional' => 'a', + 'zipcode' => '1234AB', + 'city' => 'Heerenveen', + 'country' => 'NL', + ], + 'phone' => [ + 'phone' => '0698765433', + ], + 'email' => 'test@buckaroo.nl', ], - 'company' => [ - 'companyName' => 'My Company B.V.', - 'chamberOfCommerce' => '123456', - ], - 'customer' => [ - 'gender' => Gender::FEMALE, - 'initials' => 'J.S.', - 'lastName' => 'Aflever', - 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => '0610000000', - 'culture' => 'nl-NL', - 'birthDate' => '1990-01-01', - ], - 'address' => [ - 'street' => 'Hoofdstraat', - 'houseNumber' => '2', - 'houseNumberAdditional' => 'a', - 'zipcode' => '8441EE', - 'city' => 'Heerenveen', - 'country' => 'NL', + 'shipping' => [ + 'recipient' => [ + 'category' => 'B2C', + 'careOf' => 'John Smith', + 'firstName' => 'John', + 'lastName' => 'Do', + 'chamberOfCommerce' => '123456' + ], + 'address' => [ + 'street' => 'Kalverstraat', + 'houseNumber' => '13', + 'houseNumberAdditional' => 'b', + 'zipcode' => '4321EB', + 'city' => 'Amsterdam', + 'country' => 'NL', + ], ], - 'subtotals' => [ + 'articles' => [ [ - 'name' => 'Korting', - 'value' => -2.00, + 'identifier' => 'Articlenumber1', + 'type' => 'Physical', + 'description' => 'Blue Toy Car', + 'category' => 'test product', + 'vatPercentage' => '21', + 'quantity' => '2', + 'price' => '20.10', ], [ - 'name' => 'Betaaltoeslag', - 'value' => 0.50, + 'identifier' => 'Articlenumber2', + 'type' => 'Physical', + 'description' => 'Red Toy Car', + 'category' => 'test product', + 'vatPercentage' => '21', + 'quantity' => '1', + 'price' => '10.10', ], [ - 'name' => 'Verzendkosten', - 'value' => 1.00, + 'identifier' => 'USPShippingID', + 'type' => 'Physical', + 'description' => 'UPS', + 'category' => 'test product', + 'vatPercentage' => '21', + 'quantity' => '1', + 'price' => '2', ], - ], + ] ]; //Also accepts json //Pay $response = $buckaroo->method('in3')->pay($payload); -//Pay installment -$response = $buckaroo->method('in3')->payInInstallments($payload); - //Refund $response = $buckaroo->method('in3')->refund([ 'amountCredit' => 10, diff --git a/example/transactions/in3old.php b/example/transactions/in3old.php new file mode 100644 index 00000000..77272c07 --- /dev/null +++ b/example/transactions/in3old.php @@ -0,0 +1,78 @@ + 9.5, + 'order' => uniqid(), + 'invoice' => uniqid(), + 'description' => 'This is a test order', + 'invoiceDate' => '22-01-2018', + 'customerType' => 'Company', + 'email' => 'test@buckaroo.nl', + 'phone' => [ + 'mobile' => '0612345678', + ], + 'articles' => [ + [ + 'identifier' => uniqid(), + 'description' => 'Blue Toy Car', + 'quantity' => '1', + 'price' => 10.00, + ], + ], + 'company' => [ + 'companyName' => 'My Company B.V.', + 'chamberOfCommerce' => '123456', + ], + 'customer' => [ + 'gender' => Gender::FEMALE, + 'initials' => 'J.S.', + 'lastName' => 'Aflever', + 'email' => 'billingcustomer@buckaroo.nl', + 'phone' => '0610000000', + 'culture' => 'nl-NL', + 'birthDate' => '1990-01-01', + ], + 'address' => [ + 'street' => 'Hoofdstraat', + 'houseNumber' => '2', + 'houseNumberAdditional' => 'a', + 'zipcode' => '8441EE', + 'city' => 'Heerenveen', + 'country' => 'NL', + ], + 'subtotals' => [ + [ + 'name' => 'Korting', + 'value' => -2.00, + ], + [ + 'name' => 'Betaaltoeslag', + 'value' => 0.50, + ], + [ + 'name' => 'Verzendkosten', + 'value' => 1.00, + ], + ], +]; + +//Also accepts json +//Pay +$response = $buckaroo->method('in3Old')->pay($payload); + +//Pay installment +$response = $buckaroo->method('in3Old')->payInInstallments($payload); + +//Refund +$response = $buckaroo->method('in3Old')->refund([ + 'amountCredit' => 10, + 'invoice' => '10000480', + 'originalTransactionKey' => '9AA4C81A08A84FA7B68E6A6A6291XXXX', +]); diff --git a/src/Models/Phone.php b/src/Models/Phone.php index 3f07e9d1..3ecb257e 100644 --- a/src/Models/Phone.php +++ b/src/Models/Phone.php @@ -24,5 +24,6 @@ class Phone extends Model { protected string $landLine; protected string $mobile; + protected string $phone; protected string $fax; } diff --git a/src/PaymentMethods/In3/In3.php b/src/PaymentMethods/In3/In3.php index 818cdd70..4f659a0b 100644 --- a/src/PaymentMethods/In3/In3.php +++ b/src/PaymentMethods/In3/In3.php @@ -31,12 +31,7 @@ class In3 extends PayablePaymentMethod /** * @var string */ - protected string $paymentName = 'Capayable'; - - /** - * @var string - */ - protected string $payModel = PayPayload::class; + protected string $paymentName = 'In3'; /** * @param Model|null $model @@ -46,18 +41,4 @@ public function pay(?Model $model = null): TransactionResponse { return parent::pay($model ?? new Pay($this->payload)); } - - /** - * @return In3|mixed - */ - public function payInInstallments() - { - $pay = new Pay($this->payload); - - $this->setPayPayload(); - - $this->setServiceList('PayInInstallments', $pay); - - return $this->postRequest(); - } } diff --git a/src/PaymentMethods/In3/Models/Article.php b/src/PaymentMethods/In3/Models/Article.php new file mode 100644 index 00000000..4e8e8993 --- /dev/null +++ b/src/PaymentMethods/In3/Models/Article.php @@ -0,0 +1,27 @@ + [ - 'groupType' => 'ProductLine', - ], - 'address' => [ - 'groupType' => 'Address', - ], - 'customer' => [ - 'groupType' => 'Person', - ], - 'company' => [ - 'groupType' => 'Company', - ], - 'phone' => [ - 'groupType' => 'Phone', - ], - 'email' => [ - 'groupType' => 'Email', + 'groupType' => 'Article', ], ]; /** - * @param array|null $articles - * @return array + * @param $billing + * @return Recipient */ - public function articles(?array $articles = null) + public function billing($billing = null) { - if (is_array($articles)) + if (is_array($billing)) { - foreach ($articles as $article) - { - $this->articles[] = new ArticleAdapter(new Article($article)); - } + $this->billingRecipient = new Recipient('Billing', $billing); + $this->shippingRecipient = new Recipient('Shipping', $billing); } - return $this->articles; + return $this->billingRecipient; } /** - * @param $company - * @return CompanyAdapter + * @param $shipping + * @return Recipient */ - public function company($company = null) + public function shipping($shipping = null) { - if (is_array($company)) + if (is_array($shipping)) { - $this->company = new CompanyAdapter(new Company($company)); + $this->shippingRecipient = new Recipient('Shipping', $shipping); } - return $this->company; + return $this->shippingRecipient; } /** - * @param $customer - * @return Person - */ - public function customer($customer = null) - { - if (is_array($customer)) - { - $this->customer = new Person($customer); - } - - return $this->customer; - } - - /** - * @param $address - * @return AddressAdapter - */ - public function address($address = null) - { - if (is_array($address)) - { - $this->address = new AddressAdapter(new Address($address)); - } - - return $this->address; - } - - /** - * @param $email - * @return Email - */ - public function email($email = null) - { - if (is_string($email)) - { - $this->email = new Email($email); - } - - return $this->email; - } - - /** - * @param $phone - * @return PhoneAdapter - */ - public function phone($phone = null) - { - if (is_array($phone)) - { - $this->phone = new PhoneAdapter(new Phone($phone)); - } - - return $this->phone; - } - - /** - * @param array|null $subtotals + * @param array|null $articles * @return array */ - public function subtotals(?array $subtotals = null) + public function articles(?array $articles = null) { - if (is_array($subtotals)) + if (is_array($articles)) { - foreach ($subtotals as $subtotal) + foreach ($articles as $article) { - $this->subtotals[] = new Subtotal($subtotal); + $this->articles[] = new ArticleAdapter(new Article($article)); } } - return $this->subtotals; + return $this->articles; } } diff --git a/src/PaymentMethods/In3/Models/Person.php b/src/PaymentMethods/In3/Models/Person.php new file mode 100644 index 00000000..06a2d918 --- /dev/null +++ b/src/PaymentMethods/In3/Models/Person.php @@ -0,0 +1,28 @@ +type = $type; + + parent::__construct($values); + } + + /** + * @param $recipient + * @return RecipientInterface + * @throws \Exception + */ + public function recipient($recipient = null) + { + if (is_array($recipient)) + { + $this->recipient = $this->getRecipientObject($recipient); + } + + return $this->recipient; + } + + /** + * @param $address + * @return AddressAdapter + */ + public function address($address = null) + { + if (is_array($address)) + { + $this->address = new AddressAdapter(new Address($address)); + } + + return $this->address; + } + + /** + * @param $phone + * @return PhoneAdapter + */ + public function phone($phone = null) + { + if (is_array($phone)) + { + $this->phone = new PhoneAdapter(new Phone($phone)); + } + + return $this->phone; + } + + /** + * @param $email + * @return Email + */ + public function email($email = null) + { + if (is_string($email)) + { + $this->email = new Email($email); + } + + return $this->email; + } + + /** + * @param array $recipient + * @return RecipientInterface + * @throws \Exception + */ + private function getRecipientObject(array $recipient) : RecipientInterface + { + if (isset($recipient['category'])) + { + switch ($recipient['category']) + { + case 'B2B': + return new RecipientAdapter(new Company($recipient)); + case 'B2C': + return new RecipientAdapter(new Person($recipient)); + } + } + + throw new \Exception('No recipient category found.'); + } + + /** + * @param string $key + * @return string|null + */ + public function getGroupType(string $key): ?string + { + return $this->type . 'Customer'; + } +} diff --git a/src/PaymentMethods/In3/Models/Refund.php b/src/PaymentMethods/In3/Models/Refund.php new file mode 100644 index 00000000..4a8f0f58 --- /dev/null +++ b/src/PaymentMethods/In3/Models/Refund.php @@ -0,0 +1,58 @@ + [ + 'groupType' => 'Article', + ], + ]; + + /** + * @param array|null $articles + * @return array + */ + public function articles(?array $articles = null) + { + if (is_array($articles)) + { + foreach ($articles as $article) + { + $this->articles[] = new ArticleAdapter(new Article($article)); + } + } + + return $this->articles; + } +} diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/AddressAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/AddressAdapter.php index af572101..c73ef28b 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/AddressAdapter.php +++ b/src/PaymentMethods/In3/Service/ParameterKeys/AddressAdapter.php @@ -25,7 +25,9 @@ class AddressAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'houseNumberAdditional' => 'HouseNumberSuffix', - 'zipcode' => 'ZipCode', + 'houseNumber' => 'StreetNumber', + 'houseNumberAdditional' => 'StreetNumberSuffix', + 'zipcode' => 'PostalCode', + 'country' => 'CountryCode' ]; } diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/ArticleAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/ArticleAdapter.php index 2afa11b0..ef06e310 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/ArticleAdapter.php +++ b/src/PaymentMethods/In3/Service/ParameterKeys/ArticleAdapter.php @@ -25,9 +25,7 @@ class ArticleAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'identifier' => 'Code', - 'description' => 'Name', - 'quantity' => 'Quantity', - 'price' => 'Price', + 'price' => 'GrossUnitPrice', + 'category' => 'Category', ]; } diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php index 27fbe7c6..dbba7c25 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,8 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'landLine' => 'Phone', + 'mobile' => 'MobilePhone', + 'phone' => 'Phone' ]; } diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/RecipientAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/RecipientAdapter.php new file mode 100644 index 00000000..26c6e92a --- /dev/null +++ b/src/PaymentMethods/In3/Service/ParameterKeys/RecipientAdapter.php @@ -0,0 +1,34 @@ + 'Salutation', + 'chamberOfCommerce' => 'CocNumber', + 'companyName' => 'CompanyName', + 'customerNumber' => 'customerNumber', + ]; +} diff --git a/src/PaymentMethods/In3Old/In3Old.php b/src/PaymentMethods/In3Old/In3Old.php new file mode 100644 index 00000000..89d10279 --- /dev/null +++ b/src/PaymentMethods/In3Old/In3Old.php @@ -0,0 +1,63 @@ +payload)); + } + + /** + * @return In3Old|mixed + */ + public function payInInstallments() + { + $pay = new Pay($this->payload); + + $this->setPayPayload(); + + $this->setServiceList('PayInInstallments', $pay); + + return $this->postRequest(); + } +} diff --git a/src/PaymentMethods/In3Old/Models/Pay.php b/src/PaymentMethods/In3Old/Models/Pay.php new file mode 100644 index 00000000..d542bb50 --- /dev/null +++ b/src/PaymentMethods/In3Old/Models/Pay.php @@ -0,0 +1,211 @@ + [ + 'groupType' => 'ProductLine', + ], + 'address' => [ + 'groupType' => 'Address', + ], + 'customer' => [ + 'groupType' => 'Person', + ], + 'company' => [ + 'groupType' => 'Company', + ], + 'phone' => [ + 'groupType' => 'Phone', + ], + 'email' => [ + 'groupType' => 'Email', + ], + ]; + + /** + * @param array|null $articles + * @return array + */ + public function articles(?array $articles = null) + { + if (is_array($articles)) + { + foreach ($articles as $article) + { + $this->articles[] = new ArticleAdapter(new Article($article)); + } + } + + return $this->articles; + } + + /** + * @param $company + * @return CompanyAdapter + */ + public function company($company = null) + { + if (is_array($company)) + { + $this->company = new CompanyAdapter(new Company($company)); + } + + return $this->company; + } + + /** + * @param $customer + * @return Person + */ + public function customer($customer = null) + { + if (is_array($customer)) + { + $this->customer = new Person($customer); + } + + return $this->customer; + } + + /** + * @param $address + * @return AddressAdapter + */ + public function address($address = null) + { + if (is_array($address)) + { + $this->address = new AddressAdapter(new Address($address)); + } + + return $this->address; + } + + /** + * @param $email + * @return Email + */ + public function email($email = null) + { + if (is_string($email)) + { + $this->email = new Email($email); + } + + return $this->email; + } + + /** + * @param $phone + * @return PhoneAdapter + */ + public function phone($phone = null) + { + if (is_array($phone)) + { + $this->phone = new PhoneAdapter(new Phone($phone)); + } + + return $this->phone; + } + + /** + * @param array|null $subtotals + * @return array + */ + public function subtotals(?array $subtotals = null) + { + if (is_array($subtotals)) + { + foreach ($subtotals as $subtotal) + { + $this->subtotals[] = new Subtotal($subtotal); + } + } + + return $this->subtotals; + } +} diff --git a/src/PaymentMethods/In3/Models/PayPayload.php b/src/PaymentMethods/In3Old/Models/PayPayload.php similarity index 95% rename from src/PaymentMethods/In3/Models/PayPayload.php rename to src/PaymentMethods/In3Old/Models/PayPayload.php index ad05d9e5..ead144f7 100644 --- a/src/PaymentMethods/In3/Models/PayPayload.php +++ b/src/PaymentMethods/In3Old/Models/PayPayload.php @@ -18,7 +18,7 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\PaymentMethods\In3\Models; +namespace Buckaroo\PaymentMethods\In3Old\Models; use Buckaroo\Models\ClientIP; diff --git a/src/PaymentMethods/In3/Models/Subtotal.php b/src/PaymentMethods/In3Old/Models/Subtotal.php similarity index 94% rename from src/PaymentMethods/In3/Models/Subtotal.php rename to src/PaymentMethods/In3Old/Models/Subtotal.php index 1c1b6fd6..2c95eb2f 100644 --- a/src/PaymentMethods/In3/Models/Subtotal.php +++ b/src/PaymentMethods/In3Old/Models/Subtotal.php @@ -18,7 +18,7 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\PaymentMethods\In3\Models; +namespace Buckaroo\PaymentMethods\In3Old\Models; use Buckaroo\Models\Model; diff --git a/src/PaymentMethods/In3Old/Service/ParameterKeys/AddressAdapter.php b/src/PaymentMethods/In3Old/Service/ParameterKeys/AddressAdapter.php new file mode 100644 index 00000000..868dda39 --- /dev/null +++ b/src/PaymentMethods/In3Old/Service/ParameterKeys/AddressAdapter.php @@ -0,0 +1,31 @@ + 'HouseNumberSuffix', + 'zipcode' => 'ZipCode', + ]; +} diff --git a/src/PaymentMethods/In3Old/Service/ParameterKeys/ArticleAdapter.php b/src/PaymentMethods/In3Old/Service/ParameterKeys/ArticleAdapter.php new file mode 100644 index 00000000..470eed16 --- /dev/null +++ b/src/PaymentMethods/In3Old/Service/ParameterKeys/ArticleAdapter.php @@ -0,0 +1,33 @@ + 'Code', + 'description' => 'Name', + 'quantity' => 'Quantity', + 'price' => 'Price', + ]; +} diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/CompanyAdapter.php b/src/PaymentMethods/In3Old/Service/ParameterKeys/CompanyAdapter.php similarity index 93% rename from src/PaymentMethods/In3/Service/ParameterKeys/CompanyAdapter.php rename to src/PaymentMethods/In3Old/Service/ParameterKeys/CompanyAdapter.php index 868543c1..ab56fa23 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/CompanyAdapter.php +++ b/src/PaymentMethods/In3Old/Service/ParameterKeys/CompanyAdapter.php @@ -18,7 +18,7 @@ * @license https://tldrlegal.com/license/mit-license */ -namespace Buckaroo\PaymentMethods\In3\Service\ParameterKeys; +namespace Buckaroo\PaymentMethods\In3Old\Service\ParameterKeys; use Buckaroo\Models\Adapters\ServiceParametersKeysAdapter; diff --git a/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php new file mode 100644 index 00000000..14bb2750 --- /dev/null +++ b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php @@ -0,0 +1,30 @@ + 'Phone', + ]; +} diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 9221b81f..ca9149df 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -42,6 +42,7 @@ use Buckaroo\PaymentMethods\iDealQR\iDealQR; use Buckaroo\PaymentMethods\iDin\iDin; use Buckaroo\PaymentMethods\In3\In3; +use Buckaroo\PaymentMethods\In3Old\In3Old; use Buckaroo\PaymentMethods\KBC\KBC; use Buckaroo\PaymentMethods\KlarnaKP\KlarnaKP; use Buckaroo\PaymentMethods\KlarnaPay\KlarnaPay; @@ -91,6 +92,7 @@ class PaymentMethodFactory iDealQR::class => ['ideal_qr'], iDin::class => ['idin'], In3::class => ['in3'], + In3Old::class => ['in3old'], KlarnaPay::class => ['klarna', 'klarnain'], KlarnaKP::class => ['klarnakp'], Surepay::class => ['surepay'], diff --git a/tests/Buckaroo/Payments/AfterpayTest.php b/tests/Buckaroo/Payments/AfterpayTest.php index 6ee4676c..623d70f4 100644 --- a/tests/Buckaroo/Payments/AfterpayTest.php +++ b/tests/Buckaroo/Payments/AfterpayTest.php @@ -124,14 +124,15 @@ private function getPaymentPayload(?array $additional = null): array 'clientIP' => '127.0.0.1', 'billing' => [ 'recipient' => [ - 'category' => RecipientCategory::PERSON, + 'category' => RecipientCategory::COMPANY, 'careOf' => 'John Smith', 'title' => 'Mrs', 'firstName' => 'John', 'lastName' => 'Do', 'birthDate' => '1990-01-01', + 'companyName' => 'buckarooTest', 'conversationLanguage' => 'NL', - 'identificationNumber' => 'IdNumber12345', + 'chamberOfCommerce' => 'IdNumber12345', 'customerNumber' => 'customerNumber12345' ], 'address' => [ diff --git a/tests/Buckaroo/Payments/In3OldTest.php b/tests/Buckaroo/Payments/In3OldTest.php new file mode 100644 index 00000000..a4cd9b7e --- /dev/null +++ b/tests/Buckaroo/Payments/In3OldTest.php @@ -0,0 +1,123 @@ +buckaroo->method('in3old')->pay($this->getPaymentPayload()); + + $this->assertTrue($response->isSuccess()); + } + + /** + * @return void + * @test + */ + public function it_creates_a_in3old_installments_payment() + { + $response = $this->buckaroo->method('in3Old')->payInInstallments($this->getPaymentPayload()); + + $this->assertTrue($response->isPendingProcessing()); + } + + /** + * @return void + * @test + */ + public function it_creates_a_in3old_refund() + { + $response = $this->buckaroo->method('in3Old')->refund([ + 'amountCredit' => 10, + 'invoice' => '10000480', + 'originalTransactionKey' => '9AA4C81A08A84FA7B68E6A6A6291XXXX', + ]); + + $this->assertTrue($response->isFailed()); + } + + private function getPaymentPayload(): array + { + return [ + 'amountDebit' => 9.5, + 'order' => uniqid(), + 'invoice' => uniqid(), + 'description' => 'This is a test order', + 'invoiceDate' => '22-01-2018', + 'customerType' => 'Company', + 'email' => 'test@buckaroo.nl', + 'phone' => [ + 'mobile' => '0612345678', + ], + 'articles' => [ + [ + 'identifier' => uniqid(), + 'description' => 'Blue Toy Car', + 'quantity' => '1', + 'price' => 10.00, + ], + ], + 'company' => [ + 'companyName' => 'My Company B.V.', + 'chamberOfCommerce' => '123456', + ], + 'customer' => [ + 'gender' => Gender::FEMALE, + 'initials' => 'J.S.', + 'lastName' => 'Aflever', + 'email' => 'billingcustomer@buckaroo.nl', + 'phone' => '0610000000', + 'culture' => 'nl-NL', + 'birthDate' => '1990-01-01', + ], + 'address' => [ + 'street' => 'Hoofdstraat', + 'houseNumber' => '2', + 'houseNumberAdditional' => 'a', + 'zipcode' => '8441EE', + 'city' => 'Heerenveen', + 'country' => 'NL', + ], + 'subtotals' => [ + [ + 'name' => 'Korting', + 'value' => -2.00, + ], + [ + 'name' => 'Betaaltoeslag', + 'value' => 0.50, + ], + [ + 'name' => 'Verzendkosten', + 'value' => 1.00, + ], + ], + ]; + } +} diff --git a/tests/Buckaroo/Payments/In3Test.php b/tests/Buckaroo/Payments/In3Test.php index ea22d7af..18a32c85 100644 --- a/tests/Buckaroo/Payments/In3Test.php +++ b/tests/Buckaroo/Payments/In3Test.php @@ -20,6 +20,7 @@ namespace Tests\Buckaroo\Payments; +use Buckaroo\Resources\Constants\RecipientCategory; use Tests\Buckaroo\BuckarooTestCase; use Buckaroo\Resources\Constants\Gender; @@ -33,17 +34,6 @@ public function it_creates_a_in3_payment() { $response = $this->buckaroo->method('in3')->pay($this->getPaymentPayload()); - $this->assertTrue($response->isSuccess()); - } - - /** - * @return void - * @test - */ - public function it_creates_a_in3_installments_payment() - { - $response = $this->buckaroo->method('in3')->payInInstallments($this->getPaymentPayload()); - $this->assertTrue($response->isPendingProcessing()); } @@ -53,7 +43,7 @@ public function it_creates_a_in3_installments_payment() */ public function it_creates_a_in3_refund() { - $response = $this->buckaroo->method('in3')->refund([ + $response = $this->buckaroo->method('in3Old')->refund([ 'amountCredit' => 10, 'invoice' => '10000480', 'originalTransactionKey' => '9AA4C81A08A84FA7B68E6A6A6291XXXX', @@ -62,62 +52,93 @@ public function it_creates_a_in3_refund() $this->assertTrue($response->isFailed()); } - private function getPaymentPayload(): array + private function getPaymentPayload(?array $additional = null): array { - return [ - 'amountDebit' => 9.5, - 'order' => uniqid(), - 'invoice' => uniqid(), - 'description' => 'This is a test order', - 'invoiceDate' => '22-01-2018', - 'customerType' => 'Company', - 'email' => 'test@buckaroo.nl', - 'phone' => [ - 'mobile' => '0612345678', - ], - 'articles' => [ - [ - 'identifier' => uniqid(), - 'description' => 'Blue Toy Car', - 'quantity' => '1', - 'price' => 10.00, + $payload = [ + 'amountDebit' => 52.30, + 'description' => 'in3 pay', + 'order' => uniqid(), + 'invoice' => uniqid(), + 'clientIP' => '127.0.0.1', + 'billing' => [ + 'recipient' => [ + 'category' => 'B2C', + 'initials' => 'J', + 'firstName' => 'John', + 'lastName' => 'Dona', + 'birthDate' => '1990-01-01', + 'customerNumber' => '12345', + 'phone' => '0612345678', + 'country' => 'NL', + 'companyName' => 'My Company B.V.', + 'chamberOfCommerce' => '123456' ], + 'address' => [ + 'street' => 'Hoofdstraat', + 'houseNumber' => '13', + 'houseNumberAdditional' => 'a', + 'zipcode' => '1234AB', + 'city' => 'Heerenveen', + 'country' => 'NL', + ], + 'phone' => [ + 'phone' => '0698765433', + ], + 'email' => 'test@buckaroo.nl', ], - 'company' => [ - 'companyName' => 'My Company B.V.', - 'chamberOfCommerce' => '123456', - ], - 'customer' => [ - 'gender' => Gender::FEMALE, - 'initials' => 'J.S.', - 'lastName' => 'Aflever', - 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => '0610000000', - 'culture' => 'nl-NL', - 'birthDate' => '1990-01-01', - ], - 'address' => [ - 'street' => 'Hoofdstraat', - 'houseNumber' => '2', - 'houseNumberAdditional' => 'a', - 'zipcode' => '8441EE', - 'city' => 'Heerenveen', - 'country' => 'NL', + 'shipping' => [ + 'recipient' => [ + 'category' => 'B2C', + 'careOf' => 'John Smith', + 'firstName' => 'John', + 'lastName' => 'Do', + 'chamberOfCommerce' => '123456' + ], + 'address' => [ + 'street' => 'Kalverstraat', + 'houseNumber' => '13', + 'houseNumberAdditional' => 'b', + 'zipcode' => '4321EB', + 'city' => 'Amsterdam', + 'country' => 'NL', + ], ], - 'subtotals' => [ + 'articles' => [ [ - 'name' => 'Korting', - 'value' => -2.00, + 'identifier' => 'Articlenumber1', + 'type' => 'Physical', + 'description' => 'Blue Toy Car', + 'category' => 'test product', + 'vatPercentage' => '21', + 'quantity' => '2', + 'price' => '20.10', ], [ - 'name' => 'Betaaltoeslag', - 'value' => 0.50, + 'identifier' => 'Articlenumber2', + 'type' => 'Physical', + 'description' => 'Red Toy Car', + 'category' => 'test product', + 'vatPercentage' => '21', + 'quantity' => '1', + 'price' => '10.10', ], [ - 'name' => 'Verzendkosten', - 'value' => 1.00, + 'identifier' => 'USPShippingID', + 'type' => 'Physical', + 'description' => 'UPS', + 'category' => 'test product', + 'vatPercentage' => '21', + 'quantity' => '1', + 'price' => '2', ], - ], + ] ]; + + if ($additional) + { + return array_merge($additional, $payload); + } + + return $payload; } } From 7a083546b47a0c3c93ede13dd1ad782c5bbf4e77 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 30 Aug 2023 13:45:14 +0800 Subject: [PATCH 53/81] Prepare release 1.8.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 428f911c..ebf10227 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.7.3", + "version": "1.8.0", "type": "library", "require": { "php": ">=7.4|^8.0", From 69a4d2f70c9da995225fefb0f3d94971b423cdbe Mon Sep 17 00:00:00 2001 From: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Date: Tue, 5 Sep 2023 16:33:01 +0200 Subject: [PATCH 54/81] BP-2873 --- src/PaymentMethods/GiftCard/GiftCard.php | 12 ++++++- src/PaymentMethods/GiftCard/Models/Refund.php | 35 +++++++++++++++++++ tests/Buckaroo/Payments/GiftcardsTest.php | 2 ++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 src/PaymentMethods/GiftCard/Models/Refund.php diff --git a/src/PaymentMethods/GiftCard/GiftCard.php b/src/PaymentMethods/GiftCard/GiftCard.php index ae3864b2..336d8ec5 100644 --- a/src/PaymentMethods/GiftCard/GiftCard.php +++ b/src/PaymentMethods/GiftCard/GiftCard.php @@ -23,6 +23,7 @@ use Buckaroo\Models\Model; use Buckaroo\PaymentMethods\GiftCard\Models\Pay; use Buckaroo\PaymentMethods\GiftCard\Models\PayPayload; +use Buckaroo\PaymentMethods\GiftCard\Models\Refund; use Buckaroo\PaymentMethods\PayablePaymentMethod; use Buckaroo\Transaction\Response\TransactionResponse; @@ -41,6 +42,15 @@ public function pay(?Model $model = null): TransactionResponse return parent::pay($model ?? $pay); } + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function refund(?Model $model = null): TransactionResponse + { + return parent::refund($model ?? new Refund($this->payload)); + } + /** * @return TransactionResponse */ @@ -51,7 +61,7 @@ public function payRedirect(): TransactionResponse $pay = new PayPayload($this->payload); $this->setPayPayload(); - + return $this->postRequest(); } diff --git a/src/PaymentMethods/GiftCard/Models/Refund.php b/src/PaymentMethods/GiftCard/Models/Refund.php new file mode 100644 index 00000000..30a37408 --- /dev/null +++ b/src/PaymentMethods/GiftCard/Models/Refund.php @@ -0,0 +1,35 @@ + 'testinvoice 123', 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', 'name' => 'boekenbon', + 'email' => 'test123@hotmail.com', + 'lastname' => 'test123' ]); $this->assertTrue($response->isFailed()); From 375555471ffcfdd25449ef6f45eb0c65029a66f3 Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:25:08 +0200 Subject: [PATCH 55/81] BP-2912 rename IDin to iDin (#145) * BP-2417 Added Thunes * Idin name change to idin * deleted article Thunes * Changed uppercase * Changed name * excluded iDin in check --- phpcs.xml | 1 + src/PaymentMethods/iDin/{IDin.php => iDin.php} | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) rename src/PaymentMethods/iDin/{IDin.php => iDin.php} (96%) diff --git a/phpcs.xml b/phpcs.xml index 7391a251..e60e272d 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -15,6 +15,7 @@ src/PaymentMethods/iDeal/iDeal.php src/PaymentMethods/iDealQR/iDealQR.php + src/PaymentMethods/iDin/iDin.php diff --git a/src/PaymentMethods/iDin/IDin.php b/src/PaymentMethods/iDin/iDin.php similarity index 96% rename from src/PaymentMethods/iDin/IDin.php rename to src/PaymentMethods/iDin/iDin.php index 4942e6f5..1855a6a1 100644 --- a/src/PaymentMethods/iDin/IDin.php +++ b/src/PaymentMethods/iDin/iDin.php @@ -26,12 +26,12 @@ use Buckaroo\PaymentMethods\iDin\Service\ParameterKeys\IssuerAdapter; use Buckaroo\PaymentMethods\PaymentMethod; -class IDin extends PaymentMethod +class iDin extends PaymentMethod { /** * @var string */ - protected string $paymentName = 'Idin'; + protected string $paymentName = 'idin'; /** * @var array|string[] */ From eefdf3e14ae53f4fc5e934e363b53f231504a789 Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Fri, 20 Oct 2023 11:10:05 +0300 Subject: [PATCH 56/81] BP-3034 Add payment method "MB WAY" (#147) * BP-3034 Add payment method "MB WAY" * fix namespace * fix folder naming * fix tests --------- Co-authored-by: Ivascu Madalin --- example/transactions/mbway.php | 21 ++++++++ src/PaymentMethods/MBWay/MBWay.php | 30 +++++++++++ src/PaymentMethods/PaymentMethodFactory.php | 2 + tests/Buckaroo/Payments/MBWayTest.php | 55 +++++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 example/transactions/mbway.php create mode 100644 src/PaymentMethods/MBWay/MBWay.php create mode 100644 tests/Buckaroo/Payments/MBWayTest.php diff --git a/example/transactions/mbway.php b/example/transactions/mbway.php new file mode 100644 index 00000000..f32d6822 --- /dev/null +++ b/example/transactions/mbway.php @@ -0,0 +1,21 @@ +method('mbway')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, +]); + +//Refund +$response = $buckaroo->method('mbway')->refund([ + 'invoice' => '', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '', //Set transaction key of the transaction to refund + 'amountCredit' => 10.10, +]); diff --git a/src/PaymentMethods/MBWay/MBWay.php b/src/PaymentMethods/MBWay/MBWay.php new file mode 100644 index 00000000..89e74aaa --- /dev/null +++ b/src/PaymentMethods/MBWay/MBWay.php @@ -0,0 +1,30 @@ + ['in3old'], KlarnaPay::class => ['klarna', 'klarnain'], KlarnaKP::class => ['klarnakp'], + MBWay::class => ['mbway'], Surepay::class => ['surepay'], Subscriptions::class => ['subscriptions'], SEPA::class => ['sepadirectdebit', 'sepa'], diff --git a/tests/Buckaroo/Payments/MBWayTest.php b/tests/Buckaroo/Payments/MBWayTest.php new file mode 100644 index 00000000..dd7878ca --- /dev/null +++ b/tests/Buckaroo/Payments/MBWayTest.php @@ -0,0 +1,55 @@ +buckaroo->method('mbway')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + ]); + + $this->assertTrue($response->isPendingProcessing()); + } + + /** + * @test + */ + public function it_creates_a_mbway_refund() + { + $response = $this->buckaroo->method('mbway')->refund([ + 'amountCredit' => 10, + 'invoice' => 'testinvoice 123', + 'description' => 'refund', + 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', + ]); + + $this->assertTrue($response->isFailed()); + } +} From 568ff22d291f6e36d0642ba9e93bd2b217511d48 Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Fri, 20 Oct 2023 11:11:04 +0300 Subject: [PATCH 57/81] BP-3020 Add payment method "Multibanco" (#148) * BP-3020 Add payment method "Multibanco" * fix tests --------- Co-authored-by: Ivascu Madalin --- example/transactions/multibanco.php | 21 ++++++++ src/PaymentMethods/Multibanco/Multibanco.php | 30 +++++++++++ src/PaymentMethods/PaymentMethodFactory.php | 2 + tests/Buckaroo/Payments/MultibancoTest.php | 55 ++++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 example/transactions/multibanco.php create mode 100644 src/PaymentMethods/Multibanco/Multibanco.php create mode 100644 tests/Buckaroo/Payments/MultibancoTest.php diff --git a/example/transactions/multibanco.php b/example/transactions/multibanco.php new file mode 100644 index 00000000..74d8ce32 --- /dev/null +++ b/example/transactions/multibanco.php @@ -0,0 +1,21 @@ +method('multibanco')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, +]); + +//Refund +$response = $buckaroo->method('multibanco')->refund([ + 'invoice' => '', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '', //Set transaction key of the transaction to refund + 'amountCredit' => 10.10, +]); diff --git a/src/PaymentMethods/Multibanco/Multibanco.php b/src/PaymentMethods/Multibanco/Multibanco.php new file mode 100644 index 00000000..5444842c --- /dev/null +++ b/src/PaymentMethods/Multibanco/Multibanco.php @@ -0,0 +1,30 @@ + ['in3old'], KlarnaPay::class => ['klarna', 'klarnain'], KlarnaKP::class => ['klarnakp'], + Multibanco::class => ['multibanco'], MBWay::class => ['mbway'], Surepay::class => ['surepay'], Subscriptions::class => ['subscriptions'], diff --git a/tests/Buckaroo/Payments/MultibancoTest.php b/tests/Buckaroo/Payments/MultibancoTest.php new file mode 100644 index 00000000..b8d4c753 --- /dev/null +++ b/tests/Buckaroo/Payments/MultibancoTest.php @@ -0,0 +1,55 @@ +buckaroo->method('multibanco')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + ]); + + $this->assertTrue($response->isPendingProcessing()); + } + + /** + * @test + */ + public function it_creates_a_multibanco_refund() + { + $response = $this->buckaroo->method('multibanco')->refund([ + 'amountCredit' => 10, + 'invoice' => 'testinvoice 123', + 'description' => 'refund', + 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', + ]); + + $this->assertTrue($response->isFailed()); + } +} From 344d7fd5970cf7b7d2ed3dd7692e4e016b2ff683 Mon Sep 17 00:00:00 2001 From: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Date: Wed, 25 Oct 2023 10:16:14 +0200 Subject: [PATCH 58/81] Add GitHub action file --- .github/workflows/sonarqube.yml | 21 +++++++++++++++++++++ sonar-project.properties | 9 +++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 00000000..ce169472 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,21 @@ +on: + push: + branches: + - master + - develop + - 'bugfix/**' + pull_request: + types: [opened, synchronize, reopened] +name: SonarQube PR Analysis +jobs: + sonarqube: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..5f32df86 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,9 @@ +# Unique key for the project +sonar.projectKey=buckaroo:php_sdk + +# Display name and version for the SonarQube UI +sonar.projectName=Buckaroo PHP SDK +sonar.projectVersion=1.0 + +# Path to the source code, relative to the sonar-project.properties file +sonar.sources=. From 96c957b703c39e0b612cbd7c88c293226bef307e Mon Sep 17 00:00:00 2001 From: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:39:27 +0200 Subject: [PATCH 59/81] Phone number fixes (#144) * Remove unused phone parameters * Remove comma after last element from array --- .../Afterpay/Service/ParameterKeys/PhoneAdapter.php | 2 +- .../AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php | 2 +- .../Billink/Service/ParameterKeys/PhoneAdapter.php | 3 +-- src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php | 4 +--- .../In3Old/Service/ParameterKeys/PhoneAdapter.php | 2 +- .../KlarnaKP/Service/ParameterKeys/PhoneAdapter.php | 3 +-- .../KlarnaPay/Service/ParameterKeys/PhoneAdapter.php | 2 +- .../Paypal/Service/ParameterKeys/PhoneAdapter.php | 2 +- .../Tinka/Service/ParameterKeys/PhoneAdapter.php | 2 +- 9 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/PaymentMethods/Afterpay/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Afterpay/Service/ParameterKeys/PhoneAdapter.php index 5c8e9d5f..6a4d52fb 100644 --- a/src/PaymentMethods/Afterpay/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/Afterpay/Service/ParameterKeys/PhoneAdapter.php @@ -26,6 +26,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ 'landLine' => 'Phone', - 'mobile' => 'MobilePhone', + 'mobile' => 'MobilePhone' ]; } diff --git a/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php index d3fb8802..d8fd974d 100644 --- a/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/AfterpayDigiAccept/Service/ParameterKeys/PhoneAdapter.php @@ -23,6 +23,6 @@ class PhoneAdapter extends ServiceAdapter { protected array $keys = [ - 'mobile' => 'PhoneNumber', + 'mobile' => 'PhoneNumber' ]; } diff --git a/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php index e8e80660..98a4a3d5 100644 --- a/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/Billink/Service/ParameterKeys/PhoneAdapter.php @@ -25,7 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'landLine' => 'Phone', - 'mobile' => 'MobilePhone', + 'mobile' => 'MobilePhone' ]; } diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php index dbba7c25..f18dd568 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php @@ -25,8 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'landLine' => 'Phone', - 'mobile' => 'MobilePhone', - 'phone' => 'Phone' + 'mobile' => 'MobilePhone' ]; } diff --git a/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php index 14bb2750..17af7e7c 100644 --- a/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } diff --git a/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php index d1d295fa..f345e2ad 100644 --- a/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/KlarnaKP/Service/ParameterKeys/PhoneAdapter.php @@ -25,7 +25,6 @@ class PhoneAdapter extends RecipientAdapter { protected array $keys = [ - 'landLine' => 'PhoneNumber', - 'mobile' => 'CellPhoneNumber', + 'mobile' => 'CellPhoneNumber' ]; } diff --git a/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php index da15397f..306bfff9 100644 --- a/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/KlarnaPay/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } diff --git a/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php index c86325eb..ba83d94b 100644 --- a/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/Paypal/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } diff --git a/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php index 7107fa2c..e9638788 100644 --- a/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'Phone', + 'mobile' => 'Phone' ]; } From 88852059c4d3583d667f51a111683d5888a59e3d Mon Sep 17 00:00:00 2001 From: Vildan Bina Date: Mon, 13 Nov 2023 13:51:03 +0100 Subject: [PATCH 60/81] add method to get issuers for PayByBank (#152) + add tests for PayByBank & iDeal + create trait for reusable --- .../PaymentInitiation/PaymentInitiation.php | 16 +++++ src/PaymentMethods/iDeal/iDeal.php | 34 +++-------- src/Services/TraitHelpers/HasIssuers.php | 59 +++++++++++++++++++ tests/Buckaroo/Payments/IdealTest.php | 17 ++++++ tests/Buckaroo/Payments/PaymentInitiation.php | 16 +++++ 5 files changed, 117 insertions(+), 25 deletions(-) create mode 100644 src/Services/TraitHelpers/HasIssuers.php diff --git a/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php b/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php index 5c3cbafd..0dbb018f 100644 --- a/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php +++ b/src/PaymentMethods/PaymentInitiation/PaymentInitiation.php @@ -2,13 +2,18 @@ namespace Buckaroo\PaymentMethods\PaymentInitiation; +use Buckaroo\Exceptions\BuckarooException; use Buckaroo\Models\Model; use Buckaroo\PaymentMethods\PayablePaymentMethod; use Buckaroo\PaymentMethods\PaymentInitiation\Models\Pay; +use Buckaroo\Services\TraitHelpers\HasIssuers; use Buckaroo\Transaction\Response\TransactionResponse; class PaymentInitiation extends PayablePaymentMethod { + use HasIssuers { + issuers as traitIssuers; + } protected string $paymentName = 'PayByBank'; protected array $requiredConfigFields = ['currency', 'returnURL', 'returnURLCancel', 'pushURL']; @@ -20,4 +25,15 @@ public function pay(?Model $model = null): TransactionResponse { return parent::pay($model ?? new Pay($this->payload)); } + + /** + * @return array + * @throws BuckarooException + */ + public function issuers(): array + { + $this->serviceVersion = 1; + + return $this->traitIssuers(); + } } diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index 2596c684..dbd07614 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -22,14 +22,19 @@ namespace Buckaroo\PaymentMethods\iDeal; +use Buckaroo\Exceptions\BuckarooException; use Buckaroo\Models\Model; use Buckaroo\PaymentMethods\iDeal\Models\Pay; use Buckaroo\PaymentMethods\PayablePaymentMethod; -use Buckaroo\Transaction\Request\TransactionRequest; +use Buckaroo\Services\TraitHelpers\HasIssuers; use Buckaroo\Transaction\Response\TransactionResponse; class iDeal extends PayablePaymentMethod { + use HasIssuers { + issuers as traitIssuers; + } + /** * @var string */ @@ -72,33 +77,12 @@ public function instantRefund(?Model $model = null):TransactionResponse /** * @return array - * @throws \Buckaroo\Exceptions\BuckarooException + * @throws BuckarooException */ public function issuers(): array { - $request = new TransactionRequest; - - try - { - $response = $this->client->specification($request, 'ideal', 2); - } catch (BuckarooException $e) - { - return []; - } - - $issuerList = []; - if (isset($response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions'])) - { - $issuersData = $response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions']; - if (count($issuersData) > 0) - { - foreach ($issuersData as $issuer) - { - $issuerList[] = ['id' => $issuer['Value'], 'name' => $issuer['Description']]; - } - } - } + $this->serviceVersion = 2; - return $issuerList; + return $this->traitIssuers(); } } diff --git a/src/Services/TraitHelpers/HasIssuers.php b/src/Services/TraitHelpers/HasIssuers.php new file mode 100644 index 00000000..0b928237 --- /dev/null +++ b/src/Services/TraitHelpers/HasIssuers.php @@ -0,0 +1,59 @@ +client->specification($request, $this->paymentName, $this->serviceVersion()); + } catch (BuckarooException $e) + { + return []; + } + + $issuerList = []; + if (isset($response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions'])) + { + $issuersData = $response->data()['Actions']['0']['RequestParameters'][0]['ListItemDescriptions']; + if (count($issuersData) > 0) + { + foreach ($issuersData as $issuer) + { + $issuerList[] = ['id' => $issuer['Value'], 'name' => $issuer['Description']]; + } + } + } + + return $issuerList; + } +} diff --git a/tests/Buckaroo/Payments/IdealTest.php b/tests/Buckaroo/Payments/IdealTest.php index a8f5c177..efab199d 100644 --- a/tests/Buckaroo/Payments/IdealTest.php +++ b/tests/Buckaroo/Payments/IdealTest.php @@ -76,6 +76,23 @@ protected function setUp(): void ]; } + /** + * @return void + * @test + */ + public function it_get_ideal_issuers() + { + $response = $this->buckaroo->method('ideal')->issuers(); + + $this->assertIsArray($response); + foreach ($response as $item) + { + $this->assertIsArray($item); + $this->assertArrayHasKey('id', $item); + $this->assertArrayHasKey('name', $item); + } + } + /** * @return void * @test diff --git a/tests/Buckaroo/Payments/PaymentInitiation.php b/tests/Buckaroo/Payments/PaymentInitiation.php index 3759c63d..fd6f5cc0 100644 --- a/tests/Buckaroo/Payments/PaymentInitiation.php +++ b/tests/Buckaroo/Payments/PaymentInitiation.php @@ -6,6 +6,22 @@ class PaymentInitiation extends BuckarooTestCase { + /** + * @return void + * @test + */ + public function it_get_payment_initiation_issuers() + { + $response = $this->buckaroo->method('paybybank')->issuers(); + + $this->assertIsArray($response); + foreach ($response as $item) + { + $this->assertIsArray($item); + $this->assertArrayHasKey('id', $item); + $this->assertArrayHasKey('name', $item); + } + } /** * @test From 3dde3e0fff75831acb6276d4db10e8c421c0a0b0 Mon Sep 17 00:00:00 2001 From: Sander H <37146557+SandervdHulst@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:29:43 +0100 Subject: [PATCH 61/81] BP-3009 Resolve SonarQube bugs and update README.md (#151) * Bugs and code smells * Deleted unused method --- README.md | 3 +- .../additional_services/credit_management.php | 5 +- example/additional_services/idin.php | 2 +- example/additional_services/marketplaces.php | 2 +- example/additional_services/pay_per_email.php | 2 +- example/additional_services/subscriptions.php | 6 +-- example/additional_services/surepay.php | 2 +- example/additional_services/voucher.php | 2 +- example/additional_services/wallets.php | 2 +- example/bootstrap.php | 2 + example/responses/push.php | 18 ++++++-- example/responses/return.php | 5 +- example/transactions/afterpay.php | 6 +-- example/transactions/afterpaydigiaccept.php | 2 +- example/transactions/alipay.php | 2 +- example/transactions/applepay.php | 2 +- example/transactions/applepay_redirect.php | 2 +- example/transactions/bancontact.php | 13 ++++-- example/transactions/belfius.php | 2 +- example/transactions/billink.php | 5 +- example/transactions/credit_click.php | 2 +- example/transactions/creditcard.php | 20 +++++--- example/transactions/eps.php | 2 +- example/transactions/giftcards.php | 2 +- example/transactions/giftcards_redirect.php | 7 ++- example/transactions/giropay.php | 2 +- example/transactions/ideal.php | 2 +- example/transactions/ideal_qr.php | 2 +- example/transactions/in3.php | 8 ++-- example/transactions/in3old.php | 2 +- example/transactions/kbc.php | 2 +- example/transactions/klarna.php | 2 +- example/transactions/klarnakp.php | 2 +- example/transactions/mbway.php | 2 +- example/transactions/multibanco.php | 2 +- example/transactions/noservicespecified.php | 2 +- example/transactions/payconiq.php | 2 +- example/transactions/payment_initiation.php | 4 +- example/transactions/paypal.php | 2 +- example/transactions/pos.php | 2 +- example/transactions/przelewy24.php | 2 +- example/transactions/sepa.php | 2 +- example/transactions/sofort.php | 2 +- example/transactions/thunes.php | 2 +- example/transactions/tinka.php | 2 +- example/transactions/transfer.php | 2 +- example/transactions/trustly.php | 2 +- example/transactions/wechat.php | 2 +- src/PaymentMethods/iDeal/iDeal.php | 1 + src/Transaction/Request/Request.php | 26 ----------- .../Payments/AfterpayDigiAcceptTest.php | 15 ------ tests/Buckaroo/Payments/AfterpayTest.php | 21 ++------- tests/Buckaroo/Payments/BancontactTest.php | 5 +- tests/Buckaroo/Payments/BatchTest.php | 2 +- tests/Buckaroo/Payments/BillinkTest.php | 6 ++- tests/Buckaroo/Payments/CreditcardTest.php | 12 +++-- tests/Buckaroo/Payments/IdealTest.php | 9 +--- tests/Buckaroo/Payments/MarketplacesTest.php | 3 +- .../NoServiceSpecifiedPaymentTest.php | 2 +- tests/Buckaroo/Payments/PaymentInitiation.php | 2 +- tests/Buckaroo/Payments/PushTest.php | 46 +++++++------------ 61 files changed, 147 insertions(+), 175 deletions(-) diff --git a/README.md b/README.md index 225b0055..4d68cf0b 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ You can find your credentials in plaza [WEBSITE_KEY](https://plaza.buckaroo.nl/ require __DIR__ . '/vendor/autoload.php'; # Get your website & secret key in your plaza. -# You can perform a test payment by giving the third param with the string "test", on default it is set on "live" +# You can perform a test payment by giving the third param with the string "test", on default it is set on "test". +# By changing the value of the third parameter to "live", a live transaction can be performed. $buckaroo = new \BuckarooClient('WEBSITE_KEY', 'SECRET_KEY', 'test'); ``` diff --git a/example/additional_services/credit_management.php b/example/additional_services/credit_management.php index e26bd257..a57cc686 100644 --- a/example/additional_services/credit_management.php +++ b/example/additional_services/credit_management.php @@ -1,6 +1,6 @@ method('sepadirectdebit')->combine($invoice)->pay([ 'invoice' => uniqid(), diff --git a/example/additional_services/idin.php b/example/additional_services/idin.php index 8fe3a8b6..027166c4 100644 --- a/example/additional_services/idin.php +++ b/example/additional_services/idin.php @@ -1,6 +1,6 @@ [ - 'mobile' => '0612345678', + 'mobile' => '0612345679', ], 'debtor' => [ 'code' => 'johnsmith4', @@ -113,7 +113,7 @@ 'country' => 'NL', ], 'phone' => [ - 'mobile' => '0612345678', + 'mobile' => '0612345670', ], ]); diff --git a/example/additional_services/surepay.php b/example/additional_services/surepay.php index 33f5017b..a3ff5035 100644 --- a/example/additional_services/surepay.php +++ b/example/additional_services/surepay.php @@ -1,6 +1,6 @@ "J. de Tèster", "brq_invoicenumber" => "SDKDevelopment.com_INVOICE_NO_628c6d032af90", "brq_ordernumber" => "SDKDevelopment.com_ORDER_NO_628c6d032af95", - "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", + "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a2 + 1651d4734cc568816f9bd59c2092911e6c0da", "brq_payment" => "D44ACDD0F99D4A1C811D2CD3EFDB05BA", "brq_payment_method" => "ideal", "brq_SERVICE_ideal_consumerBIC" => "RABONL2U", @@ -40,7 +41,18 @@ //START JSON PUSH $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638:1658227572'; -$post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001","Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true,"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021","Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"},{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"},{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}],"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; +$post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal", +"Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001", +"Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true, +"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021", +"Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"}, +{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"}, +{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}], +"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento", +"Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null, +"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster", +"PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734 +cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; $uri = 'https://buckaroo.dev/push'; $reply_handler = new ReplyHandler($buckaroo->client()->config(), $post_data, $auth_header, $uri); diff --git a/example/responses/return.php b/example/responses/return.php index 319091bc..99aa5410 100644 --- a/example/responses/return.php +++ b/example/responses/return.php @@ -1,6 +1,6 @@ "J. de Tèster", "brq_invoicenumber" => "SDKDevelopment.com_INVOICE_NO_628c6d032af90", "brq_ordernumber" => "SDKDevelopment.com_ORDER_NO_628c6d032af95", - "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", + "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f966 + 69a21651d4734cc568816f9bd59c2092911e6c0da", "brq_payment" => "D44ACDD0F99D4A1C811D2CD3EFDB05BA", "brq_payment_method" => "ideal", "brq_SERVICE_ideal_consumerBIC" => "RABONL2U", diff --git a/example/transactions/afterpay.php b/example/transactions/afterpay.php index 80ff3eab..885148bc 100644 --- a/example/transactions/afterpay.php +++ b/example/transactions/afterpay.php @@ -1,6 +1,6 @@ [ 'mobile' => '0698765433', - 'landline' => '0109876543', + 'landline' => '0109876541', ], 'email' => 'test@buckaroo.nl', ], @@ -103,7 +103,7 @@ 'firstName' => 'Test', 'lastName' => 'Acceptatie', 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => '0109876543', + 'phone' => '0109876542', 'street' => 'Hoofdstraat', 'streetNumber' => '80', 'streetNumberAdditional' => 'A', diff --git a/example/transactions/afterpaydigiaccept.php b/example/transactions/afterpaydigiaccept.php index eb9f01b1..bd3eb614 100644 --- a/example/transactions/afterpaydigiaccept.php +++ b/example/transactions/afterpaydigiaccept.php @@ -1,6 +1,6 @@ method('bancontactmrcash')->pay([ - //'saveToken' => true, //SaveToken is the parameter used to indicate if a token is to be created, that can be used for Wallet Initiated Payments in the future. - //'encryptedCardData' => '', //If this is set PayEncryoted Action will be used. The value of this parameter is the result of the "encryptCardData"-function of our Client Side Encryption SDK. + //'saveToken' => true, //SaveToken is the parameter used to indicate if a token is to be created, that can be used + // for Wallet Initiated Payments in the future. + //'encryptedCardData' => '', //If this is set PayEncryoted Action will be used. + // The value of this parameter is the result of the "encryptCardData"-function of our Client Side Encryption SDK. 'invoice' => uniqid(), 'amountDebit' => 10.10, ]); @@ -20,7 +22,10 @@ 'invoice' => uniqid(), 'amountDebit' => 10.10, 'description' => 'Bancontact PayEncrypted Test 123', - 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gfDV+UyjcPfpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpmvxeiwwea3l4htNoX1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUTiJOtKKcCQlT01YThIkQlj8PWBBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', + 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gfDV+UyjcP + fpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpmvxeiwwea3l4htNoX + 1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUTiJOtKKcCQlT01YThIkQlj8PW + BBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', ]); //Recurrent payment diff --git a/example/transactions/belfius.php b/example/transactions/belfius.php index 06945fd0..3b70e42c 100644 --- a/example/transactions/belfius.php +++ b/example/transactions/belfius.php @@ -1,6 +1,6 @@ method('billink')->cancelAuthorize([ - 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', //Set transaction key of the authorized transaction to cancel + 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', + //Set transaction key of the authorized transaction to cancel 'invoice' => '62905fa2650f4', //Set invoice id 'AmountCredit' => 10, //set amount to capture ]); diff --git a/example/transactions/credit_click.php b/example/transactions/credit_click.php index 32187c1f..63a3c9fe 100644 --- a/example/transactions/credit_click.php +++ b/example/transactions/credit_click.php @@ -1,6 +1,6 @@ 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Pay with security code @@ -27,7 +28,8 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Refund @@ -50,7 +52,8 @@ 'amountDebit' => 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'cardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Authorize with security code @@ -59,7 +62,8 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Capture @@ -68,7 +72,8 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); //Pay Recurrent @@ -77,5 +82,6 @@ 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'securityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDW + n7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); diff --git a/example/transactions/eps.php b/example/transactions/eps.php index 426ed7ae..06530240 100644 --- a/example/transactions/eps.php +++ b/example/transactions/eps.php @@ -1,6 +1,6 @@ method('giftcard')->payRedirect([ 'amountDebit' => 10, 'invoice' => uniqid(), - 'servicesSelectableByClient' => 'westlandbon,ideal,babygiftcard,babyparkgiftcard,beautywellness,boekenbon,boekenvoordeel,designshopsgiftcard,fashioncheque,fashionucadeaukaart,fijncadeau,koffiecadeau,kokenzo,kookcadeau,nationaleentertainmentcard,naturesgift,podiumcadeaukaart,shoesaccessories,webshopgiftcard,wijncadeau,wonenzo,yourgift,vvvgiftcard,parfumcadeaukaart', + 'servicesSelectableByClient' => 'westlandbon,ideal,babygiftcard,babyparkgiftcard,beautywellness,boekenbon, + boekenvoordeel,designshopsgiftcard,fashioncheque,fashionucadeaukaart,fijncadeau,koffiecadeau,kokenzo, + kookcadeau,nationaleentertainmentcard,naturesgift,podiumcadeaukaart,shoesaccessories,webshopgiftcard, + wijncadeau,wonenzo,yourgift,vvvgiftcard,parfumcadeaukaart', 'continueOnIncomplete' => '1', ]); diff --git a/example/transactions/giropay.php b/example/transactions/giropay.php index d1cfbac0..625da64f 100644 --- a/example/transactions/giropay.php +++ b/example/transactions/giropay.php @@ -1,6 +1,6 @@ 'Articlenumber1', 'type' => 'Physical', 'description' => 'Blue Toy Car', - 'category' => 'test product', + 'category' => 'test product1', 'vatPercentage' => '21', 'quantity' => '2', 'price' => '20.10', @@ -69,7 +69,7 @@ 'identifier' => 'Articlenumber2', 'type' => 'Physical', 'description' => 'Red Toy Car', - 'category' => 'test product', + 'category' => 'test product2', 'vatPercentage' => '21', 'quantity' => '1', 'price' => '10.10', @@ -78,7 +78,7 @@ 'identifier' => 'USPShippingID', 'type' => 'Physical', 'description' => 'UPS', - 'category' => 'test product', + 'category' => 'test product3', 'vatPercentage' => '21', 'quantity' => '1', 'price' => '2', diff --git a/example/transactions/in3old.php b/example/transactions/in3old.php index 77272c07..9c7a2321 100644 --- a/example/transactions/in3old.php +++ b/example/transactions/in3old.php @@ -1,6 +1,6 @@ '', //Set invoice number of the transaction to refund 'originalTransactionKey' => '', //Set transaction key of the transaction to refund 'amountCredit' => 10, -]); \ No newline at end of file +]); diff --git a/example/transactions/paypal.php b/example/transactions/paypal.php index d2958527..33866902 100644 --- a/example/transactions/paypal.php +++ b/example/transactions/paypal.php @@ -1,6 +1,6 @@ data; } - /** - * Redirect all method calls prefixed with 'get' or 'set' - * to check if a param exists with that name - * Return or set the param if it does - * - * @param string $method - * @param array $args - * @return mixed - */ - public function __call($method, $args) - { - $prefix = substr($method, 0, 3); - $param = substr($method, 3); - $arg = isset($args[0]) ? $args[0] : null; - - if ($prefix === 'set') - { - return $this->offsetSet($param, $arg); - } elseif ($prefix === 'get') - { - return $this->offsetGet($param); - } - - throw new Exception("Call to undefined method " . __CLASS__ . '::' . $method); - } - /** Implement Arrayable */ public function toArray(): array { diff --git a/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php index 95409eff..0e5dca6e 100644 --- a/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php +++ b/tests/Buckaroo/Payments/AfterpayDigiAcceptTest.php @@ -60,21 +60,6 @@ public function it_creates_a_afterpaydigiaccept_capture() $this->assertTrue($response->isFailed()); } -// /** -// * @return void -// * @test -// */ -// public function it_creates_a_afterpaydigiaccept_cancel_authorize() -// { -// $response = $this->buckaroo->method('afterpaydigiaccept')->cancelAuthorize([ -// 'amountCredit' => 10, -// 'invoice' => '10000480', -// 'originalTransactionKey' => '9AA4C81A08A84FA7B68E6A6A6291XXXX' -// ]); -// -// $this->assertTrue($response->isFailed()); -// } - /** * @return void * @test diff --git a/tests/Buckaroo/Payments/AfterpayTest.php b/tests/Buckaroo/Payments/AfterpayTest.php index 86841ec0..a92d30d0 100644 --- a/tests/Buckaroo/Payments/AfterpayTest.php +++ b/tests/Buckaroo/Payments/AfterpayTest.php @@ -47,21 +47,6 @@ public function it_creates_a_afterpay_authorize() $this->assertTrue($response->isSuccess()); } -// /** -// * @return void -// * @test -// */ -// public function it_creates_a_afterpay_cancel_authorize() -// { -// $response = $this->buckaroo->method('afterpay')->cancelAuthorize([ -// 'amountCredit' => 10, -// 'originalTransactionKey' => 'F86579ECED1D493887ECAE7C287BXXXX', -// 'invoice' => 'testinvoice12345cvx' -// ]); -// -// $this->assertTrue($response->isRejected()); -// } - /** * @return void * @test @@ -83,7 +68,8 @@ public function it_creates_a_afterpay_refund() { $response = $this->buckaroo->method('afterpay')->refund([ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 1.23, ]); @@ -98,7 +84,8 @@ public function it_creates_a_afterpay_partial_refund() { $response = $this->buckaroo->method('afterpay')->refund([ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 1.23, 'articles' => [ [ diff --git a/tests/Buckaroo/Payments/BancontactTest.php b/tests/Buckaroo/Payments/BancontactTest.php index be9606f5..e4f93522 100644 --- a/tests/Buckaroo/Payments/BancontactTest.php +++ b/tests/Buckaroo/Payments/BancontactTest.php @@ -63,7 +63,10 @@ public function it_creates_a_bancontact_encrypted_payment() 'invoice' => uniqid(), 'amountDebit' => 10.10, 'description' => 'Bancontact PayEncrypted Test 123', - 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gfDV+UyjcPfpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpmvxeiwwea3l4htNoX1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUTiJOtKKcCQlT01YThIkQlj8PWBBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', + 'encryptedCardData' => '001SlXfd8MbiTd/JFwCiGVs3f6o4x6xt0aN29NzOSNZHPKlVsz/EWeQmyhb1gGZ86VY88DP7gf + DV+UyjcPfpVfHZd7u+WkO71hnV2QfYILCBNqE1aiPv2GQVGdaGbuoQloKu1o3o3I1UDmVxivXTMQX76ovot89geA6hqbtakmpm + vxeiwwea3l4htNoX1IlD1hfYkDDl9rzSu5ypcjvVs6aRGXK5iMHnyrmEsEnfdj/Q5XWbsD5xAm4u3y6J8d4UP7LB31VLECzZUT + iJOtKKcCQlT01YThIkQlj8PWBBMtt4H52VN3IH2+wPYtR8HiOZzcA2HA7UxozogIpS53tIURj/g==', ]); $this->assertTrue($response->isPendingProcessing()); diff --git a/tests/Buckaroo/Payments/BatchTest.php b/tests/Buckaroo/Payments/BatchTest.php index aa3db504..8c948e6a 100644 --- a/tests/Buckaroo/Payments/BatchTest.php +++ b/tests/Buckaroo/Payments/BatchTest.php @@ -82,4 +82,4 @@ public function it_tests_batch_api() $this->assertTrue($response->data('Message') == '3 data requests were queued for processing.'); } -} \ No newline at end of file +} diff --git a/tests/Buckaroo/Payments/BillinkTest.php b/tests/Buckaroo/Payments/BillinkTest.php index 599aad46..51015a9f 100644 --- a/tests/Buckaroo/Payments/BillinkTest.php +++ b/tests/Buckaroo/Payments/BillinkTest.php @@ -50,7 +50,8 @@ public function it_creates_a_billink_authorize() public function it_creates_a_billink_capture() { $response = $this->buckaroo->method('billink')->capture([ - 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', //Set transaction key of the transaction to capture + 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', + //Set transaction key of the transaction to capture 'invoice' => '62905fa2650f4', //Set invoice id 'amountDebit' => 50.30, //set amount to capture 'articles' => [ @@ -169,7 +170,8 @@ private function getPaymentPayload(): array public function it_creates_a_billink_cancel_authorize() { $response = $this->buckaroo->method('billink')->cancelAuthorize([ - 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', //Set transaction key of the transaction to capture + 'originalTransactionKey' => '74AD098CCFAA4F739FE16279B5059B6B', + //Set transaction key of the transaction to capture 'invoice' => '62905fa2650f4', //Set invoice id 'AmountCredit' => 10, //set amount to capture ]); diff --git a/tests/Buckaroo/Payments/CreditcardTest.php b/tests/Buckaroo/Payments/CreditcardTest.php index a877af45..9ff06630 100644 --- a/tests/Buckaroo/Payments/CreditcardTest.php +++ b/tests/Buckaroo/Payments/CreditcardTest.php @@ -49,7 +49,8 @@ public function it_creates_a_creditcard_encrypted_payment() 'amountDebit' => 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU + 9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); @@ -66,7 +67,8 @@ public function it_creates_a_creditcard_security_code_payment() 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2 + KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); @@ -113,7 +115,8 @@ public function it_creates_a_creditcard_encrypted_authorize() 'amountDebit' => 10, 'invoice' => uniqid(), 'name' => 'mastercard', - 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedCardData' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU + 9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); @@ -130,7 +133,8 @@ public function it_creates_a_creditcard_security_code_authorize() 'invoice' => uniqid(), 'originalTransactionKey' => '6C5DBB69E74644958F8C25199514DC6C', 'name' => 'mastercard', - 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', + 'encryptedSecurityCode' => '001u8gJNwngKubFCO6FmJod6aESlIFATkKYaj47KlgBp7f3NeVxUzChg1Aug7WD2vc5wut2KU + 9NPLUaO0tFmzhVLZoDWn7dX4AzGxSjPrsPmDMWYcEkIwMZfcyJqoRfFkF3j15mil3muXxhR1a609NfkTo11J3ENVsvU3k60z', ]); $this->assertTrue($response->isValidationFailure()); diff --git a/tests/Buckaroo/Payments/IdealTest.php b/tests/Buckaroo/Payments/IdealTest.php index efab199d..6b402c10 100644 --- a/tests/Buckaroo/Payments/IdealTest.php +++ b/tests/Buckaroo/Payments/IdealTest.php @@ -63,7 +63,8 @@ protected function setUp(): void $this->refundPayload = [ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 1.23, 'clientIP' => [ 'address' => '123.456.789.123', @@ -102,12 +103,6 @@ public function it_creates_a_ideal_payment() $response = $this->buckaroo->method('idealprocessing')->pay($this->paymentPayload); $this->assertTrue($response->isPendingProcessing()); - -// $customConfig = new CustomConfig(); -// $customConfig->currency('AUD'); -// -// $response = $this->buckaroo->setConfig($customConfig)->payment('ideal')->pay(json_encode($this->paymentPayload)); -// $this->assertTrue($response->isPendingProcessing()); } /** diff --git a/tests/Buckaroo/Payments/MarketplacesTest.php b/tests/Buckaroo/Payments/MarketplacesTest.php index 715f12c6..d301385b 100644 --- a/tests/Buckaroo/Payments/MarketplacesTest.php +++ b/tests/Buckaroo/Payments/MarketplacesTest.php @@ -98,7 +98,8 @@ public function it_creates_marketplaces_refund() $response = $this->buckaroo->method('ideal')->combine($marketplace)->refund([ 'invoice' => 'testinvoice 123', //Set invoice number of the transaction to refund - 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', //Set transaction key of the transaction to refund + 'originalTransactionKey' => '4E8BD922192746C3918BF4077CXXXXXX', + //Set transaction key of the transaction to refund 'amountCredit' => 30, ]); diff --git a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php index bef3e411..effdfe20 100644 --- a/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php +++ b/tests/Buckaroo/Payments/NoServiceSpecifiedPaymentTest.php @@ -39,4 +39,4 @@ public function it_creates_a_noservice_payment() $this->assertTrue($response->isWaitingOnUserInput()); } -} \ No newline at end of file +} diff --git a/tests/Buckaroo/Payments/PaymentInitiation.php b/tests/Buckaroo/Payments/PaymentInitiation.php index fd6f5cc0..14b39b1a 100644 --- a/tests/Buckaroo/Payments/PaymentInitiation.php +++ b/tests/Buckaroo/Payments/PaymentInitiation.php @@ -4,7 +4,7 @@ use Tests\Buckaroo\BuckarooTestCase; -class PaymentInitiation extends BuckarooTestCase +class PaymentInitiationTest extends BuckarooTestCase { /** * @return void diff --git a/tests/Buckaroo/Payments/PushTest.php b/tests/Buckaroo/Payments/PushTest.php index 3aab3f4d..a2ec3b9b 100644 --- a/tests/Buckaroo/Payments/PushTest.php +++ b/tests/Buckaroo/Payments/PushTest.php @@ -39,8 +39,21 @@ public function it_test_the_push_response() $replyHandler = $this->buckaroo->method('ideal'); - $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638:1658227572'; - $post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c","ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001","Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true,"Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021","Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"},{"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"},{"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}],"VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name":"initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1,"RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false,"Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey":"AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; + $auth_header = 'IBjihN7Fhp:0YvyjYAzDQ28W+hQi80f2nhe0Z1QFJLbz7IH//6LsAU=:cad1832100784f57a6e6de835d9f3638: + 1658227572'; + $post_data = '{"Transaction":{"Key":"5340604668D74435AA344E1428ED1292","Invoice":"62d68b6c8ab0c", + "ServiceCode":"ideal","Status":{"Code":{"Code":190,"Description":"Success"},"SubCode":{"Code":"S001", + "Description":"Transaction successfully processed"},"DateTime":"2022-07-19T12:46:12"},"IsTest":true, + "Order":"ORDER_NO_62d68b6ca2df3","Currency":"EUR","AmountDebit":10.1,"TransactionType":"C021", + "Services":[{"Name":"ideal","Action":null,"Parameters":[{"Name":"consumerIssuer","Value":"ABN AMRO"}, + {"Name":"transactionId","Value":"0000000000000001"},{"Name":"consumerName","Value":"J. de Tèster"}, + {"Name":"consumerIBAN","Value":"NL44RABO0123456789"},{"Name":"consumerBIC","Value":"RABONL2U"}], + "VersionAsProperty":2}],"CustomParameters":null,"AdditionalParameters":{"List":[{"Name": + "initiated_by_magento","Value":"1"},{"Name":"service_action","Value":"something"}]},"MutationType":1, + "RelatedTransactions":null,"IsCancelable":false,"IssuingCountry":null,"StartRecurrent":false, + "Recurring":false,"CustomerName":"J. de Tèster","PayerHash":"2d26d34584a4eafeeaa97eed10cfdae22ae64cdce + 1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da","PaymentKey": + "AEC974D455FF4A4B9B4C21E437A04838","Description":null}}'; $uri = 'https://buckaroo.dev/push'; $post_data = [ @@ -49,7 +62,8 @@ public function it_test_the_push_response() "brq_customer_name" => "J. de Tèster", "brq_invoicenumber" => "SDKDevelopment.com_INVOICE_NO_628c6d032af90", "brq_ordernumber" => "SDKDevelopment.com_ORDER_NO_628c6d032af95", - "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", + "brq_payer_hash" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7 + c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", "brq_payment" => "D44ACDD0F99D4A1C811D2CD3EFDB05BA", "brq_payment_method" => "ideal", "brq_SERVICE_ideal_consumerBIC" => "RABONL2U", @@ -67,32 +81,6 @@ public function it_test_the_push_response() "brq_signature" => "bf7a62c830da2d2e004199919a8fe0d53b0668f5", ]; -// $post_data = [ -// "BRQ_AMOUNT" => "10.10", -// "BRQ_CURRENCY" => "EUR", -// "BRQ_CUSTOMER_NAME" => "J. de Tèster", -// "BRQ_INVOICENUMBER" => "63208dbcb5702", -// "BRQ_ORDERNUMBER" => "ORDER_NO_63208dbcd10e2", -// "BRQ_PAYER_HASH" => "2d26d34584a4eafeeaa97eed10cfdae22ae64cdce1649a80a55fafca8850e3e22cb32eb7c8fc95ef0c6f96669a21651d4734cc568816f9bd59c2092911e6c0da", -// "BRQ_PAYMENT" => "7F817F3A3F614062AC3E6EE634B2699F", -// "BRQ_PAYMENT_METHOD" => "ideal", -// "BRQ_SERVICE_IDEAL_CONSUMERBIC" => "RABONL2U", -// "BRQ_SERVICE_IDEAL_CONSUMERIBAN" => "NL44RABO0123456789", -// "BRQ_SERVICE_IDEAL_CONSUMERISSUER" => "ABN AMRO", -// "BRQ_SERVICE_IDEAL_CONSUMERNAME" => "J. de Tèster", -// "BRQ_SERVICE_IDEAL_TRANSACTIONID" => "0000000000000001", -// "BRQ_STATUSCODE" => "190", -// "BRQ_STATUSCODE_DETAIL" => "S001", -// "BRQ_STATUSMESSAGE" => "Transaction successfully processed", -// "BRQ_TEST" => "true", -// "BRQ_TIMESTAMP" => "2022-09-13 16:03:58", -// "BRQ_TRANSACTIONS" => "BBEB99F178C64A7FB30667B6427D8064", -// "BRQ_WEBSITEKEY" => "IBjihN7Fhp", -// "BRQ_SIGNATURE" => "06de0e66b0df062df376fa619cc0792b2ed5f3fd", -// "ADD_INITIATED_BY_MAGENTO" => "1", -// "ADD_SERVICE_ACTION" => "something" -// ]; - $reply_handler = new ReplyHandler($this->buckaroo->client()->config(), $post_data, $auth_header, $uri); $reply_handler->validate(); From 1512e7bb219b101842205039f5199f6dfe7cadd1 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 15 Nov 2023 14:12:14 +0100 Subject: [PATCH 62/81] 1.9.0 (#154) * Prepare release v1.8.0 (#139) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> * Prepare v1.8.1 (#149) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * BP-2417 Added Thunes * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 * BP-2873 * Idin name change to idin * deleted article Thunes * Changed uppercase * Changed name * excluded iDin in check * Prepare 1.8.1 release --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Sander Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> * Checkout update * Version update * Fixing merge conflict * Update workflows * disable sonarcube * Revert checklint * Revert * revert types and checkout version * Remove sonarqube entirely * Workflow * Remove matrix os * Re-add sonarqube * removed error with exception * Adding php 8.3 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> Co-authored-by: Sander --- .github/workflows/codestyle.yml | 4 ++-- .github/workflows/sonarqube.yml | 8 +++++--- composer.json | 2 +- src/PaymentMethods/iDeal/iDeal.php | 1 - 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 1348548f..d1299723 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -12,13 +12,13 @@ jobs: strategy: fail-fast: true matrix: - php: [7.4, 8.1, 8.2] + php: [7.4, 8.1, 8.2, 8.3] stability: [prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index ce169472..8fc4627a 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -1,12 +1,14 @@ +name: SonarQube PR Analysis + on: push: branches: - master - - develop + - develop/ - 'bugfix/**' pull_request: types: [opened, synchronize, reopened] -name: SonarQube PR Analysis + jobs: sonarqube: runs-on: ubuntu-latest @@ -18,4 +20,4 @@ jobs: uses: sonarsource/sonarqube-scan-action@master env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} \ No newline at end of file diff --git a/composer.json b/composer.json index ebf10227..7e30bcd0 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.8.0", + "version": "1.9.0", "type": "library", "require": { "php": ">=7.4|^8.0", diff --git a/src/PaymentMethods/iDeal/iDeal.php b/src/PaymentMethods/iDeal/iDeal.php index 21c012f9..dbd07614 100644 --- a/src/PaymentMethods/iDeal/iDeal.php +++ b/src/PaymentMethods/iDeal/iDeal.php @@ -28,7 +28,6 @@ use Buckaroo\PaymentMethods\PayablePaymentMethod; use Buckaroo\Services\TraitHelpers\HasIssuers; use Buckaroo\Transaction\Response\TransactionResponse; -use Buckaroo\Exceptions\BuckarooException; class iDeal extends PayablePaymentMethod { From 3d3c2c7c811c967afc394051220c616a4a4a2375 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 15 Nov 2023 14:14:51 +0100 Subject: [PATCH 63/81] Merge conflict --- composer.json | 4 ---- example/transactions/in3.php | 12 ------------ example/transactions/in3old.php | 5 ----- example/transactions/payment_initiation.php | 11 +---------- .../In3/Service/ParameterKeys/PhoneAdapter.php | 6 ------ .../In3Old/Service/ParameterKeys/PhoneAdapter.php | 4 ---- 6 files changed, 1 insertion(+), 41 deletions(-) diff --git a/composer.json b/composer.json index 9d3daad7..7e30bcd0 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", -<<<<<<< HEAD "version": "1.9.0", -======= - "version": "1.8.1", ->>>>>>> master "type": "library", "require": { "php": ">=7.4|^8.0", diff --git a/example/transactions/in3.php b/example/transactions/in3.php index d552d87a..1fdbddb2 100644 --- a/example/transactions/in3.php +++ b/example/transactions/in3.php @@ -60,11 +60,7 @@ 'identifier' => 'Articlenumber1', 'type' => 'Physical', 'description' => 'Blue Toy Car', -<<<<<<< HEAD 'category' => 'test product1', -======= - 'category' => 'test product', ->>>>>>> master 'vatPercentage' => '21', 'quantity' => '2', 'price' => '20.10', @@ -73,11 +69,7 @@ 'identifier' => 'Articlenumber2', 'type' => 'Physical', 'description' => 'Red Toy Car', -<<<<<<< HEAD 'category' => 'test product2', -======= - 'category' => 'test product', ->>>>>>> master 'vatPercentage' => '21', 'quantity' => '1', 'price' => '10.10', @@ -86,11 +78,7 @@ 'identifier' => 'USPShippingID', 'type' => 'Physical', 'description' => 'UPS', -<<<<<<< HEAD 'category' => 'test product3', -======= - 'category' => 'test product', ->>>>>>> master 'vatPercentage' => '21', 'quantity' => '1', 'price' => '2', diff --git a/example/transactions/in3old.php b/example/transactions/in3old.php index 6092862a..3bf41c7d 100644 --- a/example/transactions/in3old.php +++ b/example/transactions/in3old.php @@ -1,10 +1,5 @@ >>>>>> master use Buckaroo\BuckarooClient; use Buckaroo\Resources\Constants\Gender; diff --git a/example/transactions/payment_initiation.php b/example/transactions/payment_initiation.php index 536b7f90..c003e853 100644 --- a/example/transactions/payment_initiation.php +++ b/example/transactions/payment_initiation.php @@ -1,10 +1,5 @@ >>>>>> master use Buckaroo\BuckarooClient; @@ -24,8 +19,4 @@ 'invoice' => '', //Set invoice number of the transaction to refund 'originalTransactionKey' => '', //Set transaction key of the transaction to refund 'amountCredit' => 10, -<<<<<<< HEAD -]); -======= -]); ->>>>>>> master +]); \ No newline at end of file diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php index 38b37700..f18dd568 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php @@ -25,12 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ -<<<<<<< HEAD 'mobile' => 'MobilePhone' -======= - 'landLine' => 'Phone', - 'mobile' => 'MobilePhone', - 'phone' => 'Phone' ->>>>>>> master ]; } diff --git a/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php index f7303f5b..17af7e7c 100644 --- a/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3Old/Service/ParameterKeys/PhoneAdapter.php @@ -25,10 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ -<<<<<<< HEAD 'mobile' => 'Phone' -======= - 'mobile' => 'Phone', ->>>>>>> master ]; } From 2edf89010912e681186b3d43971caff537a68878 Mon Sep 17 00:00:00 2001 From: vegim carkaxhija Date: Thu, 23 Nov 2023 10:35:34 +0100 Subject: [PATCH 64/81] created a Factory to determine which guzzlehttp version is used --- src/Transaction/Client.php | 6 +- .../Request/HttpClient/GuzzleHttpClientV5.php | 70 +++++++++++++++++++ ...lientGuzzle.php => GuzzleHttpClientV7.php} | 28 ++------ .../Request/HttpClient/HttpClientFactory.php | 24 +++++++ 4 files changed, 101 insertions(+), 27 deletions(-) create mode 100644 src/Transaction/Request/HttpClient/GuzzleHttpClientV5.php rename src/Transaction/Request/HttpClient/{HttpClientGuzzle.php => GuzzleHttpClientV7.php} (67%) create mode 100644 src/Transaction/Request/HttpClient/HttpClientFactory.php diff --git a/src/Transaction/Client.php b/src/Transaction/Client.php index b3116fac..a1c4d878 100644 --- a/src/Transaction/Client.php +++ b/src/Transaction/Client.php @@ -31,7 +31,7 @@ use Buckaroo\Services\TransactionHeaders\DefaultHeader; use Buckaroo\Services\TransactionHeaders\HmacHeader; use Buckaroo\Services\TransactionHeaders\SoftwareHeader; -use Buckaroo\Transaction\Request\HttpClient\HttpClientGuzzle; +use Buckaroo\Transaction\Request\HttpClient\HttpClientFactory; use Buckaroo\Transaction\Request\HttpClient\HttpClientInterface; use Buckaroo\Transaction\Request\Request; use Buckaroo\Transaction\Response\Response; @@ -43,7 +43,7 @@ class Client private const METHOD_POST = 'POST'; /** - * @var HttpClientInterface|HttpClientGuzzle + * @var HttpClientInterface */ protected HttpClientInterface $httpClient; /** @@ -61,7 +61,7 @@ class Client public function __construct(?Config $config) { $this->config = $config; - $this->httpClient = new HttpClientGuzzle($config->getLogger()); + $this->httpClient = HttpClientFactory::createClient($config->getLogger()); } /** diff --git a/src/Transaction/Request/HttpClient/GuzzleHttpClientV5.php b/src/Transaction/Request/HttpClient/GuzzleHttpClientV5.php new file mode 100644 index 00000000..acb11dc5 --- /dev/null +++ b/src/Transaction/Request/HttpClient/GuzzleHttpClientV5.php @@ -0,0 +1,70 @@ +logger = $logger; + + $this->httpClient = new Client([ + 'timeout' => self::TIMEOUT, + 'connect_timeout' => self::CONNECT_TIMEOUT, + ]); + } + + /** + * @param string $url + * @param array $headers + * @param string $method + * @param string|null $data + * @return array|mixed + * @throws TransferException + * @throws BuckarooException|GuzzleException + */ + + public function call(string $url, array $headers, string $method, string $data = null) + { + $headers = $this->convertHeadersFormat($headers); + + $request = $this->httpClient->createRequest($method, $url, [ + 'headers' => $headers, + 'body' => $data, + ]); + + try + { + $response = $this->httpClient->send($request); + + $result = (string) $response->getBody(); + + $this->logger->info('RESPONSE HEADERS: ' . json_encode($response->getHeaders())); + $this->logger->info('RESPONSE BODY: ' . $response->getBody()); + } catch (RequestException $e) { + throw new TransferException($this->logger, "Transfer failed", 0, $e); + } + + $result = $this->getDecodedResult($response, $result); + + return [ + $response, + $result, + ]; + } +} diff --git a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php b/src/Transaction/Request/HttpClient/GuzzleHttpClientV7.php similarity index 67% rename from src/Transaction/Request/HttpClient/HttpClientGuzzle.php rename to src/Transaction/Request/HttpClient/GuzzleHttpClientV7.php index d15a2fd7..015b4e09 100644 --- a/src/Transaction/Request/HttpClient/HttpClientGuzzle.php +++ b/src/Transaction/Request/HttpClient/GuzzleHttpClientV7.php @@ -1,27 +1,8 @@ logger->info('RESPONSE HEADERS: ' . json_encode($response->getHeaders())); $this->logger->info('RESPONSE BODY: ' . $response->getBody()); - } catch (GuzzleException $e) - { + } catch (GuzzleException $e) { throw new TransferException($this->logger, "Transfer failed", 0, $e); } diff --git a/src/Transaction/Request/HttpClient/HttpClientFactory.php b/src/Transaction/Request/HttpClient/HttpClientFactory.php new file mode 100644 index 00000000..1fbc0e2e --- /dev/null +++ b/src/Transaction/Request/HttpClient/HttpClientFactory.php @@ -0,0 +1,24 @@ + Date: Thu, 23 Nov 2023 12:47:49 +0100 Subject: [PATCH 65/81] fix --- src/Transaction/Request/HttpClient/HttpClientFactory.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Transaction/Request/HttpClient/HttpClientFactory.php b/src/Transaction/Request/HttpClient/HttpClientFactory.php index 1fbc0e2e..1c7a1220 100644 --- a/src/Transaction/Request/HttpClient/HttpClientFactory.php +++ b/src/Transaction/Request/HttpClient/HttpClientFactory.php @@ -17,8 +17,7 @@ public static function createClient(Subject $logger) // Instantiate the appropriate client based on the major version if ($majorVersion === 5) { return new GuzzleHttpClientV5($logger); - } else { - return new GuzzleHttpClientV7($logger); } + return new GuzzleHttpClientV7($logger); } } From f8271d3baad5fd604aeca15a05243f224a589b72 Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Tue, 28 Nov 2023 12:49:25 +0200 Subject: [PATCH 66/81] BP-3189-add-get-active-subscription-to-retrieve-all-buckaroo-subscriptions (#157) * BP-3189 Add "GetActiveSubscription" to retrieve all Buckaroo subscriptions * add tests * format currency * fix formatting * fix x * fix pipe error --------- Co-authored-by: Ivascu Madalin --- .../getActiveSubscriptions.php | 17 +++ src/BuckarooClient.php | 7 + src/Services/ActiveSubscriptions.php | 120 ++++++++++++++++++ tests/Buckaroo/GetActiveSubscription.php | 38 ++++++ 4 files changed, 182 insertions(+) create mode 100644 example/additional_services/getActiveSubscriptions.php create mode 100644 src/Services/ActiveSubscriptions.php create mode 100644 tests/Buckaroo/GetActiveSubscription.php diff --git a/example/additional_services/getActiveSubscriptions.php b/example/additional_services/getActiveSubscriptions.php new file mode 100644 index 00000000..e7d2d8e6 --- /dev/null +++ b/example/additional_services/getActiveSubscriptions.php @@ -0,0 +1,17 @@ +getActiveSubscriptions() as $subscription) { + $availableCurrencies = implode(",", $subscription['currencies']); + echo "serviceCode: " . $subscription['serviceCode'] . "\n"; + echo "- available currencies: " . $availableCurrencies . "\n"; + } +} catch (\Throwable $th) { + var_dump($th); +} diff --git a/src/BuckarooClient.php b/src/BuckarooClient.php index ad682cc4..e86c2577 100644 --- a/src/BuckarooClient.php +++ b/src/BuckarooClient.php @@ -27,6 +27,7 @@ use Buckaroo\Handlers\Logging\Observer as LoggingObserver; use Buckaroo\PaymentMethods\BatchTransactions; use Buckaroo\PaymentMethods\PaymentFacade; +use Buckaroo\Services\ActiveSubscriptions; use Buckaroo\Services\TransactionService; use Buckaroo\Transaction\Client; @@ -73,6 +74,12 @@ public function method(string $method = null): PaymentFacade return new PaymentFacade($this->client, $method); } + + public function getActiveSubscriptions(): array + { + return (new ActiveSubscriptions($this->client))->get(); + } + /** * @param array $transactions * @return BatchTransactions diff --git a/src/Services/ActiveSubscriptions.php b/src/Services/ActiveSubscriptions.php new file mode 100644 index 00000000..e5fb4f84 --- /dev/null +++ b/src/Services/ActiveSubscriptions.php @@ -0,0 +1,120 @@ +client = $client; + } + + public function get(): array + { + try { + $xmlString = $this->client + ->dataRequest($this->buildTransaction()) + ->getServiceParameters()[self::SERVICE_PARAM_KEY] ?? null; + + if (!is_string($xmlString)) { + return []; + } + + $xml = new SimpleXMLElement($xmlString, LIBXML_NOCDATA); + + return $this->format( + $xml->xpath('/ArrayOfServiceCurrencies/ServiceCurrencies') + ); + } catch (Exception $e) { + return []; + } + } + + private function buildTransaction(): TransactionRequest + { + $transaction = new TransactionRequest(); + + $transaction + ->getServices() + ->pushServiceList( + new ServiceList( + self::SERVICE_CODE_AND_ACTION, + self::VERSION_ZERO, + self::SERVICE_CODE_AND_ACTION + ) + ); + return $transaction; + } + + private function format($data): array + { + $decoded = json_decode(json_encode($data), true); + if (!is_array($decoded)) { + return []; + } + + $formated = []; + foreach ($decoded as $subscription) { + $formatedSubscription = []; + foreach ($subscription as $key => $subscriptionData) { + $camelKey = lcfirst($key); + $formatedSubscription[$camelKey] = $this->formatValue($camelKey, $subscriptionData); + } + $formated[] = $formatedSubscription; + } + return $formated; + } + + /** + * Format value for currency + * + * @param string $key + * @param string|array $value + * + * @return string|array + */ + private function formatValue($key, $value) + { + if ($key === 'currencies') { + $value = $value["string"]; + if (is_string($value)) { + $value = [$value]; + } + } + + return $value; + } +} diff --git a/tests/Buckaroo/GetActiveSubscription.php b/tests/Buckaroo/GetActiveSubscription.php new file mode 100644 index 00000000..cc83d082 --- /dev/null +++ b/tests/Buckaroo/GetActiveSubscription.php @@ -0,0 +1,38 @@ +buckaroo->getActiveSubscriptions(); + $this->assertIsArray($response); + $this->assertArrayHasKey('serviceCode', $response[0]); + $this->assertArrayHasKey('currencies', $response[0]); + } +} From eb6ff94b4ffc0ebaf1eb928e248bf1bb0a643442 Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Tue, 5 Dec 2023 16:19:02 +0200 Subject: [PATCH 67/81] BP-3179 Add support for "External Payments" (#158) * BP-3179 Add support for "External Payments" * rename test function --------- Co-authored-by: Ivascu Madalin --- example/transactions/externalPayment.php | 19 ++++++ .../ExternalPayment/ExternalPayment.php | 30 ++++++++ src/PaymentMethods/PaymentMethodFactory.php | 68 ++++++++++--------- .../Buckaroo/Payments/ExternalPaymentTest.php | 56 +++++++++++++++ 4 files changed, 140 insertions(+), 33 deletions(-) create mode 100644 example/transactions/externalPayment.php create mode 100644 src/PaymentMethods/ExternalPayment/ExternalPayment.php create mode 100644 tests/Buckaroo/Payments/ExternalPaymentTest.php diff --git a/example/transactions/externalPayment.php b/example/transactions/externalPayment.php new file mode 100644 index 00000000..85a881fa --- /dev/null +++ b/example/transactions/externalPayment.php @@ -0,0 +1,19 @@ +method('externalPayment')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + 'channel' => 'BackOffice' +]); + +$buckaroo->method('externalPayment')->refund([ + 'amountCredit' => 10, + 'invoice' => 'testinvoice 123', + 'originalTransactionKey' => $response->getTransactionKey(), +]); \ No newline at end of file diff --git a/src/PaymentMethods/ExternalPayment/ExternalPayment.php b/src/PaymentMethods/ExternalPayment/ExternalPayment.php new file mode 100644 index 00000000..f10e6d07 --- /dev/null +++ b/src/PaymentMethods/ExternalPayment/ExternalPayment.php @@ -0,0 +1,30 @@ + ['payperemail'], PaymentInitiation::class => ['paymentinitiation','paybybank'], EPS::class => ['eps'], + ExternalPayment::class => ['externalpayment'], Emandates::class => ['emandates'], Sofort::class => ['sofort', 'sofortueberweisung'], Tinka::class => ['tinka'], diff --git a/tests/Buckaroo/Payments/ExternalPaymentTest.php b/tests/Buckaroo/Payments/ExternalPaymentTest.php new file mode 100644 index 00000000..5b0338c3 --- /dev/null +++ b/tests/Buckaroo/Payments/ExternalPaymentTest.php @@ -0,0 +1,56 @@ +buckaroo->method('externalPayment')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 11.10, + 'channel' => 'BACKOFFICE' + ]); + + $this->assertTrue($response->isSuccess()); + } + + /** + * @test + */ + public function it_creates_a_external_refund() + { + $response = $this->buckaroo->method('externalPayment')->refund([ + 'amountCredit' => 10, + 'invoice' => 'testinvoice 123', + 'description' => 'refund', + 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', + ]); + + $this->assertTrue($response->isFailed()); + } +} From 55dec4f00f166daf5c37ae8766b4c9ba091bf9fc Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Mon, 18 Dec 2023 15:54:47 +0100 Subject: [PATCH 68/81] Prepare release 1.9.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7e30bcd0..fc972a9c 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.9.0", + "version": "1.9.1", "type": "library", "require": { "php": ">=7.4|^8.0", From e4b37446cb9e613fb07f015093bd7560dd476b26 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Mon, 18 Dec 2023 15:57:55 +0100 Subject: [PATCH 69/81] 1.9.1 --- composer.json | 4 ---- src/PaymentMethods/PaymentMethodFactory.php | 19 ------------------- 2 files changed, 23 deletions(-) diff --git a/composer.json b/composer.json index fb6a9ce3..fc972a9c 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", -<<<<<<< HEAD "version": "1.9.1", -======= - "version": "1.9.0", ->>>>>>> master "type": "library", "require": { "php": ">=7.4|^8.0", diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 3c7a7ee1..4fe4c0ad 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -37,18 +37,6 @@ use Buckaroo\PaymentMethods\Thunes\Thunes; use Buckaroo\PaymentMethods\Belfius\Belfius; use Buckaroo\PaymentMethods\Billink\Billink; -<<<<<<< HEAD -======= -use Buckaroo\PaymentMethods\BuckarooVoucher\BuckarooVoucher; -use Buckaroo\PaymentMethods\BuckarooWallet\BuckarooWallet; -use Buckaroo\PaymentMethods\CreditCard\CreditCard; -use Buckaroo\PaymentMethods\CreditClick\CreditClick; -use Buckaroo\PaymentMethods\CreditManagement\CreditManagement; -use Buckaroo\PaymentMethods\Emandates\Emandates; -use Buckaroo\PaymentMethods\EPS\EPS; -use Buckaroo\PaymentMethods\MBWay\MBWay; -use Buckaroo\PaymentMethods\GiftCard\GiftCard; ->>>>>>> master use Buckaroo\PaymentMethods\Giropay\Giropay; use Buckaroo\PaymentMethods\iDealQR\iDealQR; use Buckaroo\PaymentMethods\Surepay\Surepay; @@ -57,13 +45,6 @@ use Buckaroo\PaymentMethods\ApplePay\ApplePay; use Buckaroo\PaymentMethods\GiftCard\GiftCard; use Buckaroo\PaymentMethods\KlarnaKP\KlarnaKP; -<<<<<<< HEAD -======= -use Buckaroo\PaymentMethods\KlarnaPay\KlarnaPay; -use Buckaroo\PaymentMethods\Marketplaces\Marketplaces; -use Buckaroo\PaymentMethods\Multibanco\Multibanco; -use Buckaroo\PaymentMethods\NoServiceSpecifiedPayment\NoServiceSpecifiedPayment; ->>>>>>> master use Buckaroo\PaymentMethods\Payconiq\Payconiq; use Buckaroo\PaymentMethods\Emandates\Emandates; use Buckaroo\PaymentMethods\KlarnaPay\KlarnaPay; From 35ab3e8ebec0910336acb36c47423c9dcbddd2a8 Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Tue, 9 Jan 2024 17:26:11 +0200 Subject: [PATCH 70/81] BP-3287 Add more debtor information for Buckaroo Subscriptions (#161) Co-authored-by: Ivascu Madalin --- src/PaymentMethods/Subscriptions/Models/Subscription.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PaymentMethods/Subscriptions/Models/Subscription.php b/src/PaymentMethods/Subscriptions/Models/Subscription.php index 955b35be..3c88e21c 100644 --- a/src/PaymentMethods/Subscriptions/Models/Subscription.php +++ b/src/PaymentMethods/Subscriptions/Models/Subscription.php @@ -160,6 +160,12 @@ class Subscription extends ServiceParameter 'address' => [ 'groupType' => 'Address', ], + 'company' => [ + 'groupType' => 'Company', + ], + 'phone' => [ + 'groupType' => 'Phone', + ], 'addRatePlan' => [ 'groupType' => 'AddRatePlan', ], From 71f68eea7c9d3cfee6673f1f41726cd513dc779e Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Fri, 1 Mar 2024 06:14:37 +0100 Subject: [PATCH 71/81] Adding env variable to enable disable stdout logger (#163) --- src/Handlers/Logging/DefaultLogger.php | 5 ++++- tests/Buckaroo/Payments/KBCTest.php | 2 ++ tests/Buckaroo/Payments/SepaTest.php | 2 ++ tests/Buckaroo/Payments/SofortTest.php | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Handlers/Logging/DefaultLogger.php b/src/Handlers/Logging/DefaultLogger.php index 70650d7f..a0b4fccc 100644 --- a/src/Handlers/Logging/DefaultLogger.php +++ b/src/Handlers/Logging/DefaultLogger.php @@ -37,7 +37,10 @@ class DefaultLogger implements Subject, LoggerInterface */ public function __construct() { - $this->attach(new Monolog()); + if (($_ENV['BPE_LOG'] ?? false) === 'true') + { + $this->attach(new Monolog()); + } if (($_ENV['BPE_REPORT_ERROR'] ?? false) === 'true') { diff --git a/tests/Buckaroo/Payments/KBCTest.php b/tests/Buckaroo/Payments/KBCTest.php index 5fa57174..ce0a2669 100644 --- a/tests/Buckaroo/Payments/KBCTest.php +++ b/tests/Buckaroo/Payments/KBCTest.php @@ -24,6 +24,8 @@ class KBCTest extends BuckarooTestCase { + protected array $paymentPayload; + protected function setUp(): void { $this->paymentPayload = ([ diff --git a/tests/Buckaroo/Payments/SepaTest.php b/tests/Buckaroo/Payments/SepaTest.php index 5a6194ac..918fcdd7 100644 --- a/tests/Buckaroo/Payments/SepaTest.php +++ b/tests/Buckaroo/Payments/SepaTest.php @@ -6,6 +6,8 @@ class SepaTest extends BuckarooTestCase { + protected array $paymentPayload; + protected function setUp(): void { $this->paymentPayload = ([ diff --git a/tests/Buckaroo/Payments/SofortTest.php b/tests/Buckaroo/Payments/SofortTest.php index ef4759da..e0656911 100644 --- a/tests/Buckaroo/Payments/SofortTest.php +++ b/tests/Buckaroo/Payments/SofortTest.php @@ -24,6 +24,8 @@ class SofortTest extends BuckarooTestCase { + protected array $paymentPayload; + protected function setUp(): void { $this->paymentPayload = ([ From c438575bedeb38e76ba68d0e1eb75de806c18112 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 5 Mar 2024 07:12:09 +0100 Subject: [PATCH 72/81] Adding Knaken payment (#164) * 1.10.0 (#160) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 * BP-2873 * BP-2912 rename IDin to iDin (#145) * BP-2417 Added Thunes * Idin name change to idin * deleted article Thunes * Changed uppercase * Changed name * excluded iDin in check * BP-3034 Add payment method "MB WAY" (#147) * BP-3034 Add payment method "MB WAY" * fix namespace * fix folder naming * fix tests --------- Co-authored-by: Ivascu Madalin * BP-3020 Add payment method "Multibanco" (#148) * BP-3020 Add payment method "Multibanco" * fix tests --------- Co-authored-by: Ivascu Madalin * Add GitHub action file * Phone number fixes (#144) * Remove unused phone parameters * Remove comma after last element from array * add method to get issuers for PayByBank (#152) + add tests for PayByBank & iDeal + create trait for reusable * BP-3009 Resolve SonarQube bugs and update README.md (#151) * Bugs and code smells * Deleted unused method * 1.9.0 (#154) * Prepare release v1.8.0 (#139) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> * Prepare v1.8.1 (#149) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * BP-2417 Added Thunes * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 * BP-2511 Removed Ippies (#117) * BP-2417 Added Thunes * Deleted Ippies * Deleted Thunes changes * BP-2417 Added Thunes (#111) * BP-2417 Added Thunes * BP-2417 Added Thunes * End of line * added the example again * Deleted Article.php * BP-2543 - Add (Bancontact) Deferred Sales (#116) * Added Deferred Sales * Authenticate method refers to authorize * BP-2617 - Allow CustomParameters (#118) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Bugfix/addition parameter (#119) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Retain float in json_encode (#121) * Version change * BP-2507 Add Payment initiation (#110) * BP-2507 Add Payment initiation * BP-2507 Add Payment initiation * phpcs * PSR2 * PSR2 * Phpcs * Add missing shipping cost to refund in afterpay (#124) * Bp 2688 update readme file (#125) * v1.6.0 (#115) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) * BP-2441 Added support for transaction requests without specifying a service code (#102) * Update Transaction Comment (#103) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * 1.5.0 (#98) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog * Return string instead of int in subcode code (#88) * [Bugfixes] outdated subscription example (#90) * Return string instead of int in subcode code * Update subscription examples * Update Paypal test * GitHub/action psr12 and phplint validation (#92) * 1.4.0 (#86) * Request To Pay Payment method removed (#77) * Fixed an issue with getting issuers for iDeal (#78) Co-authored-by: Shu Chen * Adding missing subscriptions parameters (#79) * Add missing parameters * Add docblock * Bancontact update & fixes (#80) * Add missing parameters * Add docblock * Add bancontact alias * Fix wrong naming to payrecurring and add payoneclick method * Return null when response data is not set (#81) * BP-2345 add return and push url in the i deal qr request in the php sdk (#83) * Return null when response data is not set * Add missing parameters * Update test and example * 1.3.1 * Changing the version * Merge conflict * Update changelog * Update changelog --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Added action * Added comment to trigger github action --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> * Update ideal qr test (#94) * BP-2404 Feature/8.2 support (#95) * Update ideal qr test * Add group reference * Move tests folder * wip * Conform phpcs * Remove comments * Release 1.5.0 (#97) --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * Update Transaction Comment --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido * created new PayablePaymentMethod for when no service is specified * fix style * Minor fixes * update phpdoc, and fix Line exceeds 120 characters * Remove method paynoservice * Inlcude monolog version 3 * Include ramsey version 4 * Add missing property * Add PayRemainder in KlarnaPay (#112) * Pay remainder missing for some methods (#113) * Add PayRemainder to Alipay * Add PayRemainder to Paypal * Add PayRemainder to Payconiq * Add PayRemainder to Afterpay * Add PayRemainder to Trustly * Add PayRemainder to Przelewy24 * Add PayRemainder to Belfius * Add PayRemainder to EPS * Revert Belfius * Revert EPS * Revert Payconiq * BP-2509 Add Instant refunds,no service payment refactor (#109) * BP-2527 Batch functionality (#114) * WIP * Batch finished * Update php-cs-fixer * php cs fixer * PHPcs * Add transaction batch endpoint * phpcs fix * V1.6.0 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * Push validator fix (#123) * Retain float in json_encode * Version update * Update README.md Update READM.md --------- Co-authored-by: Shu Chen Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> * BP-2461 - Add the correct ModuleVersion and PlatformName (#120) * Added Deferred Sales * Authenticate method refers to authorize * Able to send custom parameters * Fixing wrong name in additional parameter * Ability to fill in software header * Able to pass in a config object into the constructor * PHP CS Fixer * Ignoring spaceafterkeyword * BP-2650 - Culture was not working correctly (#126) * BP-2417 Added Thunes * BP-2650 - Culture was not working correctly * Deleted Thunes/Models/Article.php * Adding culture to config * Phpcs fix --------- Co-authored-by: Shu Chen * Prepare v1.7.0 * Merge conflict resolved * Remove head merge conflict * Comment removal * Comment removal * Add pay by bank example (#128) * BP-2797 Add possibility to change Channel header (#134) * BP-2417 Added Thunes * BP-2797 Add possibility to change Channel header * delete file * Delete Channel from Payload * Features/in3new (#138) * In3 new * In3 new 2 * In3 new final touches * Filename update * In3 new added example --------- Co-authored-by: Shu Chen * Prepare release 1.8.0 * BP-2873 * Idin name change to idin * deleted article Thunes * Changed uppercase * Changed name * excluded iDin in check * Prepare 1.8.1 release --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Sander Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> * Checkout update * Version update * Fixing merge conflict * Update workflows * disable sonarcube * Revert checklint * Revert * revert types and checkout version * Remove sonarqube entirely * Workflow * Remove matrix os * Re-add sonarqube * removed error with exception * Adding php 8.3 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> Co-authored-by: Sander * Merge conflict * created a Factory to determine which guzzlehttp version is used * fix * BP-3189-add-get-active-subscription-to-retrieve-all-buckaroo-subscriptions (#157) * BP-3189 Add "GetActiveSubscription" to retrieve all Buckaroo subscriptions * add tests * format currency * fix formatting * fix x * fix pipe error --------- Co-authored-by: Ivascu Madalin * BP-3179 Add support for "External Payments" (#158) * BP-3179 Add support for "External Payments" * rename test function --------- Co-authored-by: Ivascu Madalin * Prepare release 1.9.1 * 1.9.1 --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> Co-authored-by: Ivascu Madalin Co-authored-by: Ivascu Madalin Co-authored-by: Vildan Bina Co-authored-by: Sander * Composer version name update * Update * Knaken payment * Adding refund to test --------- Co-authored-by: reflie-nxte <122365318+reflie-nxte@users.noreply.github.com> Co-authored-by: avido Co-authored-by: Sander H <37146557+SandervdHulst@users.noreply.github.com> Co-authored-by: Muneeb Shoukat <89547149+Muneeb60coder@users.noreply.github.com> Co-authored-by: vegim carkaxhija Co-authored-by: Lucian Turiac <106905746+LucianTuriacArnia@users.noreply.github.com> Co-authored-by: Rinor12010 <105772190+Rinor12010@users.noreply.github.com> Co-authored-by: Rene <105488705+Buckaroo-Rene@users.noreply.github.com> Co-authored-by: Ivascu Madalin Co-authored-by: Ivascu Madalin Co-authored-by: Vildan Bina Co-authored-by: Sander --- composer.json | 2 +- src/PaymentMethods/KnakenPay/KnakenPay.php | 47 ++++++++++++++++ src/PaymentMethods/KnakenPay/Models/Pay.php | 28 ++++++++++ src/PaymentMethods/PaymentMethodFactory.php | 2 + tests/Buckaroo/Payments/KnakenPayTest.php | 61 +++++++++++++++++++++ 5 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 src/PaymentMethods/KnakenPay/KnakenPay.php create mode 100644 src/PaymentMethods/KnakenPay/Models/Pay.php create mode 100644 tests/Buckaroo/Payments/KnakenPayTest.php diff --git a/composer.json b/composer.json index fc972a9c..c09d6227 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.9.1", + "version": "1.10.0", "type": "library", "require": { "php": ">=7.4|^8.0", diff --git a/src/PaymentMethods/KnakenPay/KnakenPay.php b/src/PaymentMethods/KnakenPay/KnakenPay.php new file mode 100644 index 00000000..1ceb1559 --- /dev/null +++ b/src/PaymentMethods/KnakenPay/KnakenPay.php @@ -0,0 +1,47 @@ +payload)); + } +} diff --git a/src/PaymentMethods/KnakenPay/Models/Pay.php b/src/PaymentMethods/KnakenPay/Models/Pay.php new file mode 100644 index 00000000..8d0f15d1 --- /dev/null +++ b/src/PaymentMethods/KnakenPay/Models/Pay.php @@ -0,0 +1,28 @@ + ['in3old'], KlarnaPay::class => ['klarna', 'klarnain'], KlarnaKP::class => ['klarnakp'], + KnakenPay::class => ['knaken', 'knakenpay'], Multibanco::class => ['multibanco'], MBWay::class => ['mbway'], Surepay::class => ['surepay'], diff --git a/tests/Buckaroo/Payments/KnakenPayTest.php b/tests/Buckaroo/Payments/KnakenPayTest.php new file mode 100644 index 00000000..71e57f96 --- /dev/null +++ b/tests/Buckaroo/Payments/KnakenPayTest.php @@ -0,0 +1,61 @@ +buckaroo->method('knaken')->pay([ + 'invoice' => uniqid(), + 'amountDebit' => 10.99, + 'returnURL' => 'https://buckaroo.dev./return', + 'returnURLCancel' => 'https://buckaroo.dev/cancel', + 'returnURLError' => 'https://buckaroo.dev/error', + 'returnURLReject' => 'https://buckaroo.dev/reject', + 'pushURL' => 'https://buckaroo.dev/push', + 'pushURLFailure' => 'https://buckaroo.dev/push-failure', + ]); + + $this->assertTrue($response->isPendingProcessing()); + } + + /** + * @test + */ + public function it_creates_a_knaken_refund() + { + $response = $this->buckaroo->method('knaken')->refund([ + 'invoice' => '2024020209061234', //Set invoice number of the transaction to refund + 'originalTransactionKey' => '2FBB9F43A0AF4AC8B49F9073C0EC828B', + //Set transaction key of the transaction to refund + 'amountCredit' => 0.01 + ]); + + $this->assertTrue($response->isFailed()); + } +} From 9dd3d001f420022595ac49013d2346978cf48d85 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 5 Mar 2024 14:13:52 +0800 Subject: [PATCH 73/81] Composer update --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c09d6227..d4712ec4 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.10.0", + "version": "1.11.0", "type": "library", "require": { "php": ">=7.4|^8.0", From 4b697a8828b0dcfdffc888813eebeb9f806dd360 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 5 Mar 2024 14:18:29 +0800 Subject: [PATCH 74/81] In3 update phone adapter key --- src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php index f18dd568..b14298c5 100644 --- a/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php +++ b/src/PaymentMethods/In3/Service/ParameterKeys/PhoneAdapter.php @@ -25,6 +25,6 @@ class PhoneAdapter extends ServiceParametersKeysAdapter { protected array $keys = [ - 'mobile' => 'MobilePhone' + 'mobile' => 'Phone' ]; } From 5e9e363b98fe14d7a302e703db5af3f58cee36ad Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 12 Mar 2024 07:35:53 +0100 Subject: [PATCH 75/81] BA-239 Make it possible to override the version within requests (#168) * Able to set service version * Fix style --- src/PaymentMethods/PaymentFacade.php | 9 +++++++-- src/PaymentMethods/PaymentMethod.php | 10 ++++++++++ tests/Buckaroo/Payments/AfterpayTest.php | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/PaymentMethods/PaymentFacade.php b/src/PaymentMethods/PaymentFacade.php index 584472ac..76d65d68 100644 --- a/src/PaymentMethods/PaymentFacade.php +++ b/src/PaymentMethods/PaymentFacade.php @@ -166,8 +166,13 @@ public function paymentMethod(): PaymentMethod */ public function __call(?string $name, array $arguments) { - if (method_exists($this->paymentMethod, $name)) - { + if (method_exists($this->paymentMethod, $name)) { + if($name === 'setServiceVersion') { + $this->paymentMethod->setServiceVersion($arguments[0]); + + return $this; + } + $this->paymentMethod->setPayload((new PayloadService($arguments[0] ?? []))->toArray()); return $this->paymentMethod->$name(); diff --git a/src/PaymentMethods/PaymentMethod.php b/src/PaymentMethods/PaymentMethod.php index 3041656c..0a1cf3a8 100644 --- a/src/PaymentMethods/PaymentMethod.php +++ b/src/PaymentMethods/PaymentMethod.php @@ -171,6 +171,16 @@ public function serviceVersion(): int return $this->serviceVersion; } + /** + * @return PaymentInterface + */ + public function setServiceVersion(int $serviceVersion): PaymentInterface + { + $this->serviceVersion = $serviceVersion; + + return $this; + } + /** * @param bool|null $isManually * @return $this diff --git a/tests/Buckaroo/Payments/AfterpayTest.php b/tests/Buckaroo/Payments/AfterpayTest.php index a92d30d0..bec23abd 100644 --- a/tests/Buckaroo/Payments/AfterpayTest.php +++ b/tests/Buckaroo/Payments/AfterpayTest.php @@ -31,7 +31,7 @@ class AfterpayTest extends BuckarooTestCase */ public function it_creates_a_afterpay_payment() { - $response = $this->buckaroo->method('afterpay')->pay($this->getPaymentPayload()); + $response = $this->buckaroo->method('afterpay')->setServiceVersion(3)->pay($this->getPaymentPayload()); $this->assertTrue($response->isSuccess()); } From c6e8e7b4e55eb6d186da0bc623125e379dcf0666 Mon Sep 17 00:00:00 2001 From: vegim carkaxhija Date: Tue, 12 Mar 2024 15:11:51 +0100 Subject: [PATCH 76/81] add Ideal Processing as separate payment method, also removed duplicate NoServiceSpecifiedPayment in $payments array --- src/PaymentMethods/PaymentMethodFactory.php | 5 +- .../iDealProcessing/Models/Pay.php | 28 ++++++ .../iDealProcessing/iDealProcessing.php | 75 ++++++++++++++++ .../Buckaroo/Payments/IdealProcessingTest.php | 90 +++++++++++++++++++ tests/Buckaroo/Payments/IdealTest.php | 2 +- 5 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 src/PaymentMethods/iDealProcessing/Models/Pay.php create mode 100644 src/PaymentMethods/iDealProcessing/iDealProcessing.php create mode 100644 tests/Buckaroo/Payments/IdealProcessingTest.php diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index 2840b750..f07890ba 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -27,6 +27,7 @@ use Buckaroo\PaymentMethods\iDin\iDin; use Buckaroo\PaymentMethods\SEPA\SEPA; use Buckaroo\PaymentMethods\iDeal\iDeal; +use Buckaroo\PaymentMethods\iDealProcessing\iDealProcessing; use Buckaroo\PaymentMethods\MBWay\MBWay; use Buckaroo\PaymentMethods\Tinka\Tinka; use Buckaroo\Exceptions\BuckarooException; @@ -92,7 +93,8 @@ class PaymentMethodFactory ], CreditClick::class => ['creditclick'], CreditManagement::class => ['credit_management'], - iDeal::class => ['ideal', 'idealprocessing'], + iDeal::class => ['ideal'], + iDealProcessing::class => ['idealprocessing'], iDealQR::class => ['ideal_qr'], iDin::class => ['idin'], In3::class => ['in3'], @@ -120,7 +122,6 @@ class PaymentMethodFactory Przelewy24::class => ['przelewy24'], PointOfSale::class => ['pospayment'], Giropay::class => ['giropay'], - NoServiceSpecifiedPayment::class => ['noservice'], GiftCard::class => [ 'giftcard', 'westlandbon', 'babygiftcard', 'babyparkgiftcard', 'beautywellness', 'boekenbon', 'boekenvoordeel', diff --git a/src/PaymentMethods/iDealProcessing/Models/Pay.php b/src/PaymentMethods/iDealProcessing/Models/Pay.php new file mode 100644 index 00000000..5e10d05c --- /dev/null +++ b/src/PaymentMethods/iDealProcessing/Models/Pay.php @@ -0,0 +1,28 @@ +payload)); + } + + /** + * @param Model|null $model + * @return TransactionResponse + */ + public function payRemainder(?Model $model = null): TransactionResponse + { + return parent::payRemainder($model ?? new Pay($this->payload)); + } + + /** + * @return array + * @throws BuckarooException + */ + public function issuers(): array + { + $this->serviceVersion = 2; + + return $this->traitIssuers(); + } +} diff --git a/tests/Buckaroo/Payments/IdealProcessingTest.php b/tests/Buckaroo/Payments/IdealProcessingTest.php new file mode 100644 index 00000000..cb4b3845 --- /dev/null +++ b/tests/Buckaroo/Payments/IdealProcessingTest.php @@ -0,0 +1,90 @@ +paymentPayload = [ + 'invoice' => uniqid(), + 'amountDebit' => 10.10, + 'issuer' => 'ABNANL2A', + 'pushURL' => 'https://buckaroo.dev/push', + 'returnURL' => 'https://buckaroo.dev/return', + 'clientIP' => [ + 'address' => '123.456.789.123', + 'type' => 0, + ], + 'customParameters' => [ + 'CustomerBillingFirstName' => 'test' + ], + 'additionalParameters' => [ + 'initiated_by_magento' => 1, + 'service_action' => 'something', + ], + ]; + } + + /** + * @return void + * @test + */ + public function it_get_idealprocessing_issuers() + { + $response = $this->buckaroo->method('idealprocessing')->issuers(); + + $this->assertIsArray($response); + foreach ($response as $item) + { + $this->assertIsArray($item); + $this->assertArrayHasKey('id', $item); + $this->assertArrayHasKey('name', $item); + } + } + + /** + * @return void + * @test + */ + public function it_creates_a_idealprocessing_payment() + { + $response = $this->buckaroo->method('idealprocessing')->pay($this->paymentPayload); + + $this->assertTrue($response->isPendingProcessing()); + } +} diff --git a/tests/Buckaroo/Payments/IdealTest.php b/tests/Buckaroo/Payments/IdealTest.php index 6b402c10..c7cb886d 100644 --- a/tests/Buckaroo/Payments/IdealTest.php +++ b/tests/Buckaroo/Payments/IdealTest.php @@ -100,7 +100,7 @@ public function it_get_ideal_issuers() */ public function it_creates_a_ideal_payment() { - $response = $this->buckaroo->method('idealprocessing')->pay($this->paymentPayload); + $response = $this->buckaroo->method('ideal')->pay($this->paymentPayload); $this->assertTrue($response->isPendingProcessing()); } From aa9461176b6e2f481f0c275645c950005bde71d6 Mon Sep 17 00:00:00 2001 From: Vildan Bina Date: Thu, 11 Apr 2024 14:52:43 +0200 Subject: [PATCH 77/81] add pending approval response status --- src/Resources/Constants/ResponseStatus.php | 1 + src/Transaction/Response/TransactionResponse.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/Resources/Constants/ResponseStatus.php b/src/Resources/Constants/ResponseStatus.php index f4f5414a..cb59462d 100644 --- a/src/Resources/Constants/ResponseStatus.php +++ b/src/Resources/Constants/ResponseStatus.php @@ -33,6 +33,7 @@ class ResponseStatus public const BUCKAROO_STATUSCODE_PENDING_PROCESSING = '791'; public const BUCKAROO_STATUSCODE_WAITING_ON_CONSUMER = '792'; public const BUCKAROO_STATUSCODE_PAYMENT_ON_HOLD = '793'; + public const BUCKAROO_STATUSCODE_PENDING_APPROVAL = '794'; public const BUCKAROO_STATUSCODE_CANCELLED_BY_USER = '890'; public const BUCKAROO_STATUSCODE_CANCELLED_BY_MERCHANT = '891'; diff --git a/src/Transaction/Response/TransactionResponse.php b/src/Transaction/Response/TransactionResponse.php index e4e3085d..c6b9bbf4 100644 --- a/src/Transaction/Response/TransactionResponse.php +++ b/src/Transaction/Response/TransactionResponse.php @@ -83,6 +83,14 @@ public function isRejected(): bool return $this->getStatusCode() == ResponseStatus::BUCKAROO_STATUSCODE_REJECTED; } + /** + * @return bool + */ + public function isPendingApproval(): bool + { + return $this->getStatusCode() == ResponseStatus::BUCKAROO_STATUSCODE_PENDING_APPROVAL; + } + /** * @return bool */ From 6fe14d89b9c4bdc1b8624f13a6c48612f4f08795 Mon Sep 17 00:00:00 2001 From: Vildan Bina Date: Fri, 12 Apr 2024 12:05:22 +0200 Subject: [PATCH 78/81] remove tinka --- example/transactions/tinka.php | 81 ----------- src/PaymentMethods/PaymentMethodFactory.php | 2 - src/PaymentMethods/Tinka/Models/Article.php | 26 ---- src/PaymentMethods/Tinka/Models/Pay.php | 137 ------------------ src/PaymentMethods/Tinka/Models/Recipient.php | 132 ----------------- .../Service/ParameterKeys/AddressAdapter.php | 32 ---- .../Service/ParameterKeys/ArticleAdapter.php | 30 ---- .../Service/ParameterKeys/CustomerAdapter.php | 31 ---- .../Service/ParameterKeys/PhoneAdapter.php | 30 ---- src/PaymentMethods/Tinka/Tinka.php | 37 ----- tests/Buckaroo/Payments/TinkaTest.php | 118 --------------- 11 files changed, 656 deletions(-) delete mode 100644 example/transactions/tinka.php delete mode 100644 src/PaymentMethods/Tinka/Models/Article.php delete mode 100644 src/PaymentMethods/Tinka/Models/Pay.php delete mode 100644 src/PaymentMethods/Tinka/Models/Recipient.php delete mode 100644 src/PaymentMethods/Tinka/Service/ParameterKeys/AddressAdapter.php delete mode 100644 src/PaymentMethods/Tinka/Service/ParameterKeys/ArticleAdapter.php delete mode 100644 src/PaymentMethods/Tinka/Service/ParameterKeys/CustomerAdapter.php delete mode 100644 src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php delete mode 100644 src/PaymentMethods/Tinka/Tinka.php delete mode 100644 tests/Buckaroo/Payments/TinkaTest.php diff --git a/example/transactions/tinka.php b/example/transactions/tinka.php deleted file mode 100644 index deb26f2a..00000000 --- a/example/transactions/tinka.php +++ /dev/null @@ -1,81 +0,0 @@ -method('tinka')->pay([ - 'amountDebit' => 3.5, - 'order' => uniqid(), - 'invoice' => uniqid(), - 'description' => 'This is a test order', - 'paymentMethod' => 'Credit', - 'deliveryMethod' => 'Locker', - 'deliveryDate' => '2030-01-01', - 'articles' => [ - [ - 'type' => 1, - 'description' => 'Blue Toy Car', - 'brand' => 'Ford Focus', - 'manufacturer' => 'Ford', - 'color' => 'Red', - 'size' => 'Small', - 'quantity' => '1', - 'price' => '3.5', - 'unitCode' => 'test', - ], - ], - 'customer' => [ - 'gender' => Gender::MALE, - 'firstName' => 'Buck', - 'lastName' => 'Aroo', - 'initials' => 'BA', - 'birthDate' => '1990-01-01', - ], - 'billing' => [ - 'recipient' => [ - 'lastNamePrefix' => 'the', - ], - 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => [ - 'mobile' => '0109876543', - ], - 'address' => [ - 'street' => 'Hoofdstraat', - 'houseNumber' => '80', - 'houseNumberAdditional' => 'A', - 'zipcode' => '8441EE', - 'city' => 'Heerenveen', - 'country' => 'NL', - ], - ], - 'shipping' => [ - 'recipient' => [ - 'lastNamePrefix' => 'the', - ], - 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => [ - 'mobile' => '0109876543', - ], - 'address' => [ - 'street' => 'Hoofdstraat', - 'houseNumber' => '80', - 'houseNumberAdditional' => 'A', - 'zipcode' => '8441EE', - 'city' => 'Heerenveen', - 'country' => 'NL', - ], - ], -]); - -//Refund -$response = $buckaroo->method('tinka')->refund([ - 'amountCredit' => 10, - 'invoice' => 'testinvoice 123', - 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', -]); diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index f07890ba..325405e2 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -29,7 +29,6 @@ use Buckaroo\PaymentMethods\iDeal\iDeal; use Buckaroo\PaymentMethods\iDealProcessing\iDealProcessing; use Buckaroo\PaymentMethods\MBWay\MBWay; -use Buckaroo\PaymentMethods\Tinka\Tinka; use Buckaroo\Exceptions\BuckarooException; use Buckaroo\PaymentMethods\Alipay\Alipay; use Buckaroo\PaymentMethods\In3Old\In3Old; @@ -115,7 +114,6 @@ class PaymentMethodFactory ExternalPayment::class => ['externalpayment'], Emandates::class => ['emandates'], Sofort::class => ['sofort', 'sofortueberweisung'], - Tinka::class => ['tinka'], Marketplaces::class => ['marketplaces'], NoServiceSpecifiedPayment::class => ['noservice'], Payconiq::class => ['payconiq'], diff --git a/src/PaymentMethods/Tinka/Models/Article.php b/src/PaymentMethods/Tinka/Models/Article.php deleted file mode 100644 index 1ad39f07..00000000 --- a/src/PaymentMethods/Tinka/Models/Article.php +++ /dev/null @@ -1,26 +0,0 @@ - [ - 'groupType' => 'Article', - ], - ]; - - /** - * @param $billing - * @return Recipient - */ - public function billing($billing = null) - { - if (is_array($billing)) - { - $this->billingRecipient = new Recipient('Billing', $billing); - $this->shippingRecipient = new Recipient('Billing', $billing); - } - - return $this->billingRecipient; - } - - /** - * @param $shipping - * @return Recipient - */ - public function shipping($shipping = null) - { - if (is_array($shipping)) - { - $this->shippingRecipient = new Recipient('Shipping', $shipping); - } - - return $this->shippingRecipient; - } - - /** - * @param $customer - * @return CustomerAdapter - */ - public function customer($customer = null) - { - if (is_array($customer)) - { - $this->customer = new CustomerAdapter(new Person($customer)); - } - - return $this->customer; - } - - /** - * @param array|null $articles - * @return array - */ - public function articles(?array $articles = null) - { - if (is_array($articles)) - { - foreach ($articles as $article) - { - $this->articles[] = new ArticleAdapter(new Article($article)); - } - } - - return $this->articles; - } -} diff --git a/src/PaymentMethods/Tinka/Models/Recipient.php b/src/PaymentMethods/Tinka/Models/Recipient.php deleted file mode 100644 index b266423a..00000000 --- a/src/PaymentMethods/Tinka/Models/Recipient.php +++ /dev/null @@ -1,132 +0,0 @@ -type = $type; - - parent::__construct($values); - } - - /** - * @param $recipient - * @return CustomerAdapter - */ - public function recipient($recipient = null) - { - if (is_array($recipient)) - { - $this->recipient = new CustomerAdapter(new Person($recipient)); - } - - return $this->recipient; - } - - /** - * @param $address - * @return AddressAdapter - */ - public function address($address = null) - { - if (is_array($address)) - { - $this->address = new AddressAdapter(new Address($address)); - } - - return $this->address; - } - - /** - * @param $phone - * @return PhoneAdapter - */ - public function phone($phone = null) - { - if (is_array($phone)) - { - $this->phone = new PhoneAdapter(new Phone($phone)); - } - - return $this->phone; - } - - /** - * @param $email - * @return Email - */ - public function email($email = null) - { - if (is_string($email)) - { - $this->email = new Email($email); - } - - return $this->email; - } - - /** - * @param string $key - * @return string|null - */ - public function getGroupType(string $key): ?string - { - return $this->type . 'Customer'; - } -} diff --git a/src/PaymentMethods/Tinka/Service/ParameterKeys/AddressAdapter.php b/src/PaymentMethods/Tinka/Service/ParameterKeys/AddressAdapter.php deleted file mode 100644 index bd316ace..00000000 --- a/src/PaymentMethods/Tinka/Service/ParameterKeys/AddressAdapter.php +++ /dev/null @@ -1,32 +0,0 @@ - 'StreetNumber', - 'houseNumberAdditional' => 'StreetNumberAdditional', - 'zipcode' => 'PostalCode', - ]; -} diff --git a/src/PaymentMethods/Tinka/Service/ParameterKeys/ArticleAdapter.php b/src/PaymentMethods/Tinka/Service/ParameterKeys/ArticleAdapter.php deleted file mode 100644 index 79f51acc..00000000 --- a/src/PaymentMethods/Tinka/Service/ParameterKeys/ArticleAdapter.php +++ /dev/null @@ -1,30 +0,0 @@ - 'UnitGrossPrice', - ]; -} diff --git a/src/PaymentMethods/Tinka/Service/ParameterKeys/CustomerAdapter.php b/src/PaymentMethods/Tinka/Service/ParameterKeys/CustomerAdapter.php deleted file mode 100644 index f868f4e8..00000000 --- a/src/PaymentMethods/Tinka/Service/ParameterKeys/CustomerAdapter.php +++ /dev/null @@ -1,31 +0,0 @@ - 'PrefixLastName', - 'birthDate' => 'DateOfBirth', - ]; -} diff --git a/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php b/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php deleted file mode 100644 index e9638788..00000000 --- a/src/PaymentMethods/Tinka/Service/ParameterKeys/PhoneAdapter.php +++ /dev/null @@ -1,30 +0,0 @@ - 'Phone' - ]; -} diff --git a/src/PaymentMethods/Tinka/Tinka.php b/src/PaymentMethods/Tinka/Tinka.php deleted file mode 100644 index 0363ae78..00000000 --- a/src/PaymentMethods/Tinka/Tinka.php +++ /dev/null @@ -1,37 +0,0 @@ -payload)); - } -} diff --git a/tests/Buckaroo/Payments/TinkaTest.php b/tests/Buckaroo/Payments/TinkaTest.php deleted file mode 100644 index e4689423..00000000 --- a/tests/Buckaroo/Payments/TinkaTest.php +++ /dev/null @@ -1,118 +0,0 @@ -buckaroo->method('tinka')->pay($this->getPaymentPayload()); - - $this->assertTrue($response->isPendingProcessing()); - } - - /** - * @test - */ - public function it_creates_a_tinka_refund() - { - $response = $this->buckaroo->method('tinka')->refund([ - 'amountCredit' => 10, - 'invoice' => 'testinvoice 123', - 'originalTransactionKey' => '2D04704995B74D679AACC59F87XXXXXX', - ]); - - $this->assertTrue($response->isFailed()); - } - - private function getPaymentPayload(): array - { - return [ - 'amountDebit' => 3.5, - 'order' => uniqid(), - 'invoice' => uniqid(), - 'description' => 'This is a test order', - 'paymentMethod' => 'Credit', - 'deliveryMethod' => 'Locker', - 'deliveryDate' => '2030-01-01', - 'articles' => [ - [ - 'type' => 1, - 'description' => 'Blue Toy Car', - 'brand' => 'Ford Focus', - 'manufacturer' => 'Ford', - 'color' => 'Red', - 'size' => 'Small', - 'quantity' => '1', - 'price' => '3.5', - 'unitCode' => 'test', - ], - ], - 'customer' => [ - 'gender' => Gender::MALE, - 'firstName' => 'Buck', - 'lastName' => 'Aroo', - 'initials' => 'BA', - 'birthDate' => '1990-01-01', - ], - 'billing' => [ - 'recipient' => [ - 'lastNamePrefix' => 'the', - ], - 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => [ - 'mobile' => '0109876543', - ], - 'address' => [ - 'street' => 'Hoofdstraat', - 'houseNumber' => '80', - 'houseNumberAdditional' => 'A', - 'zipcode' => '8441EE', - 'city' => 'Heerenveen', - 'country' => 'NL', - ], - ], - 'shipping' => [ - 'recipient' => [ - 'lastNamePrefix' => 'the', - ], - 'email' => 'billingcustomer@buckaroo.nl', - 'phone' => [ - 'mobile' => '0109876543', - ], - 'address' => [ - 'street' => 'Hoofdstraat', - 'houseNumber' => '80', - 'houseNumberAdditional' => 'A', - 'zipcode' => '8441EE', - 'city' => 'Heerenveen', - 'country' => 'NL', - ], - ], - ]; - } -} From 490b99f616e7990dfa16140170b47074ff8a7826 Mon Sep 17 00:00:00 2001 From: Vildan Bina Date: Fri, 12 Apr 2024 12:10:36 +0200 Subject: [PATCH 79/81] ignore `iDealProcessing` name pascal case check --- phpcs.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/phpcs.xml b/phpcs.xml index e60e272d..e3e1b7c2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -16,6 +16,7 @@ src/PaymentMethods/iDeal/iDeal.php src/PaymentMethods/iDealQR/iDealQR.php src/PaymentMethods/iDin/iDin.php + src/PaymentMethods/iDealProcessing/iDealProcessing.php From 72a2f627073579be53a4f3d073b0e5f63a2c516c Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 17 Apr 2024 08:49:17 +0200 Subject: [PATCH 80/81] Version change (#172) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d4712ec4..eed8f775 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.11.0", + "version": "1.11.1", "type": "library", "require": { "php": ">=7.4|^8.0", From 39353860fd227be5fd1d55c6ffd40bab2fae4683 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Wed, 17 Apr 2024 09:00:20 +0200 Subject: [PATCH 81/81] Change version number to 1.12.0 (#174) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index eed8f775..16fd1d9c 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.11.1", + "version": "1.12.0", "type": "library", "require": { "php": ">=7.4|^8.0",