craftcms / commerce-stripe

Stripe payment gateway for Craft Commerce
https://plugins.craftcms.com/commerce-stripe
MIT License
30 stars 49 forks source link

PaymentMethods of type 'ideal' cannot be saved to customers. #298

Open maartenheideman opened 3 months ago

maartenheideman commented 3 months ago

Description

I'm working on a project to let users subscribe to payed subscriptions featured by stripe. When I try to add a payment source of the type ideal or bancontact I'll recieve an error: PaymentMethods of type ideal cannot be saved to customers. How to solve that, what could be wrong? Creditcard and sepa work perfect. Ill get the message PaymentMethods of type 'ideal' cannot be saved to customer's. on urlvendor/craftcms/commerce-stripe/src/gateways/PaymentIntents.php at line 380`

I'll use this form code:

<form method="post" class="form">
    {{ csrfInput() }}
    {{ actionInput('commerce/payment-sources/add') }}
    {{ hiddenInput('gatewayId', plan.gateway.id) }}
    {{ hiddenInput('successMessage', 'Betaalmethode succesvol toegevoegd.') }}
    {{ hiddenInput('cancelUrl', 'account/pay'|hash) }}
    {{ hiddenInput('isPrimaryPaymentSource', 1) }}
    {{ redirectInput('account/pay') }}

    <div class="cards-details__form__fields">
        {% namespace plan.gateway.handle|commercePaymentFormNamespace %}
            {{ plan.gateway.getPaymentFormHtml({
            paymentFormType: 'elements',
            appearance: {
                theme: 'stripe'
            },
            elementOptions: {
                layout: {
                    type: 'tabs',
                    defaultCollapsed: false,
                    radios: false,
                    spacedAccordionItems: false
                }
            },
            submitButtonClasses: 'cards-details__button button',
            submitButtonText: 'Betaalmethode opslaan',
            })|raw }}
        {% endnamespace %}
    </div>
</form>

Steps to reproduce

  1. After login try to add a payment source from the type ideal or bancontact to a user with the from described above.

Additional info

linear[bot] commented 3 months ago

PT-1596 PaymentMethods of type 'ideal' cannot be saved to customers.