20

DAP IPN Script Generator – 3rd party Shopping Cart integration

While DAP already supports a large number of shopping cart systems and payment providers, if you wish to integrate DAP with one that we don’t support yet, then you can custom create DAP integration for any 3rd party shopping cart providers that support Instant Payment Notification (IPN) via HTTP POST to 3rd party scripts.

NOTE: While you’re welcome to use the documentation below and develop your own custom integration with any payment processor that supports IPN, during development if you need our support, then we charge an hourly fee if you want help with your code.

Instant Payment Notification (IPN)

Instant Payment Notification (IPN) is basically a message service provided by a shopping cart service or payment processor, that enables them to notify third-party systems like DAP about events related to Payment transactions. You can use it to automate membership sign-ups and cancellations, and extend membership access (for recurring products).

Paypal pioneered the concept of IPN, and different systems may have a different name for it (for eg., ClickBank calls it “INS – Instant Notification Service”). But they all essentially mean the same.

So, using IPN, the cart/processor notifies DAP when a payment-related event occurs. Typically, these events represent various kinds of payments. The notification includes info about the buyer’s email id, product name purchased, product price, payment status etc.

And you can use the DAP IPN Generator script below to generate a PHP script that can receive (and understand) the IPN notification from your cart/processor.

DAP – IPN Script Generator

DAP provides the ability to generate an IPN Script/handler for any 3rd party shopping cart that support IPN.  Once the script is generated, upload it to the dap folder on your site and update the shopping cart IPN URL settings with the URL to this script.

1) Go to DAP Admin > Setup > Generate IPN Script

2. Fill in the boxes with the exact TAG NAME / FIELD NAME that your shopping cart sends for each of the fields listed there.

Say that in the IPN notification, your shopping cart sends the product name in the tag/field called item_name. Then you need to enter item_name in the product name text box.

The transaction type indicator tells DAP what type of transaction it is… whether it’s an add-to-cart or buy now or subscription type of transaction. The tag name itself goes into the Transaction Type text box but the actual value for each type (buynow, cart, subscription) goes into the text boxes that say BUY NOW, Subscription, AddToCart.

In the text box in the picture above, the value of  ‘Sale’ is an example value that a shopping cart might send to identify a ‘buy now’ transaction/button. Check your shopping cart’s IPN documentation and make sure you fill in the right values in each of the text boxes in the dap generate ipn page.

3.  After filling up all the text boxes, hit the ‘Generate IPN’ button. It will open a small window with the actual dap IPN script.

Copy the whole script and put it in a file and lets say you call this file – dap-IPN-script.php.

Upload this file to the dap folder on your site.

4. Go back to Generate IPN Page in your DAP admin panel.

