Today I just went around Magento 2 payment page. To know how the website will transfer order details from Magento 2 to payment Gateway page. But here I can see only the radio buttons and other stuff like text boxes, labels etc...

enter image description here

enter image description here

I know how the payment process will done functionally. And what are all the form tag contains like form tag, text boxes, form key,.. etc?

But how the website will transfer the order details to payment gateway?

looking for the brief answer?


If you want to know How Magento transfer data especially in your case(Paypal)

You can debug this class


In this class you will find execute method where magento sends data as request

And debugging this class you will know how magento passes data to paypal


that largely depends on your payment gateway and the protocol it enforces upon you.

In your example you are using paypal so data can move two ways to paypal and back from paypal to your site and

  • to paypal part: this is done on php level with remote requests to gateway and you get back a url or token to build a url to redirect your customer to
  • back from paypal: data is just posted to your site endpoint or requested with webrequest (like rates request)
  • Give a simple example with code?
    – Bojjaiah
    Oct 26 '17 at 10:28
  • open up paypal extenion codebase , all examples you can get are right there
    – Anton S
    Oct 27 '17 at 9:23

Your Answer

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

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