THE PASSBACK FUNCTION
This function assumes
that you are familiar
with CGI scripting.
Related Links: Lookup Function | Return
Mode Function | Return Address | Recurring
Postback | PGP
Read the RESTRICTIONS below
before using this function. As always, test
your forms before making them live.
The Passback Function enables you to include
input variables in your order form that are passed
back to your return address after the transaction
is completed. This allows you to maintain user
session, offer real-time delivery of software,
access to member-only areas, etc. This function
also allows information for successful orders
to be written to an online database in realtime.
For example, you can pass an invoice number,
customer identification, PIN numbers, and more,
giving you complete control of the data received
after a transaction completes.
To use the PASSBACK FUNCTION, simply add the
passback fields to your order forms(s) as shown
in the examples below. (You may include as many
Passback variables as you would like.)
NOTE
You may select how these variables are returned to your return address
by using the Return Mode Function. They
will either be sent as part of the "query_string" or as name/value
pairs from an HTML POST.
RESTRICTIONS
Field names used for the Lookup
Function are reserved and may not be used
as Passback field names. However, the Passback
Function may be used to request the contents
of each description, cost, and quantity.
Your ret_addr (return address) must be a script
(such as Perl, PHP, ASP, CFM) that is capable
of accepting and parsing variables posted from
an HTML form.
EXAMPLE
In this example, the ret_addr
field in the order form was set to "http://www.yoursite.com/cgi-bin/return.cgi".
This example shows variables returned as part of the query_string.
<INPUT type="hidden" name="passback" value="fieldname1">
<INPUT type="hidden" name="fieldname1" value="12345">
<INPUT type="hidden" name="passback" value="ordernum">
<INPUT type="hidden" name="ordernum" value="order#999">
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 fuction is used.)
http://www.yoursite.com/cgi-bin/return.cgi?fieldname1=12345&ordernum=order#999&signature=PGP
SIGNATURE HERE
You can use as many PASSBACK variables
as necessary with whatever variable names
you'd like. The above example uses two variables.
They are named fieldname1 and ordernum.
Please note that each passback
field must contain a value. If the field contains
no
value, you will receive a "nonexistant passback
parameter" error.
If you would like to allow your customers to select a user name and password
for access into your site, the Passback Variables may look like the following:
<INPUT type="hidden" name="passback" value="username">
<INPUT type="text" name="username">
<INPUT type="hidden" name="passback" value="password">
<INPUT type="text" name="password">
If the customer's order is successful, the user name and password
will be passed back to you in the query_string.
**Please note that this example is not a secure method of allowing access
into your site. |