Now click on the ‘Test IPN Script’ button at the bottom. It will bring up a form where you can fill in actual values (you can give this form to your shopping cart provider so they know what fieldnames/tags to send to dap ipn handler/script). In the IPN URL text box, put in the full URL of the IPN Script you generated in step 3 (for ex – http://yoursite.com/dap/dap-IPN-script.php).

Run the test. It will simulate a real purchase transaction by a buyer and show you how DAP automatically manages the creation of membership account upon successful purchase.

Click Here to Leave a Comment Below 20 comments
Isabella - April 22, 2011

Hi Veena,
So does this need to be run for every single individual product?
Cheers,

Reply
Veena Prashanth - April 22, 2011

Hi Isabella,
No it does NOT need to be run for every single product.
Create the ipn script just once and upload it to your site, test it with your shopping cart / payment processor, make sure it works and you are all set.

Reply
Joe - April 24, 2011

Hi Veena,
Is the video for this completed yet? Where on the site should the script be posted?

Reply
Patricia Reszetylo - April 27, 2011

How do I find the info I need for the tag/field names for paypal?

Reply
Allan - August 30, 2011

Hello,

The PayGear affiliate program has the following fields,

IPN URL :
IPN Secret Code :

Are these sufficient to work with DAP? Will DAP function normally with these 2 pieces of information?

Thanks,
Allan

Reply
Veena Prashanth - August 30, 2011

Allan,

Yes, it should work.

You need to create the ipn script in dap to handle Paygear IPN notification. Then put the url of the script you created in Paygear under IPN URL.

Paygear probably sends out http post notification (with the user details) upon signup to the IPN script. As long as you have customized the dap ipn script to work with the paygear IPN parameters, it should work.

Reply
Adam - October 23, 2011

How does this work with integration of vbulletin? If the person purchasing the subscription already has an account, can DAP integrate so a new account won’t be created but a current account would be upgraded?

Reply
Veena Prashanth - October 25, 2011

You will have to import the existing VB users into DAP.

The communication is from DAP=>VB. It’s not from VB=>DAP.

Reply
Loret - February 19, 2012

Dear Veena/Ravi,

Quick question: My developer set up an IPN in my paypal account for DAP membership levels. BUT, I need to use the same PayPal account to also sell a DVD (separate from DAP members, etc – has its own paypal button). Paypal only allows one ipn. What part of the DAP IPN do I need a developer alter so that I can also send a different, unrelated IPN message to my DVD fulfillment house if someone wants to buy my DVD??

Please let me know…

Reply
Veena Prashanth - February 19, 2012

Hi Loret,

Paypal allows one global IPN but you can set button-level IPN and if the button level ipn is set, global IPN is ignored by Paypal. So you can use 1 paypal account to sell multiple products from different websites.

If you use dap generated button for paypal, dap automatically sets the button level ipn to point to current dap site (where the button was generated).

If you are selling DVDs outside of DAP but using a paypal hosted button, then you can set the notify_url in paypal advanced variables section (when you create the button) to point to whatever IPN url you want.

We just launched a IPN Redirect/Broadcast plugin also that can send a notification received by 1 IPN url to multiple destinations.

Checkout – http://wickedcoolplugins.com/

Thanks,
Veena

Reply
Jaime Monreal - February 23, 2012

will this setup work if i try to use foxy cart?

Reply
Veena Prashanth - February 24, 2012

Jamie,
If Foxy Cart supports IPN notification, then you can make it work. You will probably need to write some custom code to make it work. Unfortunately we don’t have much demand for foxy cart. It’s not something we can support at this point.

Reply
Yang - May 24, 2012

Hi, I am a customer of your company from china. because that most of the chinese don’t use paypal ,we need to integrate a Localized pay tool called alipay .

This Issues let me know how to finish a transaction ,

Dap_Transactions::setRecordStatus($record_id, 1); Dap_Transactions::processTransaction($record_id);

but how to start a transaction , Is there any opened function ? OR Should i write to db directly ?

Reply
Veena Prashanth - May 25, 2012

Yang,
When you generate the IPN script in dap, you will find the call to recordIPNIncoming() to record the transaction. You do not have to make any DB calls directly.

Reply
Bobby - June 8, 2012

The SWREG event notification system is missing some of the fields the script requires (particularly payment status & transaction type). Can you take a look at the specs and let me know what to put where?
You can find them here:
http://www.swreg.org/ens.htm

Thanks!
-Bobby

Reply
Veena Prashanth - June 8, 2012

Hi Bobby,

It will require custom changes to the dap script to make it work. Unless there is great demand for such an integration, it’s not something we can support as part of regular dap support.

We do support custom integration with payment processors / gateways that support IPN for $250.
You can contact us here for more details:

digitalaccesspass.com/support

Reply
Kenneth - July 9, 2012

Please show me how to integrate wp eStore shopping cart with DAP

Reply
JASON - January 8, 2013

I just launched a wso using wso pro for my order button system.

In their setup, there’s a place to put the IPN notification url for paypal, so I inserted this: http://jasonhornungagency.com/dap/dap-paypal.php

I just got back this message from a transaction saying an invalid IPN was received:

cmd=_notify-validate&RECEIVERBUSINESS=thejasonhornung%40yahoo.com&RECEIVEREMAIL=thejasonhornung%40yahoo.com&RECEIVERID=8CVZPLJW9XKKC&EMAIL=simplemixtapecreation%40gmail.com&PAYERID=HCNU5TJ6ENA9J&PAYERSTATUS=verified&COUNTRYCODE=US&BUSINESS=dynamic+holdings+llc&ADDRESSOWNER=PayPal&ADDRESSSTATUS=None&INVNUM=6383437.sale&SALESTAX=0.00&TIMESTAMP=2013-01-09T01%3A34%3A37Z&CORRELATIONID=d8e8860e4811&ACK=Success&VERSION=85.0&BUILD=4137385&FIRSTNAME=Matt&LASTNAME=Jersan&TRANSACTIONID=8L3414767K435205B&TRANSACTIONTYPE=cart&PAYMENTTYPE=instant&ORDERTIME=2013-01-09T01%3A34%3A33Z&AMT=7.00&FEEAMT=0.50&TAXAMT=0.00&SHIPPINGAMT=0.00&HANDLINGAMT=0.00&CURRENCYCODE=USD&PAYMENTSTATUS=Completed&PENDINGREASON=None&REASONCODE=None&PROTECTIONELIGIBILITY=Ineligible&PROTECTIONELIGIBILITYTYPE=None&L_NAME0=Marketing+Strategy+That+Makes+%24129.67+-+%24333.33+%28wso_b3jtny_6383437%29&L_QTY0=1&L_TAXAMT0=0.00&L_SHIPPINGAMT0=0.00&L_HANDLINGAMT0=0.00&L_CURRENCYCODE0=USD&L_AMT0=7.00&WP_ITEM_NAME=Marketing+Strategy+That+Makes+%24129.67+-+%24333.33&WP_ITEM_NUMBER=wso_b3jtny&WP_BUYER_NAME=Matt+Jersan&WP_BUYER_EMAIL=simplemixtapecreation%40gmail.com&WP_SALE_AMOUNT=7.00&WP_TXNID=8L3414767K435205B&WP_SALEID=3209385

Can I use the IPN script generator to populate a new script that will work with the data that is being passed from wso pro?

What should I place in the field boxes?

This is a bit above my knowledge base and I want to get this working right.

Thanks,

Jason

Reply
Veena Prashanth - January 10, 2013

>>Please show me how to integrate wp eStore shopping cart with DAP << Please see: http://www.digitalaccesspass.com/forums/threads/724-WP-EStore-integration-with-DAP

Reply
Veena Prashanth - January 10, 2013

Jason,
>>I just launched a wso using wso pro for my order button system. << Please do not use IPN generator for wsopro integration with dap. See this on WSO Pro integration: http://www.digitalaccesspass.com/doc/wso-pro-integration/

Reply

Leave a Reply: