Closed mvanbeselaere closed 7 months ago
This wouldn't just be cool. It's absolutely necessary to be able to configure the payment methods
Found a way to override it:
use craft\commerce\stripe\base\Gateway as StripeGateway;
use craft\commerce\stripe\events\BuildSetupIntentRequestEvent;
Event::on(
StripeGateway::class,
StripeGateway::EVENT_BUILD_SETUP_INTENT_REQUEST,
function(BuildSetupIntentRequestEvent $event) {
$event->request["payment_method_types"] = ["card"];
}
);
Hi @okolvik-avento - trying to implement something similar here. Can you share how you are implementing this override?
Hi All
Thanks for highlighting this.
We have pushed a fix which means the payment method options shown to the user will now match those that are enabled in your Stripe dashboard.
As @okolvik-avento mentioned you can still alter/restrict these by using the Gateway::EVENT_BUILD_SETUP_INTENT_REQUEST
event.
This fix will be included in the next release of the plugin.
Thanks!
Hi All
Version 4.1.1
of the plugin has now been released which includes this update.
Thanks!
Hey there,
The current default request by the CustomerController is set to
['bancontact', 'card', 'ideal']
as per https://github.com/craftcms/commerce-stripe/blob/e779b6f53ce3cd11ccdda9f71fbdbf04629af3ed/src/controllers/CustomersController.php#L129-L132It would be cool to be able to select our own default
payment_method_types
in the settings. Or is there a way to tweak that via the params object of the{{ gateway.getPaymentFormHtml(params)|raw }}
?Thanks a lot