Lookup Function

This function assumes that you are familiar with CGI scripting.

Related Links: Passback Function | Return Mode Function | Return Address | Recurring Postback | PGP

Read the CONSIDERATIONS 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 a transaction is processed. All data requested using the Lookup Function is sent directly to the return address (ret_addr) specified in the order form. You may request as many of these as you’d like in one order form.

Using the Lookup Function, customer data may be posted directly to a script on your server and entered directly into your local database.

Fields that are available for use with this function are:

first_name
Returns the billing first name
last_name
Returns the billing last name
address
Returns the billing street address
city
Returns the billing city
state
Returns the billing city
zip
Returns the billing zip
country
Returns the billing country
phone
Returns the billing phone
email
Returns the billing email
sfname
Returns the shipping first name
slname
Returns the shipping last name
saddr
Returns the shipping street address
scity
Returns the shipping city
sstate
Returns the shipping state
szip
Returns the shipping zip
sctry
Returns the shipping country
authcode
Returns the credit card authorization code.
cc_last_four
Returns the last four digits of the card number.
ck_last_four
Returns the last four digits of the checking account number.
cc_name
Returns the name of the card type used. "Visa", for example.
total
Returns the transaction total.
authorized_amount
Returns the partial amount that was approved for a retail swiped/keyed transaction.
balance
Returns the available credit line amount of the giftcard/debit/prepaid if passed back from the processor.
entry_method
Returns either swipe or keyed.
batch_number
Returns the current credit card batch number.
test_mode
Returns "1" if your account is in test mode or "0" if it is not in test mode.
when
Time/date stamp in format of "20010509134443" – meaning 05/09/2001 at 13:44:43
xid
Returns the transaction ID.
avs_response
Returns the address verification response.
cvv2_response
Returns the CVV response.
confemail
Returns "1" if your account is set to send email confirmations to your customers or "0" if confirmations are not sent.
email_text, email_textx
Returns the values submitted in the email_text fields.)

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 ‘9999999999’.

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

Contact iTransact

Please do not hesitate to contact us with any questions.

iTransact
PO Box 999
314 South 200 West
Farmington UT 84025-0999
Phone: (801) 298-1212
Fax: (801) 298-9789