From 549efe2a74691e03e21af87216c5357f81d97afb Mon Sep 17 00:00:00 2001 From: Shota Menteshashvili <39200660+shota-mentesh@users.noreply.github.com> Date: Tue, 22 Jun 2021 22:37:48 +0400 Subject: [PATCH] Refund returns null on success Refund request, if successful, returns 200 OK with empty body: https://developer.ipay.ge/v1/#tag/Refund Return type for refund() should be nullable. --- src/Contracts/IPay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Contracts/IPay.php b/src/Contracts/IPay.php index 83ea7ac..a7c1884 100644 --- a/src/Contracts/IPay.php +++ b/src/Contracts/IPay.php @@ -229,7 +229,7 @@ public function token() * @return \stdClass * @throws \GuzzleHttp\Exception\GuzzleException */ - public function refund(string $order_id, int $amount, string $token = null): \stdClass + public function refund(string $order_id, int $amount, string $token = null): ?\stdClass { $url = config('ipay.url') . '/checkout/refund';