Closed rvdsteege closed 2 years ago
For the pronamic_pay_direct_debit_bancontact
, pronamic_pay_direct_debit_ideal
and pronamic_pay_direct_debit_sofort
gateways we should set mollie_sequence_type
to first
regardless of $gateway->auto_renew
?
In the Mollie library we need to convert the payment method to first with PaymentMethods::get_first_payment_method( $payment_method )
if 'first' === $payment->get_meta( 'mollie_sequence_type' );
? That way, a mandate will be created as the gateway name suggests, but there will be no auto_renew
.
Or am I missing something @rvdsteege?
Or change in Mollie:
if ( \count( $subscriptions ) > 0 ) {
to
if (
\count( $subscriptions ) > 0
||
\in_array(
$payment_method,
array(
PaymentMethods::DIRECT_DEBIT_BANCONTACT,
PaymentMethods::DIRECT_DEBIT_IDEAL,
PaymentMethods::DIRECT_DEBIT_SOFORT,
),
true
)
) {
}
Tested: issue has been resolved in https://github.com/pronamic/wp-pronamic-pay-mollie/pull/3 🎉
When using the Direct Debit (mandate via iDEAL/Bancontact/SOFORT) payment methods without auto renew, then the first payment will fail with this (Mollie) error:
Instead, the regular iDEAL/Bancontact/SOFORT payment methods can be used both with and without auto renew:
Without auto renew, there is no subscription for the payment, so in the Mollie gateway the sequence type will not be set to
first
:Thoughts, @remcotolsma?
Internal Help Scout ticket: https://secure.helpscout.net/conversation/1824903680/23725/