Product Upgrade Purchase

The following provides a guideline how to create a product upgrade page. For example, you offer a product that customers can upgrade the license later to add more modules or features. Besides the product purchase, you also need to create a product upgrade page that lists the available license upgrades – each with its PayPal payment button.

Creating Product Upgrade Page

Once you are familiar with how to create the PayPal payment button described the previous topic, creating a product upgrade page is exactly the same process. You would create a number of PayPal payment buttons, according to the license upgrades available for your product. Importantly, you must specify the Item ID that matches the EcommerceProdID2 field of the corresponding upgrade defined in the Upgrades table of the Activation Server.

 

In addition, the product upgrade page must allow the user to enter the Activation Key that they want to upgrade. In the HTML form, you must add a hidden field named custom to send the Activation Key value to the PayPal KeyGen. Below is the sample HTML code for the PayPal payment button for license upgrade.

 

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_blank">

    <input type="hidden" name="cmd" value="_s-xclick">

    <input type="hidden" name="hosted_button_id" value="XAFYWDFVA257Y">

    <input name="notify_url" type="hidden" value="https://demo.eleckey.net/paypal_keygen.aspx" />

    <input name="custom" type="hidden" value="<Script to get the Activation Key" />

    <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"></form>

    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

</form>

 

The URL for the product upgrade page should also be saved to the ProductUpgradeURL field in the Products table of the Activation Server. So you can reference to it when retrieving the product information from the server.

Creating Check License Page

A check license page is needed because you need to validate the Activation Key prior to allowing the user to proceed through the product upgrade payment. To create a check license page, you can write a script to call the GetProductStatus() method of the Activation Web Service. The method will return the account information including the purchased product. In addition, the return also includes the ProductUpgradeURL of the product upgrade page that you already created. Then, the check license page can display the available upgrades from the product upgrade page as an inline element.

PayPal Payment Upgrade Demo

You can learn more from the demo and try it out at the following URLs.

 

PayPal Payment Upgrade Demo Guide

http://demo.eleckey.net/paypal_upgrade_demo_guide.html

 

Product Upgrade Page

https://demo.eleckey.net/PayPal_Upgrade.aspx

 

Check License Page (under Upgrade section)

https://demo.eleckey.net/registration_activation.aspx

 

For more details, see the code-behind files below in the ElecKey folder:

 

\ACTIVATIONSERVER\SERVER\PAYPAL_UPGRADE.ASPX.CS

\ACTIVATIONSERVER\SERVER\REGISTRATION_ACTIVATION.ASPX.CS

 

note NOTE: The code-behind source code files are only available in the registered copy of ElecKey Internet, Enterprise, and Ultimate editions.

See Also

·         Configuring Activation Server for PayPal KeyGen

·         Order Confirmation Email Template

·         Testing PayPal KeyGen

·         PayPal Purchase Button

·         SMTP Configuration

·         Email Template