Hello,
I am looking at implementing automatic payment/activation using NBILL, PayPal and QLM (Quick Licensing Manager) Pro for a client of mine that develops/sells software.
I'm just trying to get a handle of the variables and the NBill program. I have limited knowledge of the QLM Pro, as I am leaving that up to the client.
The client has provided me with the following product info:
0:1 Rema Complete - single userI need assistance as to where I place the required variables.
Thanks,
QLM Instuctions**************************************************************************
Paypal
If you are using Paypal as an ecommerce provider, QLM integrates seamlessly with Paypal's ordering system.
In order to generate a license key for an order and send the key to a customer automatically at the time of purchase, QLM can be used in conjunction with PayPal's Instance Payment Notification (IPN). PayPal's IPN provides immediate notification when a customer purchases your product. PayPal's IPN calls a program that you define when payment of an order is completed. The program needs to validate the data, generate a license key and email the license key to the customer. QLM's method GetActivationKey is used to generate the license key.
In order to set up the IPN, you need to modify your PayPal account's Profile to enable Instant Payment Notification and specify the URL of the program discussed above. Alternatively, you can activate IPN by including the notify_url in your PayPal button HTML.
A sample project called QlmPaypalIPN is provided to demonstrate how to invoke QLM from PayPal's IPN. This sample posts back the information to PayPal, checks the status of the order and, if completed, generates a license key then emails the key to the customer. The sample uses by default PayPal's sandbox for testing purposes. This sample assumes that only one product is being purchased as opposed to multiple products in a shopping cart.
For detail instructions on Instant Payment Notification, please refer to PayPal's Order Management Integration Guide found on its website under the tab Merchant Services.
Generating a license key
To generate a license key, QLM's method GetActivationKey is used as follows:
string url = "
http://www.yourdomain.com/qlm/qlmservice.asmx/GetActivationKey?is_vendor=paypal&is_productid=" + productId + "&is_majorversion=" + major + "&is_minorversion=" + minor + "&is_qlmversion=4.0.00&is_features=0";
Where:
?? is_vendor = paypal
?? is_productid = your product id as defined in QLM
?? is_majorversion = your product's major version as defined in QLM
?? is minorversion = your product's minor version as defined in QLM
?? is_qlmversion = 4.0.00
?? is_features = semi comma separated list of feature sets and ther corresponding values. Example: is_features=0:3;1:0;2:7;3:25
?? is_user = username defined in the QlmProviders.xml (optional)
?? is_pwd = password defined in the QlmProviders.xml (optional)
Note that the QlmPaypalIpn sample provides the code required to invoke the GetActivationKey method (see QlmIpn.cs).
PayPal's IPN Variables
PayPal posts variables to the IPN program. Some of these variables are declared in your shopping cart or in your company's purchase page and others are sent by PayPal. For example, your purchase page defines your company by using the variable called "business". Similarly, PayPal uses the variable payer_email to identify the customer's email address.
The following IPN variables are required by the QlmPaypalIPN sample program
?? business - seller's PayPal account, must be changed to represent your PayPal account
?? custom - used by the sample program to store the major and minor version of the product being sold, must be changed to your product's major and minor versions defined by you in QLM
?? item_name - product's name, must be changed to be the name of your product
?? item_number - product's id, must be changed to represent your product id as defined in QLM
?? quantity - the number of licenses the customer purchased, set by your purchase page
?? amount - price of the product
The qlmpaypalipn.htm provides a sample of purchase page written in HTML.
The following code from this HTML page highlights the variables that are required by PayPal and the IPN program:
<input name="form_charset" type="hidden" value="windows-1252">
<input type="hidden" name='item_name' value='Product Name'/>
<input type="hidden" name='item_number' value='1'/>
<input type="hidden" name='quantity' value='1'/>
<input type="hidden" name='amount' value='99.99'/>
<input type="hidden" name='custom' value='1.1'/>
<input type='hidden' name='cmd' value='_xclick'/>
<input type='hidden' name='business' value='
account@yourdomain.com'/>
<input type='hidden' name='no_shipping' value='2'/>
<input type='hidden' name='cn' value="Where did you hear of us?"/>
<input type='hidden' name='no_note' value='0'/>
<input type='hidden' name='currency_code' value='USD'/>
<input type="hidden" name="return" value='
http://www.yourdomain.com/thankyou.htm'/> QLM saves the customer information, the order id and the license key(s). The following IPN Variables are saved in QLM's database:
?? txn_id
?? payer_email
?? last_name
?? first_name
?? payer_business_name
?? address_street
?? cust_address2
?? address_city
?? address_state
?? address_zip
?? address_country_code
?? cust_phone
?? cust_ip
?? memo
?? quantity
?? txn_type
?? receipt_id
Financial information such as the product amount, tax, order amount are not saved.
If your have a shopping cart with multiple items, the GetActivationKey web method must be called once for each product.