NATS3 Process Gateway Cross Sales Outside NATS
For NATS version 22.214.171.124 and higher.
WARNING It is important to use POST requests only, using GET may cause sensitive data to be logged by your webserver.
If you want to send or receive cross-sells from one NATS program to another NATS program, please see the Cross Sells Admin article. If you want to send or receive cross sells from something besides NATS to NATS, please read the following instructions.
Receiving Cross-Sell Data
To receive cross-sells, you must enter the IP address of the server that is sending the cross-sale into the $config['PROCESS_GATEWAY_SECURE_IPS'] configuration array in your NATS includes/config.php file. For example:
$config['PROCESS_GATEWAY_SECURE_IPS'] = Array( '0' => '126.96.36.199', '1' => '188.8.131.52', '3' => '333.333.333.333' );
Incorrectly formatting this line will break your NATS. Each entry should be a single IP address -- ranges, masks, and globs are not supported. Place a comma between each entry.
Sending Cross-Sell Data
You must send all of the following information to http://domain/signup/process_gateway.php using a HTTP POST.
- xs_nats: the ref code from xsells.php. This identifies the affiliate sending the cross sale and the cross sale id used.
- username: the new member's username. If this username is not unique on the receiving site, a new random username will be generated.
- password: the new member's password.
- email: the new member's email.
- cc: the credit card number
- cvv: the Card Verification Value
An example HTTP POST:
If the recipient uses HTTPS, replace http with https.
You may optionally send any of the following information about the member by appending it to the HTTP POST:
After NATS processes the information you've sent, it returns two lines. (Note: the lines are sent as text; in your web-browser, they may appear as one line.) The first line is either SALE OK or SALE DECLINED. After a SALE OK, the second line will be blank. After a SALE DECLINED, the second line will describe the error. There are currently 19 possible error messages; the following two are most common:
- UNSUPPORTED REQUEST
- $config['PROCESS_GATEWAY_SECURE_IPS'] is either not setup or not setup correctly
- NOT ALLOWED IP
- The sending program's IP address is not in the $config['PROCESS_GATEWAY_SECURE_IPS'] configuration array