Add ref in description

This commit is contained in:
Laurent Destailleur 2018-10-10 16:23:00 +02:00
parent 1204fb1e74
commit fcf62744d7

View File

@ -477,12 +477,12 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled))
'amount' => price2num($amountstripe, 'MU'),
'currency' => $currency,
'capture' => true, // Charge immediatly
'description' => 'Stripe payment: '.$FULLTAG,
'description' => 'Stripe payment: '.$FULLTAG.' ref='.$ref,
'metadata' => $metadata,
'customer' => $customer->id,
'source' => $card,
'statement_descriptor' => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 6, 'right', 'UTF-8', 1).' '.$FULLTAG, 22, 'right', 'UTF-8', 1) // 22 chars that appears on bank receipt
),array("idempotency_key" => "$ref","stripe_account" => "$stripeacc"));
),array("idempotency_key" => "$ref", "stripe_account" => "$stripeacc"));
// Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...)
if (empty($charge))
{
@ -517,10 +517,10 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled))
'amount' => price2num($amountstripe, 'MU'),
'currency' => $currency,
'capture' => true, // Charge immediatly
'description' => 'Stripe payment: '.$FULLTAG,
'description' => 'Stripe payment: '.$FULLTAG.' ref='.$ref,
'metadata' => $metadata,
'statement_descriptor' => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 6, 'right', 'UTF-8', 1).' '.$FULLTAG, 22, 'right', 'UTF-8', 1) // 22 chars that appears on bank receipt
),array("idempotency_key" => "$ref","stripe_account" => "$stripeacc"));
),array("idempotency_key" => "$ref", "stripe_account" => "$stripeacc"));
// Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...)
if (empty($charge))
{