Home - SoftLocker.net Client - SoftLocker ListBuilder - Tutorials - Support - Privacy - Affiliates
|Subject:||Integration: Paypal IPN (Intermediate)|
|Keywords:||Integration, Integrate, Paypal, IPN, Instant Payment Notification, subscriptions, subscribe|
| || |
|Article:||Generating registration codes for your customers using Paypal IPN is an easy and secure way to have registration codes delivered to your customers automatically after their purchase, and to disable registration codes automatically in the event of a chargeback, refund or cancellation.|
When we receive an IPN notification we immediately send it back to Paypal for verification. If paypal responds that the IPN is legitimate we act on it in the following way:
If the payment status is "Completed" we continue, otherwise we throw the IPN out.
If the transaction number is unique we contine, otherwise we throw the IPN out.
If the transaction type is web_accept, cart or express_checkout we create a registration code for the customer based on the payer_email and Txn_id values.
If the transaction type is adjustment we look for an existing registration code based on the Txn_id value and disable it.
Here is how it will work:
-The customers tries your demo
-They click your register button
-They visit your checkout page with your Paypal button
-They pay successfully
-They are automatically registered using the email address they paid with, and receive that information via email.
First you will need to gather the following information:
Your User ID: this numeric code is available under the heading "ID:" on your My Account page.
Your PIN: this four digit alphanumeric code is available under the heading "PIN:" on your My Account page.
The Product ID of the product you want to register: this is available from the SoftLocker Client in the Product area.
Log in to your paypal account.
Click the Merchant Services tab followed by the Buy Now or Add To Cart button.
Fill out the name, price and other relevant details for your product
Click the Step 3: Customize Advanced Features tab
Click Add advanced variables and enter the following information
(note: the notify_url for subscriptions is different than for subscriptions)
- custom=[User ID]|[Pin]|[Product ID], for example:
You're finished! Submit the form to create your button, then copy the generated code to your product's purchase URL. Now whenever a customer finishes checkout after using your Buy Now or Add To Cart they will automatically receive a registration code for their software. Additionally, if you cancel their order, issue a refund, or receive a chargeback their registration code will be disabled automatically.
If you would prefer to handle paypal IPN messages from your own server that is possible as well. See Integration: Your own server for more information.
© 2009-2010 SoftLocker.net