Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.16.0 #200

Merged
merged 7 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<p align="center">
<img src="https://user-images.githubusercontent.com/7081446/178473472-c0c29ec5-762c-47de-9ed4-999e5ad6c70d.png" width="200px" position="center">
<img src="https://github.com/user-attachments/assets/c1720e40-715a-418c-949e-8ac833e01626" width="200px" position="center">
</p>

# Buckaroo PHP SDK
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "buckaroo/sdk",
"description": "Buckaroo payment SDK",
"license": "MIT",
"version": "1.15.0",
"version": "1.16.0",
"type": "library",
"require": {
"php": "^8.1",
Expand Down
27 changes: 27 additions & 0 deletions src/PaymentMethods/KlarnaKP/Models/Article.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/*
* NOTICE OF LICENSE
*
* This source file is subject to the MIT License
* It is available through the world-wide-web at this URL:
* https://tldrlegal.com/license/mit-license
* If you are unable to obtain it through the world-wide-web, please send an email
* to support@buckaroo.nl so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please contact support@buckaroo.nl for more information.
*
* @copyright Copyright (c) Buckaroo B.V.
* @license https://tldrlegal.com/license/mit-license
*/

namespace Buckaroo\PaymentMethods\KlarnaKP\Models;

class Article extends \Buckaroo\Models\Article
{
protected ?string $imageUrl;
protected ?string $productUrl;
}
1 change: 0 additions & 1 deletion src/PaymentMethods/KlarnaKP/Models/Payload.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

namespace Buckaroo\PaymentMethods\KlarnaKP\Models;

use Buckaroo\Models\Article;
use Buckaroo\Models\ServiceParameter;
use Buckaroo\PaymentMethods\KlarnaKP\Service\ParameterKeys\ArticleAdapter;
use Buckaroo\PaymentMethods\Traits\CountableGroupKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ class ArticleAdapter extends ServiceParametersKeysAdapter
'price' => 'ArticlePrice',
'quantity' => 'ArticleQuantity',
'vatPercentage' => 'ArticleVat',
'imageUrl' => 'ArticleImageUrl',
'productUrl' => 'ArticleProductUrl',
];
}
1 change: 1 addition & 0 deletions src/PaymentMethods/iDeal/Models/Pay.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
class Pay extends ServiceParameter
{
protected string $issuer;
protected string $shippingCost;
}
1 change: 1 addition & 0 deletions tests/Buckaroo/Payments/IdealTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function it_creates_a_ideal_fast_checkout_payment()
{
$response = $this->buckaroo->method('ideal')->payFastCheckout([
'amountDebit' => 10.10,
'shippingCost' => 0.10,
'invoice' => uniqid(),
]);

Expand Down
9 changes: 9 additions & 0 deletions tests/Buckaroo/Payments/KlarnaKPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,17 @@ public function it_creates_a_klarnakp_update_reservation()
'vatPercentage' => '21',
'quantity' => '2',
'price' => '20.10',
'imageUrl' => 'https://example.com/image',
'productUrl' => 'https://example.com/product',
],
[
'identifier' => 'Articlenumber2',
'description' => 'Red Toy Car',
'vatPercentage' => '21',
'quantity' => '1',
'price' => '10.10',
'imageUrl' => 'https://example.com/image',
'productUrl' => 'https://example.com/product',
],
],
]);
Expand All @@ -143,6 +147,7 @@ public function it_creates_a_klarnakp_refund()
private function getPaymentPayload(?array $additional = null): array
{
$payload = [
'clientIP' => '198.162.1.1',
'currency' => 'EUR',
'amountDebit' => 50.30,
'order' => uniqid(),
Expand Down Expand Up @@ -187,13 +192,17 @@ private function getPaymentPayload(?array $additional = null): array
'vatPercentage' => '21',
'quantity' => '2',
'price' => '20.10',
'imageUrl' => 'https://example.com/image',
'productUrl' => 'https://example.com/product',
],
[
'identifier' => 'Articlenumber2',
'description' => 'Red Toy Car',
'vatPercentage' => '21',
'quantity' => '1',
'price' => '10.10',
'imageUrl' => 'https://example.com/image',
'productUrl' => 'https://example.com/product',
],
]
];
Expand Down
Loading