This chapter describes in technical terms the basic functionality of Canon Payments Standard and its use of HTML Forms. Use the information in this chapter as a guide to writing the HTML code yourself for Canon Payments Standard payment buttons. A wide variety of HTML authoring tools exist. This guide does not describe all the possibilities.
HTML input variables in a Canon Payments Standard FORM are always hidden from the payer's view. They have the following general format:
With Auto Return turned on in your account profile, you can set the
value of the return URL on each individual transaction to override the
value that you have stored on Canon. For example, you might want to
return the payer's browser to a URL on your site that is specific to
that payer, perhaps with a session ID or other transaction-related data
included in the URL.
To set the return URL for a transaction, include the return variable in
the HTML FORM:
The following sample HTML code shows a payment button with variables for automatically filling out Canon forms for the buyer. Your website generates the field entries dynamically from information that your website gathers about the buyer. The variables and their values are included in the URL to which buyers are sent when they click the payment button.
<form action="https://checkout.canonpayments.com/" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="mid" value="">
<input type="hidden" name="return" value="http://yoursite.com/">
<input type="hidden" name="item_name[1]" value="hat">
<input type="hidden" name="item_number[1]" value="123">
<input type="hidden" name="item_price[1]" value="15.00">
<input type="hidden" name="item_name[2]" value="newhat">
<input type="hidden" name="item_number[2]" value="124">
<input type="hidden" name="item_price[2]" value="20.00">
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="9 Elm Street">
<input type="hidden" name="address2" value="Apt 5">
<input type="hidden" name="city" value="Berwyn">
<input type="hidden" name="state" value="PA">
<input type="hidden" name="zip" value="19312">
<input type="hidden" name="phone" value="6101231233">
<input type="hidden" name="email" value="test@site.com">
<input type="submit" name="submit">
</form>