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,8 +142,12 @@ if (!$rowid)
} }
if (! empty($charge->payment_intent)) { if (! empty($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)); $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc));
} }
}
// The metadata FULLTAG is defined by the online payment page // The metadata FULLTAG is defined by the online payment page
$FULLTAG=$charge->metadata->FULLTAG; $FULLTAG=$charge->metadata->FULLTAG;