Starting version 4.1, DAP supports integration with Warrior Plus (WSO Pro Standard).
And starting version 4.3.1, DAP now also supports Warrior Plus’s new Adaptive Payments system (WSO Pro Adaptive).
DAP supports both WSO Pro Standard and WSO Pro Adaptive. The same dap script (/dap/dap-wsopro.php) supports both standard and adaptive payments. Only the version of the script that’s included in DAP v4.3.1 has support for WSO Pro Adaptive – older versions of the above script will NOT support WSO Adaptive, and will only support WSO Pro Standard.
If you are on DAP 4.1 or later, you will find a script called dap-wsopro.php in the dap folder.
Set the IPN (instant payment notification) url in your WSO Pro account, to point to the following URL:
http://yoursite.com/dap/dap-wsopro.php
(NOTE: replace yoursite.com with the name of your site).
Make sure product name in DAP exactly matches the product name in WSO Pro.
Also, make sure you have the “Welcome Email” Subject & Body configured in the DAP Product page with the right merge tags to send out user login/password.
When a user completes purchase of your WSO, WSOPro will send payment notification to DAP to the IPN URL specified above.
DAP will then automatically create the membership account, allow user access to the product and send out the thank-you email configured under the DAP product with the login details.
“Login Xpress” is a DAP feature that enables your members to be logged right into your membership site immediately upon completion of their purchase.
This is roughly how it works:
DAP supports this feature with the following payment processors:
If you use any of the payment options above, then you can set up your sales funnel in such a way that buyers are logged in right away immediately after purchase.
DAP integrates with the above processors via some kind of “back-end payment notification” – similar to Paypal’s “IPN” (Instant Payment Notification). Which means the notification between the payment processor and DAP on your site only happens on the “back-end”. Which is why DAP can only deliver the login details to the buyer via an email, and cannot log them in right away (like it can do with “Login Xpress”), because the buyer’s information is available to DAP only when the payment processor sends out the IPN notification behind-the-scenes, so to speak.
So if you’re using the above processors to accept online payments, then what you need to do, is to redirect your buyers to a static “Thank You” page that has a message similar to the one below…
“Thank you for your purchase. In a few minutes, please check your email address used during purchase for your log in details to log in to the members’ area and access the product you just purchased.”
And behind the scenes, DAP would’ve already received the payment notification from the payment processor, and it would’ve created an account for your buyer, given them access to the purchased product, and sent them the “Thank-you Email” for the product(s).
Warning: file_get_contents(/home/mysite/dap/upsell1.html) [function.file-get-contents]: failed to open stream: No such file or directory in /home/mysite/dap/continue.php(1) : eval()'d code on line 20
Solution: Create missing file.
Every buy button generated by DAP for Auth.net or Paypal Payments Pro, will look something like this…
<form name=”generate_authnet” method=”post” action=”https://www.DigitalAccessPass.com/dap/buy.php”>
<input type=”hidden” name=”item_name” value=”DAP Upsell Tree – Auth.net (T)”/>
<input type=”hidden” name=”description” value=”DAP Upsell Tree For Authorize.net” />
<input type=”hidden” name=”amount” value=”97.00″ />
<input type=”hidden” name=”trial_amount” value=”0.01″ />
<input type=”hidden” name=”total_occurrences” value=”1″ />
<input type=”hidden” name=”is_recurring” value=”Y” />
<input type=”hidden” name=”recurring_cycle_1″ value=”365″ />
<input type=”hidden” name=”recurring_cycle_2″ value=”365″ />
<input type=”hidden” name=”recurring_cycle_3″ value=”365″ />
<input type=”hidden” name=”payment_succ_page” value=”https://www.YourSite.com/dap/continue.php?url=/dap/upsell1.html” />
<input type=”hidden” name=”payment_gateway” value=”authnet” />
<input type=”hidden” name=”is_submitted” value=”Y” />
<input type=”submit” value=”Buy Now” />
</form>
If you see the line in bold above, you will see the field…
payment_succ_page
… pointing to the first upsell…
https://www.YourSite.com/dap/continue.php?url=/dap/upsell1.html
What this essentially means, is that once the payment for the front end order is complete, you want the contents of the page /dap/upsell.html to be presented as the first upsell.
So…
a) Either create an HTML page called upsell1.html in the dap folder.
b) Or change the name of the file in the buy-button form code above, to be whatever your actual file name is.
c) Or if you don’t wish to do any upsells, then put the URL of your final thank you page in that field’s value.
Look for this in the DAP generated button code:
input type=”submit” value=”Buy Now”
Replace it with your own image :
For example –
input type=”image” src=”/images/btn-order.png” value=”Buy Now”
If images folder is at the root of your site, set src = /images/btn-order.png. If it’s under dap folder, the src tag should be set to “/dap/images/btn-order.png”.
NOTE: If you wish to set up your Paypal IPN URL to be broadcast to multiple sites, you may also consider our IPN Redirect plugin from WickedCoolPlugins.com
_____________________________________________
-OR-
Question 1B: If I use “DAP” generated buy-buttons, and I have to set up the “auto-return URL” in Paypal, which is limited to just one URL. How can I use that if I’m selling from multiple web sites and using the same Paypal account?
Answer: You can share same Paypal account between multiple DAP and other non-DAP sites if you use DAP-generated Paypal buttons or Paypal-hosted buttons or a combination of both.
If you use DAP generated Paypal buttons:
DAP sends button-level return value to Paypal. By default, DAP sets the button level return to point to a DAP script on the site where you generated the button ( http://yoursite.com/dap/dap-thankyou.php ). Upon payment, the users are returned to that dap-thankyou.php. And then the dap-thankyou.php script creates the membership account , auto-logs in users to their membership area and redirects users upon login to whatever you have in DAP product-level or DAP global-level login redirect. So the users automatically land at the ‘DAP product-level or DAP global-level login redirect‘ upon successful payment.
If you want the users to be redirected to a different URL upon login, then you can add a redirect tag to dap generated button code:
<input type=”hidden” name=”redirect” value=”http://yoursite.com/thankyou” />
The auto-return needs to be set and pointed to some URL – any URL – otherwise Paypal will not be able to automatically return users back to your website upon payment for non-paypal hosted buttons. DAP does not care what you set it to – but if you do set it, then make sure that all the Paypal buttons you use (DAP-generated or Paypal-hosted) have their own auto-return value.
If you use a DAP-generated Paypal button, you do not have to worry about the auto-return URL, because DAP will set it and send it to Paypal at a button level. But if you use Paypal-hosted buttons, then make sure you set the button level ‘return’ value.
If you do not set the button level return value, then the Paypal profile -> global level auto-return will get used. So if your global auto-return (under Paypal -> Profile -> Website Payment Preferences) is set to some URL on Site B and say you use a Paypal button to sell something on SITE A but that paypal button does not have a return value set, then upon purchase, the users will get returned to the URL on SITE B and that is probably not what you want. so make sure you set the button level return value for paypal-hosted buttons.
I added DAP hosted buttons and did a test purchase. After purchase the user was redirected to the login page and but the user was NOT automatically logged in. The login page states: SUCCESS! Thank you for completing the purchase. Please check your email for further details. Have I setup something incorrect?
Answer:
What do you see in DAP Payments/Coupons -> Orders page for this transaction ?
Hit the search button in the orders page and it will bring up all orders.
Is the payment status “Pending” or is it “Complete” ?
If it’s pending, it could be why the user is not getting logged in. Click on the transaction Id hyperlink for that order and it will take you to the transactions page… here you can see what Paypal sent in the transaction blob.
See if Paypal sent Payment Status = pending. It yes, it can happen if the buyer didnot confirm their email in paypal.
But if payment status is complete, then do this.
Set DAP setup -> config -> log level to 5
Then go to dap system -> logs and Empty log content
Then rerun the paypal purchase and send us the log snippet.
I see these errors in the dap log.
>> 2011-03-29 10:54:02:dap-thankyou: after fopen
2011-03-29 10:54:02:dap-thankyou.php: paypal communication failed <<
Answer: In dap-thankyou.php script, dap uses fopen to connect to paypal to retrieve purchase details and to auto-login users.
If it is failing, then there is probably a fopen connection issue between your host and paypal.
Try this:
In dap config -> payment processing -> Set “Use CURL to connect to Paypal” to FOPEN.
If you set it to fopen, the the IPN script (dap-paypal.php) will use FOPEN to talk to Paypal also. Otherwise it will use CURL.
If the dap-paypal.php (backend ipn script) works, the user account will get created successfully in DAP but for auto-login to work, the front-end script (dap-thankyou.php) needs to work. But for front-end dap-thankyou.php script to work, FOPEN needs to work on your server/host.
So to test if FOPEN is working, do this:
Set DAP setup -> config -> log level to 5
Then go to dap system -> logs and Empty log content
Make the backend IPN script also use FOPEN (by setting dap config -> “Use CURL to connect to Paypal” to FOPEN)
Now rerun purchase and see if you notice dap-paypal.php lines in there with fopen communication error in DAP Logs.
If yes, then the problem is that your host is preventing fopen communication with paypal.
If no, then open a ticket with us and we will look into it.
Look for this line in the button code:
<input type=”image” src=”http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif” border=”0″ name=”submit” alt=”Make payments with PayPal – its fast, free and secure!” />
Replace the “src” tag with the path to your own image file.
Ex – <input type=”image” src=”/dap/images/myimage,gif” border=”0″ name=”submit” alt=”Make payments with PayPal – its fast, free and secure!” />
Answer:
If you’re using buy button form code, then you can add a redirect tag to dap generated buy button code:
<input type=”hidden” name=”redirect” value=”http://yoursite.com/thankyou” />
If you are using a buy button link, then add the text below at the end of your link.
&redirect=http://yoursite.com/thankyou/
Like this:
http://YourSite.com/dap/paypalCoupon.php?cmd=_xclick-subscriptions&item_number=10¤cy_code=USD&redirect=http://yoursite.com/thankyou/
Or
http://YourSite.com/dap/paypalCoupon.php?cmd=_xclick-subscriptions&item_number=10¤cy_code=USD&redirect=/thankyou/
We have now created a plugin framework that will allow DAP to trigger calls to 3rd party services when a user is added to a product (subscription/registration event) or when a user loses access to product (unsubscribe/unregister event).
In fact, we used the same framework to develop DAP -> Mailchimp integration in DAP 4.1.
Here’s the steps :
1) If you want DAP to trigger calls to the APIs/methods you wrote upon an addUserToProduct event or removeUserFromProduct event in DAP, then in the DAP products page – > notify plugin field, use the following format to integrate the APIs/class files. You can integrate multiple systems with DAP using this framework.
Say you want to integrate classname1 (that has the necessary APIs to register/unregister users to 3rd party service like Mailchimp ) and classname 2 (that has the necessary APIs to register/unregister users to another 3rd party service like GetResponse), then use this format in the notify plugins field above.
classname1:VALUE 1 you want to pass to the api: VALUE 2 you want to pass to the api: VALUE 3 you want to pass to the api
If you want DAP to call multiple APIs/ Classes, then just create a comma seperated list of classes that DAP should notify.
classname1:VALUE 1 you want to pass to the api: VALUE 2 you want to pass to the api: VALUE 3 you want to pass to the api,
classname2:VALUE 1 you want to pass to the api: VALUE 2 you want to pass to the api,
classname3:VALUE 1 you want to pass to the api
Whatever values (VALUE1, VALUE2.. ) you put next to the class name (all values should be “:” separated), DAP will forward those params/values to your APIs when a user is added to product or user is removed from product.
To integrate say classname1 which consists of the methods/apis to talk to your 3rd party services, create a folder called classname1 under /dap/plugins folder. Then under the classname1 folder, create a php script called classname1.class.php (just the way you notice a folder called mailchimp and under mailchimp a class file called mailchimp.class.php).
So you will have something like this:
/dap/plugins/classname1/classname1.class.php
Here’s what you need to have in classname1.class.php ( skleton class implementation ) :
< ?php
class classname1 {
function classname1() // constructor
{ }
//======== USER REGISTRATION===========
// this function is called by dap when a user is added to a product
function register($userId, $productId, $params) {
logToFile(“classname1.class.php: register(): “, LOG_INFO_DAP);
$dapuser = Dap_User::loadUserById($userId);
$email = trim($dapuser->getEmail());
$username = trim($dapuser->getUser_name());
$firstname = trim($dapuser->getFirst_name());
$lastname = trim($dapuser->getLast_name());
$data = explode(“:”,$params);
}
function unregister($userId, $productId, $params)
{
logToFile(“classname1.class.php: register(): “, LOG_INFO_DAP);
$dapuser = Dap_User::loadUserById($userId);
$email = trim($dapuser->getEmail());
$data = explode(“:”,$params);
}
}
?>
NOTE:
You MUST have same name methods (called register() and unregister() ) and the exact method signature as you see above.
You can call other methods/functions from register/unregister and/or
You can call 3rd party APIs from register/unregister methods and/or
You can include other class files.
Whatever values you pass (VALUE1, VALUE2 etc) via notify plugin, you can access those values in these methods. The values are available in the $params array.
That’s it.
You can add a test user to a product in DAP (via dap admin -> add users) and see if things work as expected.
DAP integrates with GetResponse very easily.
If you are on DAP 4.1, then DAP can connect with getresponse using the APIs provided by getresponse.
So when someone buys or signs up for that Product, then DAP will automatically notify your GetResponse list, and add the buyer or subscriber (if it’s a free sign-up) to your GetResponse list.
So basically, user gets added to DAP first, and then DAP adds them to GetResponse.
If you want the other flow (subscriber gets added to GR first, and then GR adds them to DAP, then see this GetResponse-to-DAP flow)
1) Retrieve the getresponse API Key from this URL:
http://www.getresponse.com/my_api_key.html
2) Then go to DAP > Products > Manage, select the product, go to “Notifications” tab, then in the Plugin Notification upon User “Add” field, add the following:
For example:
That’s it.
Now go to DAP admin -> add users page and add a brand new user / email and see what happens.
The added user should first receive the confirmation email from GetResponse, and upon confirmation, the user should get added to GetResponse.
If it does not work, then…
The flow of subscriber is “FROM DAP TO Mailchimp“. User signs up at DAP first, then DAP automatically adds the user to Mailchimp list.. Admin removes the user’s access to a product, and DAP automatically removes the user from Mailchimp list. This feature is available starting DAP v4.1.
1. Login to your account at http://admin.mailchimp.com/account/api/ and note down the API Key.
2. Go to http://admin.mailchimp.com/lists/ and grab your List’s Unique Id. Click the “settings” link for the list – the Unique Id is at the bottom of that page.
3. Log in to your DAP Admin Dashboard -> Products Page and select the product (whose members you wish to add automatically to your Mailchimp list.
4. If the list Id of the mailchimp list that you want to integrate with a DAP product/membership is say “ffffffffff”, and say your Mailchimp API Key is ‘ffffffffffffffffffffffffffffff-us2’ then add the following to the “Notify Plugin upon User -> Product Activation (Add)” in DAP products page and HIT Save/Update Product.
mailchimp:ffffffffffffffffffffffffffffff-us2:ffffffffff
Image 3:
That’s it!
Save the product and this completes the DAP->Mailchimp integration.
So let’s say you picked the list “ffffffffff” in your Mailchimp account, and the DAP Product “Example Subscription Product” (as shown in the screenshots above).
So once you add “mailchimp:ffffffffffffffffffffffffffffff-us2:ffffffffff” to the product’s “Notify plugin upon user->product activation” and “Notify plugin upon user->product de-activation” field and save it, every time someone gets access to the “Example Subscription Product” product (regardless of whether they buy it, or you give them access on the backend), DAP will automatically add them to the list – ffffffffff. And everytime you remove the user’s access to product (click on ‘Remove’ in DAP manage users page), DAP will automatically remove the user from the list.
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) 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 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.
That’s the big picture. Now for the specifics on how to integrate DAP & e-Junkie.
1) Create a product in DAP that you want to be able to sell via e-junkie
2) Create a product in e-junkie with exactly the same name as the DAP Product name, and create a buy button for it.
3) Go to the e-junkie Seller Admin > Edit Account Preferences > Common Notification URL field
Set it to point to…
http://yoursite.com/dap/dap-ejunkie.php
(replace yoursite.com with the name of your site)
4) Go back to DAP Setup -> config -> payment processing section.
Look for these config items:
Merchant’s Payment Gateway API Login ID
Merchant’s Payment Gateway Transaction Key
And set these to match your ejunkie merchant login Id and password. This is needed for security validation.
That’s it!
Go ahead and test your purchase and see if it makes it to DAP Payment/Coupons => Orders page and if the users get added.
Currently the integration between Infusionsoft and DAP is one-way. It’s from Infusionsoft=>DAP.
The good news is… in the upcoming release of DAP (4.6), we have completed 2-way integration with Infusionsoft. So you can do both DAP=>Infusionsoft as well as Infusionsoft=>DAP
1) Infusionsoft=>DAP – FREE Registration
When a user opts in to the Infusionsoft list, you can set up http post notification/action trigger in Infusionsoft to automatically add user to the DAP product.
See this document on how to setup this integration.
2) Infusionsoft=>DAP – PAID Registration
When a user makes a purchase via Infusionsoft Order Form or Shopping Cart, you can set up http post notification/action trigger in Infusionsoft to automatically add user to the DAP product.
See this document on how to setup this integration.
3) DAP=>Infusionsoft- FREE Registration
When a user opts in via the DAP FREE signup form, you can set up ‘plugin notification’ in DAP Products=>Notifications tab to automatically add users to an Infusionsoft compaign/group.
See this document on how to setup this integration.
4) DAP=>Infusionsoft – PAID Registration
When a user makes a purchase via say the DAP Shopping Cart or Paypal or Clickbank or any other DAP integrated payment processors, you can set up ‘plugin notification’ in DAP Products=>Notifications tab to automatically add users to an Infusionsoft compaign/group.
If you use Infusionsoft to sell or to get users to register to your list, the users will get added to DAP. But even if you sell products using other shopping carts/ payment processors (like Paypal, Clickbank etc), you can get those users to make it to Infusionsoft via DAP.
Paypal/CB/DAP Cart => DAP => Infusionsoft
See this document on how to setup this integration.