1

I've to call a form after payment successful(before order success page) for Magento 2.2.4. (User will just fill this form & we'll just save corresponding to order-id).

So I'm using "sales_order_payment_pay" event here but it didn't work.

**I also tried some other payment events which didn't work. e.g- "sales_order_payment_place_start", "sales_order_payment_place_end".

But when I tried one of other event(to check if any event triggers or not) it works** but it doesn't fullfill my requirement.

To use event I created a separate module.

So please anybody let me know, why I'm not able to use some payment events?

Instead of the event is there any better way(except success page customization) which can fulfill my need?

  • Which payment method you are using? – Keyur Shah Jul 30 '18 at 8:24
  • Currently, i'm working on localhost so using only check/money order but on production site, we can use any payment method. – wakar Ahamad Jul 30 '18 at 8:34
  • how you can test payment successful event on check/money order? because it is offline payment method – Keyur Shah Jul 30 '18 at 9:13
  • No idea, according to our requirement but a user can also use offline payments.so could you please suggest which event should I use here? – wakar Ahamad Jul 30 '18 at 9:21
  • I was using app/code/Namespace/Modulename/etc/frontend/events.xml. later when i used app/code/Namespace/Modulename/etc/events.xml, instead of previous(means i removed frontend folder) then "sales_order_payment_place_start" and "sales_order_payment_place_end" both work but still "sales_order_payment_pay".please help! why is this not working? – wakar Ahamad Jul 30 '18 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.