Using Commerce Kickstart 2.

A customer selects a Payment type at /checkout/123/payment Then he/she goes to Review /checkout/123/review

If the customer hits 'Go Back', the previous payment is still in the system. Obviously, what we want is to clear out the previous payment data connected to the order so that only one payment transaction is present for any given order at any given time.

I looked in Rules and there is a reaction rule called component_rules_payment_component_delete_all but what it seems to do is zero out previous payments not actually remove them, which seems wrong. We want to delete any payments until the last one when the order is completed.

So... where do I hook into (and what function do I call) to delete payment data for the current transaction id when the user hits the Go Back button?

  • It's not better to make payment step be after review? You won't have problems in this way. Commented Sep 30, 2017 at 20:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.