THE LOOKUP FUNCTION
This function assumes that you are familiar with CGI scripting.
Related Links: Passback Function | Return Mode Function | Return Address | PGP Signature
Read the RESTRICTIONS below before using this function. As always, test your forms before making them live.
The Lookup Function allows you to request specific customer data from the processing server at the time an order is placed. All data requested using the Lookup Function is sent directly to the return address (ret_addr) specified in the intial order form. You may request as many of these as you'd like in one order form.
Fields that are available for use with this function are:
first_name
last_name
address
city
state
zip
country
phone
email
sfname
slname
saddr
scity
sstate
szip
sctry
authcode (Returns the credit card authorization code.)
cc_last_four (Returns the last four digits of the card number.
total (Returns the transaction total.)
test_mode (Returns "0" if your account is not in test mode or "1" if it is in test mode.)
when (Time/date stamp in format of 19991209004443.)
xid (Returns the transaction ID.)
CONSIDERATIONS
As with any other dynamic web page, your ret_addr (return address) must be a CGI script or some other application, such as CFM or ASP that is capable of parsing the name/value pairs that are passed.
Requested lookup fields that do not have a value will not be included in the information passed back.
While in test mode, an authcode lookup will return '000000' and an xid lookup will return '0'.
EXAMPLE
To use the Lookup Function, simply add the following HTML code to your order form with the appropriate field name. In the example below, the ret_addr field in the order form is:
"http://www.yourdomain.com/cgi-bin/return.cgi"
<INPUT type="hidden" name="lookup" value="authcode">
<INPUT type="hidden" name="lookup" value="email">
<INPUT type="hidden" name="lookup" value="total">
<INPUT type="hidden" name="lookup" value="xid">
<INPUT type="hidden" name="lookup" value="phone">
After a successful order has been completed, the customer is returned to the following URL. (Orders are always signed with a PGP Signature when either the LOOKUP or PASSBACK function is used.)
http://www.yourdomain.com/cgi-bin/return.cgi?authcode=852346&email=somename%40domain.com&total=29.95&xid=987654&phone=8015551212&signature=PGP SIGNATURE HERE
|