3

Payeezy powered by First Data is payment gateway like PayPal. And now I want to integrate in my website.

And I have thoroughly gone through

https://developer.payeezy.com/integration and

https://developer.payeezy.com/payeezy-api-reference/apis.

And thus I decided to go with payeezy.js rather than PHP API (I am a PHP guy) and started reading docs on here and here

For eg Consider a scenario (having installed Xampp in Windows)

I have stored files as sample.html C:\Xampp\htdocs\sample.html and action.php C:\Xampp\htdocs\action.php

In sample.html I put (another important file payeezy.js)

<html>
    ...
      <!--<form action="{call to merchant server}" method="post" id="payment-info-form" >-->
            <form action="action.php" method="post" id="payment-info-form" onsubmit="return validateFormOnSubmit(this);" >
    ...
            </form>
    ...
    <html>

Now up in the same file there is anonymous function in Javascript

...
    var responseHandler = function(status, response)
                {
...

I am getting status and response from API.

It says part of data goes to file on merchant server ie action.php and some not because they does not have 'name' attribute in their <input> tags (see sample.html file)

So when I click submit button I am redirected to action.php which is located at my (merchant) server, so the question is how can I get or print or process API response in action.php generated through sample.html

Gabriel Moretti
  • 676
  • 8
  • 23
Sohel Ahmed Mesaniya
  • 3,344
  • 1
  • 23
  • 29

1 Answers1

0

Thank you for using our solution and thank you for your question and interest in our services.

If I understand correctly your page is receiving the response just fine from the API call and you want to send that response to the PHP page on the third party server(your merchant).

If the above statement is correct, then you will need to write some JavaScript code in order to get the values that the response is giving you and send them over to the PHP page on the other server. Alternatively, you can write PHP on your local script to do exactly the same, but as long as you are getting a response, which you indicate you do, you will need to write your logic to send that response to the external server script.

  • What javascript code segment we have to use. That is my question and how can i do it? And if you need it to keet this little private here is my email add: sohelahmed@peerbits.com. thanks – Sohel Ahmed Mesaniya May 07 '15 at 10:24
  • Unfortunately we do not provide code within our solution for the implementation that you are trying to accomplished. You will need to write your own JavaScript or PHP code in order to take the response and pass it along to the third party server scripts. – Richard Ardila May 08 '15 at 12:26