Merge pull request #12902 from ptibogxiv/patch-293

fix stripe/charge.php for connect mode with payment intent
This commit is contained in:
Laurent Destailleur 2020-01-22 13:53:04 +01:00 committed by GitHub
commit 3d474d5174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,11 @@ if (!$rowid)
}
if (! empty($charge->payment_intent)) {
$charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent);
if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage
$charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent);
} else {
$charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc));
}
}
// The metadata FULLTAG is defined by the online payment page