Fix label for API 2019-02-19
This commit is contained in:
parent
8aa8efcb14
commit
f8c381f069
@ -484,7 +484,7 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled))
|
||||
'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
|
||||
'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"));
|
||||
// Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...)
|
||||
if (empty($charge))
|
||||
@ -532,7 +532,7 @@ $charge = \Stripe\Charge::create(array(
|
||||
'capture' => true, // Charge immediatly
|
||||
'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
|
||||
'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"));
|
||||
// Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...)
|
||||
if (empty($charge))
|
||||
|
||||
@ -319,7 +319,7 @@ class Stripe extends CommonObject
|
||||
"currency" => $object->multicurrency_code,
|
||||
"customer" => $customer,
|
||||
"allowed_source_types" => ["card"],
|
||||
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
|
||||
"statement_descriptor" => dol_trunc($description, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description)
|
||||
"metadata" => array('dol_type'=>$object->element, 'dol_id'=>$object->id, 'dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>(empty($_SERVER['REMOTE_ADDR'])?'':$_SERVER['REMOTE_ADDR']))
|
||||
);
|
||||
|
||||
@ -557,7 +557,7 @@ class Stripe extends CommonObject
|
||||
$charge = \Stripe\Charge::create(array(
|
||||
"amount" => "$stripeamount",
|
||||
"currency" => "$currency",
|
||||
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
|
||||
"statement_descriptor" => dol_trunc($description, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description)
|
||||
"description" => "Stripe payment: ".$description,
|
||||
"capture" => $capture,
|
||||
"metadata" => $metadata,
|
||||
@ -567,7 +567,7 @@ class Stripe extends CommonObject
|
||||
$paymentarray = array(
|
||||
"amount" => "$stripeamount",
|
||||
"currency" => "$currency",
|
||||
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
|
||||
"statement_descriptor" => dol_trunc($description, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description)
|
||||
"description" => "Stripe payment: ".$description,
|
||||
"capture" => $capture,
|
||||
"metadata" => $metadata,
|
||||
@ -594,7 +594,7 @@ class Stripe extends CommonObject
|
||||
$paymentarray = array(
|
||||
"amount" => "$stripeamount",
|
||||
"currency" => "$currency",
|
||||
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
|
||||
"statement_descriptor" => dol_trunc($description, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description)
|
||||
"description" => "Stripe payment: ".$description,
|
||||
"capture" => $capture,
|
||||
"metadata" => $metadata,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user