Processing Gateway Cross Sales outside NATS

Article Topics: One Click Systems, Cross Sales, Billers

The Cross Sales feature of NATS is primarily used for setting up Cross Sales between multiple sites you have in NATS.

See How to Add and Delete a Cross Sale or Up Sale for a detailed guide on setting up Cross Sales from NATS to NATS.

If you want to send or receive Cross Sales from something besides NATS to NATS, please read the following instructions.

Receiving Cross Sale Data

To receive Cross Sales, you must enter the IP address of the server that is sending the Cross Sale into the $config['GATEWAY_ALLOWED_IPS'] configuration array in your NATS includes/config.php file.

For example:

$config['GATEWAY_ALLOWED_IPS'] = Array(
'0' => '111.111.111.111',
'1' => '222.222.222.222',
'2' => '333.333.333.333'
);

Each entry should be a single IP address -- ranges, masks, and globs are not supported. For multiple entries, place a comma between each entry.

Enable Process Gateway

You must also enable the $config['ALLOW_<biller>_PROCESS_GATEWAY'] configuration variable for each gateway biller you want to support. Replace biller with the gateway biller's shortname in all capital letters.

For example, to enable incoming Netbilling Cross Sales, add the following line to your includes/config.php file:

$config['ALLOW_NETBILLING_PROCESS_GATEWAY'] = 1;

Allow Members to be created with Biller Details

Additionally, you must set NATS to allow new members to be created by POSTs from billers to properly receive a cross sale. This setting will be turned off by default in your NATS install.

To enable the creation of new members by biller posts, navigate to the Configuration Admin and select the "Billers" tab. Search for the specific biller and locate the ALLOW_CREATE_NEW_MEMBER_XXX option, with "XXX" being the name of the biller in question. Select "Yes" and that biller will now be able to create new members in your database through POSTs.

Once you have completed the above steps, you will be able to receive gateway cross sales from outside NATS.

Sending Cross-Sale Data

You must send all of the following information to https://domain/signup/process_gateway.php using HTTPS POST.

  • xs_nats: the ref code from https://domain/internal.php?page=xsells. 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

Depending on the Merchant's Biller setup, the following fields may also be needed:

  • enddate_year (4 digit year, ex: 2011)

  • enddate_month (2 digit month, ex: 12 for December)

  • ip (the ip of the member, ex: 123.456.789.012)

  • address1

  • city

  • state (two letter code)

An example HTTPS POST:

https://example.com/signup/process_gateway.php
postxs_nats=refcode&postusername=example&postpassword=example...

You may optionally send any of the following information about the member by appending it to the HTTPS POST:

  • firstname

  • lastname

  • address1

  • address2

  • city

  • state

  • zip

  • country (2 Letter ISO code)

  • shipping_firstname

  • shipping_lastname

  • shipping_address1

  • shipping_address2

  • shipping_zip

  • shipping_city

  • shipping_country

  • shipping_state

Return Values

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 the new member's I.D. number. After a SALE DECLINED, the second line will describe the error. There are currently 17 possible error messages; the following two are most common:

  • UNSUPPORTED REQUEST

    • $config['ALLOW_biller_PROCESS_GATEWAY'] (see above) is either not setup or not setup correctly

  • NOT ALLOWED IP

    • The sending program's IP address is not in the $config['GATEWAY_ALLOWED_IPS'] configuration array

Last updated

Was this helpful?