Skip to content

Commit

Permalink
Fix get intent status response type
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-zhang-awx committed Apr 26, 2024
1 parent a725517 commit 2d478fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Model/Client/Request/PaymentIntents/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function getUri(): string
*/
protected function parseResponse(ResponseInterface $request): string
{
return $request->getBody()->getContents();
return $request->getBody();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Model/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected function checkIntent($id)
$resp = $this->intentGet->setPaymentIntentId($id)->send();

$respArr = json_decode($resp, true);
if (!in_array($respArr['status'],["SUCCEEDED","REQUIRES_CAPTURE"])) {
if (!in_array($respArr['status'], ["SUCCEEDED","REQUIRES_CAPTURE"])) {
throw new \Exception("Something went wrong while processing your request. Please try again later.");
}
}
Expand Down

0 comments on commit 2d478fb

Please sign in to comment.