diff --git a/src/PaymentMethods/KlarnaKP/Models/Article.php b/src/PaymentMethods/KlarnaKP/Models/Article.php new file mode 100644 index 00000000..a734e884 --- /dev/null +++ b/src/PaymentMethods/KlarnaKP/Models/Article.php @@ -0,0 +1,27 @@ + 'ArticlePrice', 'quantity' => 'ArticleQuantity', 'vatPercentage' => 'ArticleVat', + 'imageUrl' => 'ArticleImageUrl', + 'productUrl' => 'ArticleProductUrl', ]; } diff --git a/tests/Buckaroo/Payments/KlarnaKPTest.php b/tests/Buckaroo/Payments/KlarnaKPTest.php index 1395746f..dc1a69d6 100644 --- a/tests/Buckaroo/Payments/KlarnaKPTest.php +++ b/tests/Buckaroo/Payments/KlarnaKPTest.php @@ -111,6 +111,8 @@ 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', @@ -118,6 +120,8 @@ public function it_creates_a_klarnakp_update_reservation() 'vatPercentage' => '21', 'quantity' => '1', 'price' => '10.10', + 'imageUrl' => 'https://example.com/image', + 'productUrl' => 'https://example.com/product', ], ], ]); @@ -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(), @@ -187,6 +192,8 @@ 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', @@ -194,6 +201,8 @@ private function getPaymentPayload(?array $additional = null): array 'vatPercentage' => '21', 'quantity' => '1', 'price' => '10.10', + 'imageUrl' => 'https://example.com/image', + 'productUrl' => 'https://example.com/product', ], ] ];