pronamic / wp-pronamic-pay-mollie

Mollie driver for the WordPress payment processing library.
http://www.wp-pay.org/gateways/mollie/
6 stars 1 forks source link

Error with "Bank" field of "Direct Debit (mandate via iDEAL)" payment method when iDEAL is not enabled #30

Closed rvdsteege closed 1 year ago

rvdsteege commented 1 year ago

If the SEPA Direct Debit payment method is inactive for a Mollie account, the "Direct Debit (mandate via …)" payment methods are registered with the null ("unknown") status. They then appears in the payment method selection field.

However, if the iDEAL payment method is also inactive for the Mollie account, an error will occur while trying to retrieve the issuers for the "Direct Debit (mandate via iDEAL)" field:

Message An error occurred within the "Bank" field of the "Direct Debit (mandate via iDEAL)" payment method. Code 403

Currently, we only set the status of the "Direct Debit (mandate via …)" payment methods if the SEPA Direct Debit method is active. I think we can also set the status to inactive of these methods if the SEPA Direct Debit is not activated, as these methods can not be used then. This will prevent trying to retrieve issuers for a payment method which has not been activated in the Mollie account.

https://github.com/pronamic/wp-pronamic-pay-mollie/blob/6653500101afc5b96de8f77fb2ded9e662d27730/src/Gateway.php#L272-L290

Internal Help Scout ticket: https://secure.helpscout.net/conversation/2200547502/25428