Skip to content

Commit

Permalink
feat: Support successful PaymentIntent on initial confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
hellopablo committed May 18, 2023
1 parent 2320bb3 commit be7f71e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,12 @@ public function sca(
'return_url' => $sSuccessUrl,
]);

if ($oPaymentIntent->status === self::PAYMENT_INTENT_STATUS_REQUIRES_ACTION) {
if ($oPaymentIntent->status === Self::PAYMENT_INTENT_STATUS_SUCCEEDED) {
return $this->scaComplete($oScaResponse, $oPaymentIntent);

} elseif ($oPaymentIntent->status === self::PAYMENT_INTENT_STATUS_REQUIRES_ACTION) {
$sUrl = $oPaymentIntent->next_action->redirect_to_url->url ?? null;

} else {
$sUrl = $oPaymentIntent->next_source_action->authorize_with_url->url ?? null;
}
Expand Down

0 comments on commit be7f71e

Please sign in to comment.