nBill Community nBill Home Page
18/May/2012, 10:27:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Click Here for the nBill home page, or take a tour.  
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: NBill, PayPal + QLM Pro  (Read 2836 times)
jukeboxjunkey
Jr. Member
**
Offline Offline

Posts: 6


View Profile
« on: 04/June/2009, 08:36:52 PM »

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 user

I 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.
Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,557


View Profile
« Reply #1 on: 05/June/2009, 09:00:53 AM »

I'm afraid you cannot use Paypal IPN with QLM because nBill hogs the IPN callback - and it is not possible to send an IPN callback to 2 different URLs for the same transaction. However, if you use the order_created event (and have 'pending until paid' set to 'yes'), nBill will take care of ensuring that the payment was successful, so you can go ahead and generate a license key immediately without needing IPN.

What you need then, is not a Paypal IPN callback URL, but a function you can call directly to generate the key. However, as it seems QLM is not written in PHP, it is unlikely you will be able to call a function directly. Unless QLM provides some other mechanism for generating a key by calling a URL (perhaps by passing through some kind of security hash), the only other workaround I can think of is perhaps to construct a spoof Paypal IPN callback from nBill (which should not be too difficult, as all the parameters that Paypal pass to nBill will still be available in the $_REQUEST object).
Logged
jukeboxjunkey
Jr. Member
**
Offline Offline

Posts: 6


View Profile
« Reply #2 on: 05/June/2009, 11:09:45 PM »

I think the spoof Paypal IPN callback from NBill is the way to go. Could I bother you to elaborate on how I'd accomplish this?
Logged
netshine
Administrator
Hero Member
*****
Offline Offline

Posts: 4,557


View Profile
« Reply #3 on: 06/June/2009, 08:42:08 AM »

Just take all the name/value pairs out of the $_REQUEST array, and re-submit them to the IPN URL for QLM (perhaps using CURL). Naturally, programming skills are required. I can't really elaborate further without doing the work for you.
Logged
jukeboxjunkey
Jr. Member
**
Offline Offline

Posts: 6


View Profile
« Reply #4 on: 13/July/2009, 03:50:08 AM »

I am looking for someone (paid project) to work on the issue discussed within this forum topic.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!