From 23a7df176c2596780ba2c8cfc6d9aa9e28c1d43f Mon Sep 17 00:00:00 2001 From: nafezly Date: Sun, 16 Oct 2022 01:05:19 +0200 Subject: [PATCH] fix issues --- src/Classes/PayPalPayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Classes/PayPalPayment.php b/src/Classes/PayPalPayment.php index a24f928..4b8d83c 100644 --- a/src/Classes/PayPalPayment.php +++ b/src/Classes/PayPalPayment.php @@ -108,7 +108,7 @@ public function verify(Request $request): array try { $response = $client->execute(new OrdersCaptureRequest($request['token']) ); $result = json_decode(json_encode($response), true); - if ($result['result']['intent'] == "CAPTURE" && $result['result']['status'] == "APPROVED") { + if ($result['result']['status'] == "COMPLETED" && $result['statusCode']==201) { return [ 'success' => true, 'payment_id'=>$request['token'],