From acfc251253226ab5a0a7d8b3ab2c0434001730df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Apr 2019 03:09:54 +0200 Subject: [PATCH] Fix idempotency key --- htdocs/public/payment/newpayment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 69f2d96c8c2..f06228291ef 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -486,7 +486,7 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled)) 'customer' => $customer->id, 'source' => $card, 'statement_descriptor' => dol_trunc($FULLTAG, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description) - ), array("idempotency_key" => "$ref", "stripe_account" => "$stripeacc")); + ), array("idempotency_key" => "$FULLTAG", "stripe_account" => "$stripeacc")); // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) if (empty($charge)) { @@ -534,7 +534,7 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled)) 'description' => 'Stripe payment: '.$FULLTAG.' ref='.$ref, 'metadata' => $metadata, 'statement_descriptor' => dol_trunc($FULLTAG, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description) - ), array("idempotency_key" => "$ref", "stripe_account" => "$stripeacc")); + ), array("idempotency_key" => "$FULLTAG", "stripe_account" => "$stripeacc")); // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) if (empty($charge)) {