Entries Tagged 'Setup' ↓

Troubleshooting 1-Click Upsells

1) Problem: Getting an error that looks like this after purchase – using 1-Click Upsells.

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.

2) Question: How do I use my own button with the shopping cart script?

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”.

Troubleshooting Cron

The Problem

  • Your autoresponder or broadcast emails are not going out (hourly cron job dap-cron.php)
  • Your Affiliates aren’t being credited with sales (hourly cron job dap-cron.php)
  • Your 1SiteAutomation/1ShoppingCart Orders are not being processed. (10-minute cron job dap-emailorder.php)

The Solution

One possible solution is that your cron job(s) aren’t running correctly.

DAP has two cron jobs. One that runs once an hour (dap-cron.php), and one that runs every 10 minutes (dap-emailorder.php).

You can see how to set them up here.

But in this post, we will see how to make sure your cron is actually set up correctly, or if it’s running correctly.

How To Know If Cron Is Running

  1. Go to System > Logs and click on “Empty Logs”. That will fully clear out all logs.
  2. Go to Setup > Config > Basic and set “DAP Log Level” to “5″ and update row.
  3. Wait for the top of the hour for the hourly cron job to run. So if the time when you’re doing this, is say 11:20 AM, then wait for 12:00 Noon. If time is 3:45 PM, then wait for 4:00 PM.
  4. A few minutes past the top of the hour and go back to the System > Logs screen.
  5. If you see hundreds of lines of text in the logs, then that means your cron job is running correctly. If you only see maybe 10-20 lines of text, then your cron job is NOT running correctly, and you need to make sure the cron job is actually set up correctly.

Troubleshooting DAP/WordPress Sync

The problem:   DAP users are not being “sync”ed to WordPress.

Here’s how to troubleshoot.

What are your sync options in DAP Admin -> Setup -> Config  -> WordPress Related Section?

Do you allow all users to be sync’d or just paid users?
Do you allow users to be synced only when they pick a username?

If you allow all users to be sync’d and do not want to force your users to pick a username before dap syncs to WP, then use these settings:

Sync DAP User Data to WordPress “Y”
Sync Paid Users Only “N”
Sync Only if Username Exists in DAP “N”

To test:
1) Add a user manually to DAP via dap admin panel
2) Note down the user’s dap login id/password
3) Open a new browser where you are not logged in to DAP as admin
4) Now login to DAP again but this time as the user you created in step 1.
5) Now visit any part of your blog. DAP will now sync user to WP.
6) Login to WP admin panel. Click on Users in the left sidebar and see if the new user was created.

DAP Plugin Framework

How To Setup Notifications/Triggers From DAP to 3rd Party APIs

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.

GetResponse Integration

DAP integrates with GetResponse very easily.

How it works

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.

1) Retrieve the getresponse API Key from this URL:

http://www.getresponse.com/my_api_key.html

2) Then go to DAP products page, select the product and under the Notify Plugin section, add the following:

Notify Plugin upon User -> Product Activation (Add) =>
getresponse:<your API key>:<compaign_name>

For ex -

getresponse:89kjhjgjfhgf76ikghkgk:MYCOMP

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 shd first receive the confirmation email from getresponse and upon confirmation, the user shd get added to getresponse .

