Hi there,
I need to interface a form to a payment gateway. The gateway works now with a very simple call to a "Pay Now" button and this is fine, but I want to discover the result of the transaction so that I can decide what to do next.
The payment Gateway supplier has an API, the description is here :
https://eway.io/api-v3/?shell#responsive-shared-page
In particular the API calls for some authentication and then a script which uses "cURL" and json.
This is very basic but if I can get this part to work I expect the remaining calls can be handled easily.
I can see how this would work, but what I am not sure of is how or where to insert this code in my form. Custom Code I guess, but just doing that doesn't do anything, and there is obviously something else I need to do.
Unfortunately I am not skilled with JSON coding and I suspect this is where I need help.
If anyone can point me in the right direction I would very much appreciate it.
Cheers
Tim
I need to interface a form to a payment gateway. The gateway works now with a very simple call to a "Pay Now" button and this is fine, but I want to discover the result of the transaction so that I can decide what to do next.
The payment Gateway supplier has an API, the description is here :
https://eway.io/api-v3/?shell#responsive-shared-page
In particular the API calls for some authentication and then a script which uses "cURL" and json.
curl --request POST \
--user 60CF3Ce97nRS1Z1Wp5m9kMmzHHEh8Rkuj31QCtVxjPWGYA9FymyqsK0Enm1P6mHJf0THbR:API-P4ss \
--header 'Content-Type: application/json' \
--data '{
"Payment": {
"TotalAmount": 100
},
"RedirectUrl": "http://www.eway.com.au",
"CancelUrl": "http://www.eway.com.au",
"Method": "ProcessPayment",
"TransactionType": "Purchase"
}' \
https://api.sandbox.ewaypayments.com/AccessCodesShared
This is very basic but if I can get this part to work I expect the remaining calls can be handled easily.
I can see how this would work, but what I am not sure of is how or where to insert this code in my form. Custom Code I guess, but just doing that doesn't do anything, and there is obviously something else I need to do.
Unfortunately I am not skilled with JSON coding and I suspect this is where I need help.
If anyone can point me in the right direction I would very much appreciate it.
Cheers
Tim