From 99050872cb0dab11191002c77a3fd5d2b5e33ad0 Mon Sep 17 00:00:00 2001 From: apoca Date: Fri, 12 Apr 2019 14:17:04 +0100 Subject: [PATCH] closed: #25 - Checkout status must be a GET not a POST --- src/Brands/Transaction.php | 2 +- tests/Feature/SibsServiceTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Brands/Transaction.php b/src/Brands/Transaction.php index 2ff99e5..f4cb24b 100644 --- a/src/Brands/Transaction.php +++ b/src/Brands/Transaction.php @@ -72,7 +72,7 @@ public function status(): object try { $client = new Client($this->clientConfig); - $response = $client->post($this->endpoint . "checkouts/{$this->getCheckoutId()}/payment?entityId=" . config('sibs.authentication.entityId'), + $response = $client->get($this->endpoint . "checkouts/{$this->getCheckoutId()}/payment?entityId=" . config('sibs.authentication.entityId'), [ 'headers' => [ 'Authorization' => config('sibs.authentication.token'), diff --git a/tests/Feature/SibsServiceTest.php b/tests/Feature/SibsServiceTest.php index f90ae7d..7892a58 100644 --- a/tests/Feature/SibsServiceTest.php +++ b/tests/Feature/SibsServiceTest.php @@ -33,6 +33,6 @@ public function verifyResponseStatusInvalidEntity(): void $response2 = Sibs::status($response->response->id); $this->assertSame($response->status, 200); - $this->assertSame($response2->status, 400); + $this->assertSame($response2->status, 200); } }