I am building a custom payment module that will redirect to a payment gateway page and want to know that how the data is flowing in the magento 2 architecture and how to send the data to an external payment gateway in magento 2.
Solved! Go to Solution.
How to request an external web API:
\Magento\Framework\HTTP\ZendClient
\Magento\Framework\HTTP\Adapter\Curl
The plain \Zend_Http_Client
The plain curl_exec:
Just use Xdebug to trace a code execution flow.
Thanks for the Xdebug and also i want to send the order details to an external payment gateway please help me with that.
How to request an external web API:
\Magento\Framework\HTTP\ZendClient
\Magento\Framework\HTTP\Adapter\Curl
The plain \Zend_Http_Client
The plain curl_exec:
I am having a problem with the place order button, whenever i am pressing it, it's redirecting to itself and also there are some variables inside the url like ?form-key etc.
Thanks for the support it has been resolved but one last question.
When i am pressing place order button it is redirecting me to the cart.
Can you please provide details in simple way
Try to use capture payment action rather than authorize in config.xml file as following:
1- <can_capture>1</can_capture>
2- <payment_action>capture</payment_act