|
hp-payment3.cgi
All postings have to be done through CGI protocol ovel SSL to
https://www.strategicprofitsinc.com/cgi-bin/hp-payment3.cgi. POST method is preferred.
Script takes the set of name-value pairs specific to the transaction.
Script processes the transaction.
Script outputs the results in the format described below.
You would have to generate a receipt in a format as specified by the bank with this method.
Here is a sample receipt.
hp-payment3.cgi need the
following parameters to be passed through CGI protocol:
|
Variable name
|
Description
|
Possible values
|
Case-sensitive |
Mandatory
|
|
trans_type
|
Type of transaction. Preauthorization or sale.
|
PREAUTH
SALE
|
yes |
yes
|
|
order_number
|
Unique number identifying the transaction. Can be empty - in
this case cgi will generate order number as "epoch seconds".
|
|
no |
no
|
|
ccnumber
|
Credit card number.
|
|
no |
yes
|
|
ccname
|
Name of cardholder.
|
|
no |
yes
|
|
cccompany
|
Credit card Issuer.
|
|
no |
no
|
|
expmo
|
Expiration month. Two-digit number.
|
01 -- 12
|
no |
yes
|
|
expyr
|
Expiration year. Two-digit number.
|
00 -- 99
|
no |
yes
|
|
amount
|
Total amount to charge, including shipping and taxes.
|
|
no |
yes
|
|
storename
|
Your merchant storename.
|
One of two: "spi" followed by three-digit number or "monspi" followed by four-digit number.
|
yes |
yes
|
|
customer_email
|
Email address of customer.
|
|
no |
yes
|
|
customer_ip
|
The IP address of the customer.
|
|
no |
yes
|
|
mode
|
Transaction mode.
|
[empty] = equals to LIVE
LIVE = live mode
TEST_APPR = test approval
TEST_DECL = test decline
TEST_ERROR = test error
|
yes |
no
|
Output of the script basically is
a set of lines separated by newline character.
First line defines status of the transaction. Value of the first line can be one of the following: {error|declined|approved}.
Second line is always order number - passed to the script, or newly created one.
Third line is Payworks3 server transaction time, formatted as follows: "Thu Jan 25 23:59:59 2001" (without quotes).
The rest of the output can vary depending on result of transaction. In
case of error or declined transaction it will contain the actual
reason of the error which can consists of more than one line. In
case of approved transaction, you will get the following:
Fourth line: iso code
Fifth line: retrieval reference number
Sixth: authorization code
Seventh: response code
|