We have to set up an Drupal 7 e-commerce site with Commerce module (Kickstart) that accepts payments via an off-site payment gateway. For which we are developing a commerce payment method that will accept payments from the payment gateway.

Now, We are stuck at this step where this page is shown to a user:

example.com/store/checkout/[transaction id]/review

After selecting the payment method (that we developed) on the above review page, the page redirects to the payment gateway site. The Payment gateway site, after a payment attempt, sends the payment status to a response page via POST method.

Now, we don't know where to 'catch' the post data sent by the payment gateway in the payment method module.

Also, after the POST data is processed, how to update the order/transaction status in the database and show success/failure message to the user.

Any help would be appreciated.

  • 2
    How are you trying to do it? Commented Feb 1, 2013 at 8:24
  • Were you able to solve this ?
    – astroanu
    Commented May 7, 2015 at 7:12

1 Answer 1


You can catch it wherever you want. It's up to you to define the menu item and ensure it gets communicated properly to the gateway. See Commerce PayPal for examples - it uses an IPN listener that is always accessible (even in maintenance mode) and dispatches it to the appropriate payment method for processing.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.