A more complete function
This commit is contained in:
parent
a7362ca055
commit
22b8a67e55
@ -245,10 +245,11 @@ class Stripe extends CommonObject
|
|||||||
* @param string $key ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect
|
* @param string $key ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect
|
||||||
* @param int $status Status (0=test, 1=live)
|
* @param int $status Status (0=test, 1=live)
|
||||||
* @param int $usethirdpartyemailforreceiptemail 1=use thirdparty email for receipt
|
* @param int $usethirdpartyemailforreceiptemail 1=use thirdparty email for receipt
|
||||||
* @param int $mode automatic=automatic payment, manual=need confirmation
|
* @param int $mode automatic=automatic confirmation/payment when conditions are ok, manual=need to call confirm() on intent
|
||||||
|
* @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok)
|
||||||
* @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found
|
* @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found
|
||||||
*/
|
*/
|
||||||
public function getPaymentIntent($object, $customer, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic')
|
public function getPaymentIntent($object, $customer, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false)
|
||||||
{
|
{
|
||||||
global $conf, $user, $mysoc;
|
global $conf, $user, $mysoc;
|
||||||
|
|
||||||
@ -318,7 +319,7 @@ class Stripe extends CommonObject
|
|||||||
$description=$object->element.$object->id;
|
$description=$object->element.$object->id;
|
||||||
|
|
||||||
$dataforintent = array(
|
$dataforintent = array(
|
||||||
"confirm" => false, // Do not confirm immediatly during creation of intent
|
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
||||||
"confirmation_method" => $mode,
|
"confirmation_method" => $mode,
|
||||||
"amount" => $stripeamount,
|
"amount" => $stripeamount,
|
||||||
"currency" => $object->multicurrency_code,
|
"currency" => $object->multicurrency_code,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user