Skip to content

Commit

Permalink
Merge pull request #9463 from ptibogxiv/patch-57
Browse files Browse the repository at this point in the history
add capture option in payment function
  • Loading branch information
eldy committed Sep 12, 2018
2 parents 0bf4208 + 849b715 commit 2309635
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion htdocs/stripe/class/stripe.class.php
Expand Up @@ -326,7 +326,7 @@ public function cardStripe($cu, CompanyPaymentMode $object, $stripeacc='', $stat
* @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;

Expand Down Expand Up @@ -406,6 +406,7 @@ public function createPaymentStripe($amount, $currency, $origin, $item, $source,
"currency" => "$currency",
// "statement_descriptor" => " ",
"description" => "$description",
"capture" => $capture,
"metadata" => $metadata,
"source" => "$source",
"customer" => "$customer"
Expand All @@ -430,6 +431,7 @@ public function createPaymentStripe($amount, $currency, $origin, $item, $source,
"currency" => "$currency",
// "statement_descriptor" => " ",
"description" => "$description",
"capture" => $capture,
"metadata" => $metadata,
"source" => "$source",
"customer" => "$customer",
Expand Down

0 comments on commit 2309635

Please sign in to comment.