I'll working on a project where users can buy a subscription to recieve extra features in their account. In the Stripe dashboard I'll set up 2 different products year en monthly payment. In craft commerce I connected the products to the subscription plans. I'll set up 4 payment methods in Stripe. But rendering the form for handeling the payment only show a creditcard option. I'll use:
{% set gateway = craft.commerce.gateways.getGatewayByHandle('stripe') %}
<form method="POST">
{{ csrfInput() }}
{{ actionInput('commerce/payments/pay') }}
{# Include *outside* the namespaced form inputs: #}
{{ hiddenInput('gatewayId', gateway.id) }}
{% namespace gateway.handle|commercePaymentFormNamespace %}
{{ gateway.getPaymentFormHtml({})|raw }}
{% endnamespace %}
<button>Pay</button>
</form>
Also tried working with custom params like:
{% set params = {
paymentFormType: 'elements',
} %}
But no difference there. Someone has suggestions ho to show all payment methods?
The project runs on Craft 4 and Commerce 4