diff --git a/composer.json b/composer.json index 7cd2cc9c..f2fdcacd 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "buckaroo/sdk", "description": "Buckaroo payment SDK", "license": "MIT", - "version": "1.17.0", + "version": "1.17.1", "type": "library", "require": { "php": "^8.1", diff --git a/example/transactions/sofort.php b/example/transactions/sofort.php deleted file mode 100644 index 0db0a955..00000000 --- a/example/transactions/sofort.php +++ /dev/null @@ -1,22 +0,0 @@ -method('sofortueberweisung')->pay([ - 'invoice' => uniqid(), - 'amountDebit' => 10.10, -]); - - -//Refund -$response = $buckaroo->method('sofortueberweisung')->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/Handlers/HMAC/Hmac.php b/src/Handlers/HMAC/Hmac.php index 5b3befb6..09d16362 100644 --- a/src/Handlers/HMAC/Hmac.php +++ b/src/Handlers/HMAC/Hmac.php @@ -51,7 +51,7 @@ public function base64Data($data = null) if (is_array($data)) { $data = mb_convert_encoding( - json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), + json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION), 'UTF-8', 'auto' ); diff --git a/src/PaymentMethods/PaymentMethodFactory.php b/src/PaymentMethods/PaymentMethodFactory.php index b03b2b2f..b0bcde8a 100644 --- a/src/PaymentMethods/PaymentMethodFactory.php +++ b/src/PaymentMethods/PaymentMethodFactory.php @@ -33,7 +33,6 @@ use Buckaroo\PaymentMethods\Alipay\Alipay; use Buckaroo\PaymentMethods\In3Old\In3Old; use Buckaroo\PaymentMethods\Paypal\Paypal; -use Buckaroo\PaymentMethods\Sofort\Sofort; use Buckaroo\PaymentMethods\Thunes\Thunes; use Buckaroo\PaymentMethods\Belfius\Belfius; use Buckaroo\PaymentMethods\Billink\Billink; @@ -112,7 +111,6 @@ class PaymentMethodFactory EPS::class => ['eps'], ExternalPayment::class => ['externalpayment'], Emandates::class => ['emandates'], - Sofort::class => ['sofort', 'sofortueberweisung'], Marketplaces::class => ['marketplaces'], NoServiceSpecifiedPayment::class => ['noservice'], Payconiq::class => ['payconiq'], diff --git a/src/PaymentMethods/Sofort/Sofort.php b/src/PaymentMethods/Sofort/Sofort.php deleted file mode 100644 index 68adc948..00000000 --- a/src/PaymentMethods/Sofort/Sofort.php +++ /dev/null @@ -1,47 +0,0 @@ -setRefundPayload(); - - $this->setServiceList('instantRefund', $model); - - return $this->postRequest(); - } -} diff --git a/tests/Buckaroo/Payments/SofortTest.php b/tests/Buckaroo/Payments/SofortTest.php deleted file mode 100644 index e0656911..00000000 --- a/tests/Buckaroo/Payments/SofortTest.php +++ /dev/null @@ -1,62 +0,0 @@ -paymentPayload = ([ - 'invoice' => uniqid(), - 'amountDebit' => 10.10, - ]); - } - - /** - * @return void - * @test - */ - public function it_creates_a_sofort_payment() - { - $response = $this->buckaroo->method('sofortueberweisung')->pay($this->paymentPayload); - - $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->isValidationFailure()); - } -}