Fix payment in connect mode
I know that it's not an optimal fix but it's functionnal for dolibarr 8.0.0 release
This commit is contained in:
parent
e1877625a0
commit
3c15da9dde
@ -425,19 +425,25 @@ class Stripe extends CommonObject
|
|||||||
$fee = round($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100);
|
$fee = round($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$charge = \Stripe\Charge::create(array(
|
$paymentarray = array(
|
||||||
"amount" => "$stripeamount",
|
"amount" => "$stripeamount",
|
||||||
"currency" => "$currency",
|
"currency" => "$currency",
|
||||||
// "statement_descriptor" => " ",
|
// "statement_descriptor" => " ",
|
||||||
"description" => "$description",
|
"description" => "$description",
|
||||||
"metadata" => $metadata,
|
"metadata" => $metadata,
|
||||||
"source" => "$source",
|
"source" => "$source",
|
||||||
"customer" => "$customer",
|
"customer" => "$customer"
|
||||||
"application_fee" => "$fee"
|
);
|
||||||
), array(
|
if ($conf->entity>1 && $fee>0)
|
||||||
"idempotency_key" => "$ref",
|
{
|
||||||
"stripe_account" => "$account"
|
$paymentarray["application_fee"] = $fee;
|
||||||
));
|
}
|
||||||
|
if ($societe->email && $usethirdpartyemailforreceiptemail)
|
||||||
|
{
|
||||||
|
$paymentarray["receipt_email"] = $societe->email;
|
||||||
|
}
|
||||||
|
|
||||||
|
$charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$ref","stripe_account" => "$account"));
|
||||||
}
|
}
|
||||||
if (isset($charge->id)) {}
|
if (isset($charge->id)) {}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user