Merge pull request #9463 from ptibogxiv/patch-57

add capture option in payment function
This commit is contained in:
Laurent Destailleur 2018-09-12 18:38:10 +02:00 committed by GitHub
commit 23096354e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,7 +326,7 @@ class Stripe extends CommonObject
* @param int $usethirdpartyemailforreceiptemail Use thirdparty email as receipt email
* @return Stripe
*/
public function createPaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account, $status=0, $usethirdpartyemailforreceiptemail=0)
public function createPaymentStripe($amount, $currency, $origin, $item, $source, $customer, $account, $status=0, $usethirdpartyemailforreceiptemail=0, $capture=true)
{
global $conf;
@ -406,6 +406,7 @@ class Stripe extends CommonObject
"currency" => "$currency",
// "statement_descriptor" => " ",
"description" => "$description",
"capture" => $capture,
"metadata" => $metadata,
"source" => "$source",
"customer" => "$customer"
@ -430,6 +431,7 @@ class Stripe extends CommonObject
"currency" => "$currency",
// "statement_descriptor" => " ",
"description" => "$description",
"capture" => $capture,
"metadata" => $metadata,
"source" => "$source",
"customer" => "$customer",