Update charge.php

This commit is contained in:
Laurent Destailleur 2020-01-22 13:52:37 +01:00 committed by GitHub
parent b4758295e1
commit 999e363446
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, array("stripe_account" => $stripeacc));
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