Home Integration Methods WebToPay

WebToPay

This integration method uses integration with WebToPay API. More info about this payment gateway can be found here:
https://www.webtopay.com/index.php?2595448377

The integration method is divided into two main sections:
1. Passing the visitor ID (cookie value) to the webtopay gateway
2. Reading the response from webtopay
1
Getting the cookie value
First thing is to get the cookie value, e.g. using standard PHP methods, or you can use our script that reads it from cookies:
writeCookieToCustomField
OR
writeCookieToLink
Based on the method you used, you can get the cookie value from GET or POST parameter.
2
Passing the visitor ID into the gateway
Now, when you have the value, you have to attach it to callbackurl, BEFORE using the function WebToPay::buildRequest($request)
E.g. if your callbackurl parameter was set like this:
$request['callbackurl'] = $request_url;
append the cookie value, sent in GET parameter like this:
This will send get parameter "papCookie" to the gateway. This is needed so we can use Post Affiliate Pro API when parsing response from webtopay... otherwise the sale would be unreferred.
3
Parsing the response
After calling the function WebToPay::checkResponse() in your callbackurl, in a place where you are sure everything is correct, you can call our API to register a commission.
Do not forget to set correct path to your PapApi.class.php file (in api/ directory of Post Affiliate Pro)
This is all you need to track a sale commission.
More info can be found here:
https://www.webtopay.com/index.php?683722975