If it does not work, then set the dap log level to 5, go to dap system logs-> Empty log content, and rerun the test.
Then send us the log snippet from dap system -> logs.

    That’s it.

    Making Affiliate Payments

    DAP’s affiliate program works the same regardless of which DAP-supported payment processor or shopping cart you’re using.

    DAP does not directly make any affiliate payments. Instead, at the beginning of each month (or however often you wish to pay your affiliates), with one click on the Affiliates > Run Reports page, DAP will give you a list of all affiliates to whom payment is due, and the actual amount due to each one of them.

    The format of the payment list that DAP provides you with, is already “Paypal Mass-Pay Ready” – which means, you could simply upload the file that DAP gives you, upload it to your Paypal account, and then pay all affiliates in one click (details further below).

    Or if you don’t wish to pay by Paypal, and wish to use any other form of offline payment (like sending them a physical “check” in the mail, doing wire-transfers, etc), you’re free to use any external means for paying your affiliates. Once you have paid (by Paypal, or other external means), you just come back to DAP and mark all those affiliates as “Paid” – which is when DAP actually reports to all of those affiliates that a payment has been sent to them. Until the actual payment is made, they only see that they are owed a certain amount.

    How To Pay Your Affiliates

    1) Go to “Affiliates > Run Reports”
    2) Click on “View Due Payments as of mm-dd-yyyy”
    3) DAP will bring up a list of affiliates to be paid. Click on “Export affiliates for payment”
    4) DAP will create an export of only those affiliates. Only those affiliates can be paid now, as per DAP.
    5) You take the exported list that DAP gives you. Pay them however you choose to.
    6) Once you’ve actually paid them (or sent them the payment), come back to the same page, pick the previously exported list from “Mark affiliates from ……. as Paid” drop down (your last un-paid export will be shown in the drop-down list).
    7) Mark that export as “Paid”.

    Making Payments Via Paypal Mass-Pay

    1.Copy the export that DAP gives you and save it as text file on your desktop, with a file name like “February 2011 Commissions.txt

    2. Log in to your Paypal account

    3. Click on “Send Money”

    4. Click on”Make a Mass Payment”

    5. Upload previously saved text file on this next screen. You may also enter a custom subject and body for the email that Paypal will send to all those receiving a payment.

    6. Follow remaining instructions and hit “Send”.

    Recommended Refund Policy

    There really is no one-size-fits-all when it comes to refund policies.

    There are so many factors involved. The main one being, that Visa/Master/Amex/Paypal all give a buyer up to 60 days to ask for a refund, at least with most merchants.

    Unless you’ve already negotiated the refund terms with your merchant account provider, and have both specifically agreed that there would be no refunds (like say, if you were selling an expensive item, like a car, or a boat, or a service), or that it’s only going to be a 30-day refund period, then you really have no control over the refund period. You just have to comply with at least the mandatory 60-day refund period required by the credit card companies.

    So that brings us to the question:

    How much should you set your refund period to be within DAP?

    Now remember, it is this Refund Period setting (under Setup > Config > Advanced) that also makes affiliates eligible for payment.

    So it really comes down to the question:

    What is the waiting period for an affiliate to get paid for a referral?

    Our recommendation: 60 days.

    That’s because if you end up paying too soon (say like within 15 or 30 days), and then the buyer comes back and asks for a refund, now you’re out-of-pocket for the affiliate commissions that you have already paid on a purchase that you just refunded.

    Now remember that when you do the actual refund within DAP, DAP will roll-back any commissions credited towards this purchase. If you have not yet paid your affiliates, then in the next report, it will ignore the refunded purchase, and will not calculate commissions on that purchase.

    But if you have already paid your affiliates (like within 15 or 30 days after purchase), then DAP will include the negative commission in the next pay-period’s report. And any future commissions earned by this affiliate will be accordingly adjusted.

    However, if the affiliate doesn’t refer any more members, then you have two choices at this point:

    1) Ask the affiliate to pay back the over-paid commissions

    2) Just swallow the loss, write it up to the cost of doing business, and move on.

    Content Protection, Security and DRM

    We frequently get asked questions like…

    “Can DAP protect my Videos/PDF’s/Audio files from being copied? Is there some kind of tracking that I can build into my videos that will let me track the video on torrent sites?”

    “Can DAP prevent people from downloading my videos/audio/pdf and uploading it to a torrent or third-party site?”

    “Can DAP force people to only watch my videos online? I don’t want my members to download any of my content to their hard disk – I want to force them to see/read/hear/watch everything online.”

    Short Answer: No.

    Long Answer: Keep reading…

    The Nitty-Gritty

    There are so many ways to steal your content from your web site – no matter what technology you use.

    Let us explain what that means…

    1) Let’s say you implement a technology where only paying members can even get to your videos. Like you can already do with DAP. So then a paying member can download your video because they are already a paying member, and they actually have access to the videos. And once your video has been downloaded to their hard disk, you have lost all control over it – no matter what anyone tells you, that’s the truth. Because they can upload it to any illegal warez sharing site, and there’s nothing you can do about it.

    Of course, you could spend all your time, money and efforts monitoring the thousands of illegal sharing sites whether your video or ebook is found anywhere – assuming you can even find it in the first place, which would be like finding a needle in a hay stack – no, make that “hay factory” – wait, make that “finding a needle in New York City” – and then write to those site owners and ask them to take it down.

    Or you could focus on the 99% of legitimate members of your site, and create great content for them, and keep them paying month after month, and sell more products to them, and keep them happy.

    2) Let’s say you use a plugin that only allows true-streaming – like one based on Amazon CloudFront technology, that will not allow the users to directly download your videos, but force them to watch online only. Then there’s any number of “screen-capture” tools – even free ones – that your members can use to capture another video of your video, and then share it with their friends, or upload to illegal sharing sites.

    The list goes on and on. No matter how hard you make it, there’s always going to be a way around.

    So, unless you’re a NASA, NetFlix, or Amazon or Apple who has a real reason to protect their content that is worth real millions of dollars, there is *no technology* available today that will let you track a video or pdf *after* it has been downloaded. If someone is saying they can do this, then they’re outright lying to you, and playing on your fears.

    DAP already has a built-in password-sharing prevention security built in. If someone tries to share their account info with others, DAP will lock their account the moment their account gets log-ins from multiple IP’s (you can configure this setting) and deny further access to any of their content, until you investigate the user and “un-lock” their account.

    DAP already protects all of your media from illegal access.

    DAP also prevents your Amazon S3 videos and audio and other content from being accessed by anyone directly. Using a script like http://S3MediaVault.com , you can make it such that your videos and audio and other media can only be downloaded from approved sites (where the plugin is installed), and then on top of that, there’s DAP already sitting like a monster watch-dog, making sure only authorized users can even get into the site in the first place.

    So hope that helps if you’ve gotten too worried about protecting your content – so worried that you’re missing the big picture.

    Don’t Forget What Is Important (Hint: It starts with “Mem” and ends with “bers”)

    The best membership sites allow people to consume the content they’ve paid for in multiple ways – view the video, download the video, download mp3 audio version of the video, download the presentation as a powerpoint, download the transcripts as a PDF, and so on.

    Instead of making it easy for your members to download the content, if you’re going to spend your limited resources trying to figure out how to prevent people from downloading content that they’ve actually paid for, and force people to only view your content online and not be able to view it offline (like in their spare time or when going for a jog in the park), you run the risk of upsetting 99% of your legitimate paying members, in order to secure your content from the 1% of pirates, who will steal and share your content no matter what.

    So forget about the 1%, and focus on the 99%. DAP already has enough security in place to stop the 1%. So don’t worry about that. Your content is very secure with DAP.

    Anything else is just a total waste of your time. So don’t get distracted by the noise, and just get on with the real important tasks on hand: Building a long-term recurring income stream by building a large community of highly satisfied, loyal fans who are thrilled about what you have to offer, and will continue to pay month after month because whatever it is that you’re selling, is making their life better in some way.

    The hardest thing to do online, with a membership site is still this: Creating great content, Attracting buyers, and then getting your members to keep paying month after month.

    And that, is the big picture.

    Mailchimp Integration

    Subscriber Flow

    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.

    How it works

    1. Login to your account at http://admin.mailchimp.com/account/api/ and note down the API Key.

    Image 1:

    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.

    Image 2:

    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.

    How This Works

    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.

    df11c84ab4

    Multi-Tier Affiliate Program

    [WARNING: Paypal has a strict Acceptable Use Policy - especially for a product or service that could be considered "MLM" or "Pyramid". Make sure you're not violating their terms. Just to give you one example, requiring members to keep paying subscription fees in order to remain affiliates could be considered a Pyramid scheme. So if you want to run a 2-tier affiliate program, make sure you check with Paypal if you're planning to pay your affiliates via Paypal.]

    In a “1-Tier” affiliate program, when a buyer makes a purchase, the affiliate who referred the buyer is the only one who gets paid an affiliate commission. Which is why it’s called “1-tier”, because there’s only one level of commissions paid.

    However, in a “2-tier” affiliate program, the “Affiliate’s Affiliate” (2nd level) can also get paid a portion of the sale as a commission.

    So let’s take this example:

    You are selling Product A that costs $100.

    You’ve set up your commission structure for Product A as follows:

    Tier 1: 50% Per Sale

    Tier 2: 10% Per Sale

    Joe Customer is referred by Charlie to your web site. Joe went on to purchase Product A for which commissions are set up above.

    So Charlie (tier-1 affiliate) gets paid 50% of the sale - which is $50.

    Now, normally a 1-tier affiliate program would stop there, and that would be the end of affiliate commissions for that purchase. But you have set up 2 tiers.

    So now DAP looks at who referred Charlie, the affiliate. It finds that David originally referred Charlie to your web site (regardless of how Charlie got in to your membership site).

    So now David (tier-2 affiliate) gets paid 10% of the sale – which is $10.

    So for that one sale of $100, $50 was paid to Charlie, and $10 was paid to David, which totals $60.

    So $40 is your earnings, as the site owner.

    How To Set It Up

    The 2-tier or “n” tier setup is the exact same as the 1-tier setup.

    Only difference is, set up a new record on the “Affiliates > Set Commissions” page for each tier – one for Tier 1, one for Tier 2, and so on.