Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequence type first set for subscriptions requiring manual renewals #58

Closed
rvdsteege opened this issue Oct 13, 2023 · 0 comments · Fixed by #59
Closed

Sequence type first set for subscriptions requiring manual renewals #58

rvdsteege opened this issue Oct 13, 2023 · 0 comments · Fixed by #59
Assignees
Labels

Comments

@rvdsteege
Copy link
Member

A customer encountered an issue while trying to pay for a WooCommerce order with the bank transfer payment method. When attempting to complete a purchase for a subscription product, an error occurs:

Unprocessable Entity - The payment method does not support sequence type.

This issue arises from the fact that the Mollie sequence type is set to first even though the bank transfer payment method does not support sequence types:

/**
* Subscriptions.
*/
$subscriptions = $this->get_pronamic_subscriptions( $order );
foreach ( $subscriptions as $subscription ) {
// Add subscription and period.
$payment->add_subscription( $subscription );
$start_date = $subscription->get_start_date();
if ( null !== $start_date ) {
$period = $subscription->get_period_for_date( $start_date );
if ( null !== $period ) {
$payment->add_period( $period );
}
}
$payment->set_meta( 'mollie_sequence_type', 'first' );

If all subscription products in the cart require manual renewal (e.g. through the Pronamic WooCommerce Renew Style plugin), the sequence type should not be set in the payment request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Status: Done
1 participant