By Daniel Du
Are you selling web services on Autodesk Exchange? As described in previous blog post, to sell web services on Autodesk Exchange, publishers need to setup an IPN notification listener to handle the IPN notification when users buy and pay for the service. In previous blog post, we introduced how Autodesk exchange IPN listener works and how to create an IPN listener for one-time payment, now Autodesk Exchange supports monthly recurring subscription, it is time to move on. To support subscription term based payment, publisher must have PayPal account with Merchant, if you do not have one, please refer to PayPal to get one. When you publish a web service and specify the price, a new option is added, now you can sell your web services as subscription. To enable monthly subscription, you can select “monthly recurring subscription” as price type, and update your IPN listener to support term based subscription.
As we described, publisher will get IPN notification when user pays for the web service. For web services with subscription term based payment, when users firstly subscribe and pay for the web service, publisher will get two IPN notifications, one is for sign up of subscription, which contains the recurring period information. Here is an example:
txn_type=subscr_signup
&subscr_id=I-WM1L0JMPFNS0
&last_name=jennifer
&residence_country=US
&mc_currency=USD
&item_name=Autodesk+360
&business=exchange_seller%40autodesk.com
&amount3=2.00
&recurring=1
&verify_sign=AoPMvZRVuI9Omyn-GftY33o10lJgA.KjMD7AK.PhyRQzlYtIeh4NX.DM
&payer_status=verified&test_ipn=1
&payer_email=exchange_buyer%40autodesk.com
&first_name=liu
&receiver_email=exchange_seller%40autodesk.com
&payer_id=2QDKT9Z2Q9TLN
&reattempt=1
&item_number=appstore.exchange.autodesk.com%3Aautodesk360%3Aen
&subscr_date=23%3A59%3A15+Mar+11%2C+2014+PDT
&custom=2N9FMZW4CCED
&charset=windows-1252
¬ify_version=3.7
&period3=1+D
&mc_amount3=2.00
&ipn_track_id=57622697305cc
&buyer_adsk_account=buyer.name@buyercompany.com
Please pay attention to the parameters in bold, you will notice that it is a subscription signup notification, the subscription data and the period is one day.
Another one is payment notification, an example as below:
transaction_subject=Autodesk+360
&payment_date=23%3A59%3A16+Mar+11%2C+2014+PDT
&txn_type=subscr_payment
&subscr_id=I-WM1L0JMPFNS0
&last_name=jennifer&residence_country=US
&item_name=Autodesk+360
&payment_gross=2.00
&mc_currency=USD
&business=exchange_seller%40autodesk.com
&payment_type=instant
&protection_eligibility=Ineligible
&verify_sign=AiUKVjJuKpSwJW93U0WRzNikmlnSAZH-vjJiDg6uQnTAnq-55tq.vHaS
&payer_status=verified
&test_ipn=1
&payer_email=exchange_buyer%40autodesk.com
&txn_id=8N026616DN0752412
&receiver_email=exchange_seller%40autodesk.com
&first_name=liu
&payer_id=2QDKT9Z2Q9TLN
&receiver_id=J4E3KRMDRQB52
&item_number=appstore.exchange.autodesk.com%3Aautodesk360%3Aen
&payment_status=Completed
&payment_fee=0.36
&mc_fee=0.36
&mc_gross=2.00
&custom=2N9FMZW4CCED
&charset=windows-1252
¬ify_version=3.7
&ipn_track_id=57622697305cc
&buyer_adsk_account=buyer.name@buyercompany.com
From this notification, you can see it is a subscr_payment, and the payment is completed.
You can refer to https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/ to find the complete document about meaning of different parameters.
A reminder, please do not assume the order you receive the notification is subscription sign up followed by payment. Actually the order of these two IPN notification may be different due to internet latency.
Yepi - Pokemon Games - Play best free online Yepi at PokemonGames.be
Posted by: Cu Tới | 04/09/2015 at 08:18 PM