Skip to content
Snippets Groups Projects
Commit c38ede96 authored by mathavan's avatar mathavan
Browse files

Enable BACS direct debit and send subscribtion data to stripe checkout

parent 714e6c22
Branches artfulrobot-moat-6.10
No related tags found
No related merge requests found
......@@ -205,11 +205,20 @@ class CRM_Core_Payment_StripeCheckout extends CRM_Core_Payment_Stripe {
// 'submit_type' => one of 'auto', pay, book, donate
'client_reference_id' => $propertyBag->getInvoiceID(),
'payment_method_types' => $this->getSupportedPaymentMethods($propertyBag),
'payment_intent_data' => [
'description' => $this->getDescription($propertyBag, 'description'),
],
];
// Stripe Error:
// Stripe\Exception\InvalidRequestException: You can not pass `payment_intent_data` in `subscription` mode.
if ($propertyBag->getIsRecur()) {
$checkoutSessionParams['subscription_data'] = [
'description' => $this->getDescription($propertyBag, 'description'),
];
}else {
$checkoutSessionParams['payment_intent_data'] = [
'description' => $this->getDescription($propertyBag, 'description'),
];
}
// Allows you to alter the params passed to StripeCheckout (eg. payment_method_types)
CRM_Utils_Hook::alterPaymentProcessorParams($this, $propertyBag, $checkoutSessionParams);
......
......@@ -279,7 +279,7 @@ class CRM_Stripe_Api {
// 'afterpay_clearpay',
// 'alipay',
// 'au_becs_debit',
// 'bacs_debit',
'bacs_debit' => E::ts('BACS Direct Debit'),
// 'bancontact',
// 'blik',
// 'boleto',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment