Fix for new stripe API 2018-08-23

Fix break of change API
This commit is contained in:
ptibogxiv 2018-08-28 13:34:59 +02:00 committed by GitHub
parent 50d50c2e10
commit 90de2698c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,10 @@ class Stripe extends CommonObject
{ {
$dataforcustomer = array( $dataforcustomer = array(
"email" => $object->email, "email" => $object->email,
"business_vat_id" => $object->tva_intra, "tax_info" => array(
"tax_id" => $object->tva_intra ? $object->tva_intra : null, // We force data to "null" if empty as expected by Stripe
"type" => 'vat',
),
"description" => $object->name, "description" => $object->name,
"metadata" => array('dol_id'=>$object->id, 'dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>(empty($_SERVER['REMOTE_ADDR'])?'':$_SERVER['REMOTE_ADDR'])) "metadata" => array('dol_id'=>$object->id, 'dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>(empty($_SERVER['REMOTE_ADDR'])?'':$_SERVER['REMOTE_ADDR']))
); );