Describe your bug or feature request.

When I try to make a payment with the commerce_sermepa module, there is a redirection using NeedsRedirectException that never happens due to PaymentCheckoutController class does not handle the exception. THen, the redirection is considered an error and it never happens.

If a bug, provide steps to reproduce it from a clean install.

Have commerce configured to handle payments with commerce Sermepa as the payment gateway.

With a custom module place the order as completed during in the commerce_order.place.post_transition event.

Then make a purchase and that error will appear.

Proposed resolution

WHen the exception is a NeedsRedirectException, throw it anyway so the redirection happens.

Issue fork commerce-3438098

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

omarlopesino created an issue. See original summary.

omarlopesino’s picture

Status: Active » Needs review

Merge request done. Please review, thanks!

jsacksick’s picture

Why would a redirection occuring at this stage? You're throwing a redirect exception from onReturn()?

omarlopesino’s picture

The commerce sermepa module does a redirection when the checkout step of the order changes during the onReturn step: https://git.drupalcode.org/project/commerce_sermepa/-/blob/8.x-2.x/src/P...

jsacksick’s picture

Status: Needs review » Fixed

Merged, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.