Jump to content

How to send a post method to an external API with cart data and receive the response?


Recommended Posts

Hello everyone! I am new to using prestashop, I am a junior developer who is in the process of learning.

Recently at work I was asked to develop a new payment method for our page, so I have been researching how to do it and so far I have knowledge about the structure of prestashop and how to program modules from the beginning. I need to send some cart information (cart total, product code and a unique ID) to an external API and receive back a unique URL depending on the client in order to redirect the client to that unique URL created.

I don't know where to start, the only thing I have so far is the implementation of the module code and it already appears as a payment method, the unique ID that I generate with a random function, but I don't know how to send that information or get the other information mentioned.

Thank you very much in advance to everyone who can help me :D.

Edited by Juan Casadiego (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...