I would like to know the flow of calls to various methods in payment method
of magento. Like when do authorize()
, capture()
, refund()
etc. gets called? And what could be the possible scenario which may influence it (if any)?
magento-1.8,payment-methods – Understanding Method Call Flow in Magento 1.8 Payment Method
magento-1.8payment-methods
Best Answer
Almost all payment methods provide functionality to block and then to get the money from customer. Also you can return money back.
Usually workflow is like this:
authorize()
- money are blocked on customers account but still are there.capture()
- block money are transferred from customers to your accountrefund()
- amount is returned to customers account.Some payment methods you can configure to process
authorize()
andcapture()
during creating order at the same time.