Submit php form and redirect with backend

I want to integrate Payu Payment Gateway with my angularJS application. Server code is written in PHP (codeigniter).
I have been given a PHP set of payu, which consists of one php file with the form and php code. It sends data to the payu url, resulting in a successful transaction.

But I want the data to come from my angularJS form, and after combining the merchant key values ​​and the salt values ​​from the server side, the data should be sent to the payu URL.
I tried using curl, but the problem was that it does not redirect payu url.
Can someone explain how I can combine the data from my angularJS form and the private keys (they will use the data coming from the angular form to generate the private keys) and send it to the URL along with the redirect.

+4
source share
1 answer

You can send an ajax request to collect the key, and then put it on the form and submit. Thus, the user will be redirected to the payu page.

The message must come from a browser not from the server. cURL strictly refers to the server and cannot affect browser behavior.

0
source

Source: https://habr.com/ru/post/1610223/


All Articles