FIX Try to fix stripe warning
This commit is contained in:
parent
116cf440de
commit
30ed312913
@ -2239,7 +2239,7 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme
|
|||||||
|
|
||||||
if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) {
|
if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) {
|
||||||
$noidempotency_key = (GETPOSTISSET('noidempotency') ? GETPOST('noidempotency', 'int') : 0); // By default noidempotency is unset, so we must use a different tag/ref for each payment. If set, we can pay several times the same tag/ref.
|
$noidempotency_key = (GETPOSTISSET('noidempotency') ? GETPOST('noidempotency', 'int') : 0); // By default noidempotency is unset, so we must use a different tag/ref for each payment. If set, we can pay several times the same tag/ref.
|
||||||
$paymentintent = $stripe->getPaymentIntent($amount, $currency, $tag, 'Stripe payment: '.$fulltag.(is_object($object) ? ' ref='.$object->ref : ''), $object, $stripecu, $stripeacc, $servicestatus, 0, 'automatic', false, null, 0, $noidempotency_key);
|
$paymentintent = $stripe->getPaymentIntent($amount, $currency, ($tag ? $tag : $fulltag), 'Stripe payment: '.$fulltag.(is_object($object) ? ' ref='.$object->ref : ''), $object, $stripecu, $stripeacc, $servicestatus, 0, 'automatic', false, null, 0, $noidempotency_key);
|
||||||
// The paymentintnent has status 'requires_payment_method' (even if paymentintent was already paid)
|
// The paymentintnent has status 'requires_payment_method' (even if paymentintent was already paid)
|
||||||
//var_dump($paymentintent);
|
//var_dump($paymentintent);
|
||||||
if ($stripe->error) {
|
if ($stripe->error) {
|
||||||
|
|||||||
@ -465,12 +465,12 @@ class Stripe extends CommonObject
|
|||||||
"currency" => $currency_code,
|
"currency" => $currency_code,
|
||||||
"payment_method_types" => $paymentmethodtypes,
|
"payment_method_types" => $paymentmethodtypes,
|
||||||
"description" => $description,
|
"description" => $description,
|
||||||
"statement_descriptor_suffix" => $descriptor, // For card payment, 22 chars that appears on bank receipt (prefix into stripe setup + this suffix)
|
|
||||||
//"save_payment_method" => true,
|
//"save_payment_method" => true,
|
||||||
"setup_future_usage" => "on_session",
|
"setup_future_usage" => "on_session",
|
||||||
"metadata" => $metadata
|
"metadata" => $metadata
|
||||||
);
|
);
|
||||||
if ($descriptor) {
|
if ($descriptor) {
|
||||||
|
$dataforintent["statement_descriptor_suffix"] = $descriptor; // For card payment, 22 chars that appears on bank receipt (prefix into stripe setup + this suffix)
|
||||||
$dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix
|
$dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix
|
||||||
}
|
}
|
||||||
if (!is_null($customer)) {
|
if (!is_null($customer)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user