Wednesday, March 23, 2011

AlertPay -Standard Integration Guide

Introduction
Standard Integration does not require a seller to have any web programming knowledge to get started — a simple understanding of HTML and web page creation is sufficient to make use of the Standard Integration button. All the items and subscription buttons created with this method are stored in your AlertPay account; you can view the code or edit the item/subscription directly from your own account.
Standard Button Creation
To create a Standard Integration button, use the Button Creation Tool in your AlertPay account. This tool will generate the HTML code for your button which you can place on your web page.
If you would like to create a Standard Integration button, please follow these instructions:
  1. Login to your AlertPay account.
  2. Click on "Business Tools".
  3. Under "Standard Integration", click on either "Manage Items" or "Manage Subscriptions".
  4. Click on "Add".
  5. Enter all required information.
  6. Click on "Finish".
  7. Copy and paste the generated code into your website.
All items/subscriptions created using the Button Creation Tool will be automatically stored in your AlertPay account.
Anatomy of an Standard Button Code
The HTML code for a Standard Button will only contain two parameters which are the following: ap_productid and ap_quantity. Here is a sample Standard "Buy Now" button:
<form method="post" action="https://www.alertpay.com/PayProcess.aspx">
    <input type="hidden" name="ap_productid" value="DxVnKkNK4eOgcBSeiJfiyA=="/>
    <input type="hidden" name="ap_quantity" value="1"/>

    <input type="image" src="https://www.alertpay.com/Images/BuyNow/pay_now_11.gif"/>
</form>
   
The sample code above transmits the parameters (shown in boldface) and their value to our checkout page using the POST method: https://www.alertpay.com/PayProcess.aspx.
The most important parameter is the ap_productid since it displays the details about the item/subscription/service on our checkout page. If there are any mistakes or typos in the product ID string, an error message will be displayed rather than a regular checkout page.
Managing Items or Subscriptions
Each button created with the Button Creation Tool will have a unique product ID and will be associated with an item or a subscription that is stored in your account. Since all the details for a product is stored in your AlertPay account, whenever you make any changes to its payment details, the changes made will automatically be reflected in the buttons that you previously put on a website. You do not have to upload the HTML code to your website again.
Editing an item will not change its product ID; therefore, AlertPay will always use the correct information for the proper item when the buyer reaches our checkout page.
If you would like to modify, delete or view the HTML code for one of your stored items, please follow these instructions:
  1. Login to your AlertPay account.
  2. Click on "Business Tools".
  3. Under "Standard Integration", click on either "Manage Items" or "Manage Subscriptions".
  4. Click on "Edit", "Code" or "Remove" for the respective product.
Using Form Pre-Filling
Since you can accept payments from people who do not have an AlertPay account, you can easily send information related to a buyer to the form on our checkout page. If you have already captured the necessary information before the customer clicks on the payment button, such as their name and address, you can pre-fill the fields on the checkout page by adding the following optional parameters to your Standard or Advanced buttons:
ap_fname
ap_lname
ap_contactemail
ap_contactphone
ap_addressline1
ap_addressline2
ap_city
ap_stateprovince
ap_zippostalcode
ap_country
You must generate the values for each field listed above from the captured information after the customer clicks on a payment button.
Here is an example of a Standard "Buy Now" button’s HTML code with optional form pre-filling parameters:
<form method="post" action="https://www.alertpay.com/PayProcess.aspx" >
    <input type="hidden" name="ap_productid" value="DxVnKkNK4eOgcBSeiJfiyA=="/>
    <input type="hidden" name="ap_quantity" value="1"/>
   
<input type="hidden" name="ap_fname" value="John" />
        <input type="hidden" name="ap_lname" value="Doe" />
        <input type="hidden" name="ap_contactemail" value="email@domain.com" />
        <input type="hidden" name="ap_contactphone" value="5555555555" />
        <input type="hidden" name="ap_addressline1" value="123 Test Street" />
        <input type="hidden" name="ap_addressline2" value="Apt #101" />
        <input type="hidden" name="ap_city" value="Montreal" />
        <input type="hidden" name="ap_stateprovince" value="QC" />
        <input type="hidden" name="ap_zippostalcode" value="H0H0H0" />
        <input type="hidden" name="ap_country" value="CAN" />   
       

    <input type="image" src="https://www.alertpay.com/Images/BuyNow/pay_now_11.gif"/>
</form>
   
   
The previous code will generate the following on our checkout page:
Please refer to the Form Pre-Fill parameters table for a complete description of each variable.
Multi-Item Button
The Multi-Item functionality is only available for Advanced Integration buttons. Please refer to the Advanced Integration and Multi-Item Button guides for more information. Further note that Advanced Integration is recommended for experienced developers and integrators only.
Standard Button Security & IPN
Since the payment details for a product is stored in your AlertPay account, your payment button has less risk of being compromised or tampered with by a malicious third-party — unless they have direct access to your AlertPay account. The HTML code for your button is therefore "safe" since the only value that is exposed is the product ID which must match exactly what is stored on your account. Invalid product ID will simply result in an error message being displayed on our checkout page.
Contrary to the Advanced Button which requires the implementation of an IPN handler, the Standard Button is not required to do the same. However, AlertPay will always send an email notification and an Instant Payment Notification (IPN) for payments made to you through your buttons. To learn more about using our Instant Payment Notification, please refer to our IPN Guide.

No comments:

Popular Posts