Organizational Research By

Surprising Reserch Topic

magento payment workflow and event order paid

magento payment workflow and event order paid  using -'magento,events,workflow,order,payment'

First of all, thanks for reading me.

For one of my Magento module I need to catch the event “any order is defined as paid”.
So I found that the associated event is sales_order_payment_pay. Ok seems to fit perfectly with my needs.

I’m a Magento dev, not a merchant and, for the moment, I’ve never put a Magento instance online and in production. So the payment workflow is quite dark to me. I used to select “Check/Money Order” as payment method during my tests.

The problem is : I need to catch this event (sales_order_payment_pay) but it seems I can’t trigger it and never enter in my observer function.
I have currently 2 payment method, check/money order and credit card.
For the first one, the merchant needs to validate the payment in the backend and I red it’s the moment when he creates the invoice. So I tried it but the event is never triggered.
For the second one, it’s more difficult : as I am in dev mode, I don’t know how to validate payment via credit card. I found a number for MasterCard online who allows tests in Magento, but in the back end, the total paid ammound is still equal to zero. So after order submission, no event triggered (seems quite logical) and when I create the invoice, still no event triggered.

Can you help me to understand a little more the payment process and to catch any order paid ? I can’t find any information or documentation about it.

PS : The aim of my module is to catch the event place order or payment paid and generate an XML file for data export. The first one with place order is already developed.

asked Oct 7, 2015 by rajeshujade
0 votes

Related Hot Questions

2 Answers

0 votes
answered Oct 7, 2015 by ukohale
0 votes
answered Oct 7, 2015 by amit.gupta