55

Paypal Hosted Buy Buttons

DAP can process Paypal payments using Paypal IPN (Instant Payment Notification).  All you need to basically do is to enable IPN within your Paypal account and create your Buy button with a few extra parameters. It’s all explained below.

So here’s what you need to do to process orders through Paypal using IPN, and have your buyers automatically added to DAP on your site.

1. Enable IPN within your Paypal account.

Follow this post to enable IPN first, and then come back here to this post.

2. Create your “Buy Now” or “Subscribe” or “Add to Cart” button

  • Log in to your Paypal account.
  • Click on Profile => Profile and Settings => My selling tools => Paypal Buttons => Update

 

  • Click on the “Create New Button”

On the Create New Button Page:

Step 1: Choose a button type and enter your payment details

1:  Choose any one of the following button types based on the type of product you wish to sell.
* Shopping Cart (for multiple-item purchases)
* Buy Now (for one-time products)
* Subscriptions (for subscription-based recurring products)

2: After selecting the button type, enter item name and price.

  • “Item Name”
    Make sure the Paypal “Item NameEXACTLY matches the “Product Name” that you created within DAP. In fact, login as DAP admin, edit the product, copy the text from the “Product Name” field, then paste this into your Paypal “Item Name” field, so that there are no typos. If the product names don’t match, DAP will ignore any IPN posts coming in from Paypal, which means no account will be created for your new member.

Step 3: Customize advanced features (optional)

  • just add a custom variable to the button as follows:

Under “Step 3: Customize advanced features (optional)” tab, within the “Advanced Variables” text box, enter the following (change the text YourSite.com below to your domain name).

notify_url=http://YourSite.com/dap/dap-paypal.php

(change the text YourSite.com to your domain name).

Save the button.

4. Copy the HTML code for this button

5. Publish the code on your web site’s sales page

..or WP page or post.

That’s it!

So when someone subscribes to, or purchases your product using this button, Paypal will send an IPN notification to your web site to the above link. DAP will then verify the product and payment status, and then will automatically add give the buyer/subscriber access to that product.

If the email id used in this purchase is not already associated with an account on your site, then DAP automatically creates a new account, and sends the buyer an “activation” email that requires them to click on a link to confirm and activate their account.

But If this email id belongs to someone who already has an account in DAP (existing buyer, purchased a different product this time), then DAP doesn’t create a new account for this user. It simply gives the existing account access to this new product.

So when the user logs in, they will see that they now have access to TWO products, with each product and the available URL’s listed separately.

Note: If you’re going to be using Paypal to process payments, then you don’t need to set up the Email Processing info in your DAP Admin > Config > Payment Processing screen. You don’t need to set up the DAP Email Order cron job either.

Click Here to Leave a Comment Below 55 comments
enlightenmental - December 30, 2009

Paypal has some new features:

– upgrading subscriptions (button)
– cancel subscriptions (button)

when the paypal button is created from paypal, while logged in, there are additional features.

will these features interact with the DAP IPN file?

i.e. will the cancel subscription button pause their account?

will the upgrade subscription option send IPN data and change the users product inside of DAP ?

thanks

Reply
Ravi Jayagopal - December 30, 2009

DAP has a very unique, pay-as-you-go model, where we deal with cancellations differently.

See http://www.digitalaccesspass.com/doc/cancellations-and-refunds/

– Ravi Jayagopal

Reply
Ravi Jayagopal - December 30, 2009

Basically, yes, when someone cancels their account, by default, they can no longer access any content on your membership site.

However, if you want those who cancel to be able to access “previously paid for content” (and of course, not any future content), then you can do that too with DAP, by changing a config option.

– Ravi Jayagopal

Reply
enlightenmental - December 30, 2009

ok.. thank you, so it sounds like if we create a “cancel subscription” button and the user cancels, the paypal IPN will send data back to DAP, and their DAP account will be cancelled/paused

sounds good, thank you

as far as upgrades are concerned, is the dap_paypal php file able to handle those request?

we need to allow users to upgrade from Free to Gold, or Gold to platinum… as easy as possible

paypal has a feature to do this, but will it sync with DAP?

(thank you for your patience Ravi)

Reply
Ravi Jayagopal - December 30, 2009

>>so it sounds like if we create a cancel subscription button and the user cancels, the paypal IPN will send data back to DAP<< No. DAP actually doesn't care about cancellations. It only cares about payments. So if no payments come in, then user's access automatically expires. So, the end result is the same, except we deal with it differently. This actually helps with another Unique DAP feature, where a membership is essentially put "On Hold", so if the user comes back months after they cancel, they can pick up from where *they* left off. >>as far as upgrades are concerned, is the dap_paypal php file able to handle those request?<< Not yet. Support for automatic Payapl "upgrades" is coming soon. - Ravi Jayagopal

Reply
Patrick - December 30, 2009

When setting this up within PayPal, do we need to select the button that says, “Have PayPal create user names and passwords for customers” or will DAP automatically handle this?

Reply
Ravi Jayagopal - December 30, 2009

Patrick,

No, don’t pick that option. It is DAP that creates the username (payer email) and password for the user.

– Ravi Jayagopal

Reply
Joseph - January 30, 2010

Should ‘IPN messages’ be set to (Receive IPN messages) or (Do not receive IPN messages)?

Reply
Ravi Jayagopal - January 31, 2010

Joseph,

>>Should ‘IPN messages be set to (Receive IPN messages) or (Do not receive IPN messages)?<< What screen on Paypal are you on where you are seeing this? - Ravi Jayagopal

Reply
Joseph - January 31, 2010

Right within the “Instant Payment Notification (IPN) settings”. It is directly below the “Notification URL” field. It is a radio select for “IPN messages”.

Reply
paul - January 31, 2010

ravi, i’m creating a pay button for a subscription in paypal, but it insists on having the price defined there

yet we are to put a price in the dap product, so does this mean if we change the price in dap, we need to alter the paypal button too?

some systems automatically pass the price set in the site admin, through to paypal.. am i missing something?

so which is the price, the dap one, or inside paypal button

or do both have to be set the same.. and how does one deal with trials, where there is more than one price involved

me confused!

Reply
Ravi Jayagopal - January 31, 2010

Joseph,

>>Should ‘IPN messages be set to (Receive IPN messages)<< Yes, enable that. - Ravi Jayagopal

Reply
Ravi Jayagopal - January 31, 2010

Paul,

The price field in DAP matters only if you’re using the Authorize.net or Paypal Payments Pro merchant accounts.

If you’re using Paypal standard, then only the price (both trial & recurring) that you set in Paypal matters – the DAP price doesn’t matter.

– Ravi Jayagopal

Reply
Julie - February 7, 2010

Ravi, do you have a write-up or tutorial for how to setup/use PayPal Payments Pro without the upsell options. I just upgraded from 3.5 to 3.6 and found where I enter my API keys, I just can’t figure out how the integration works.
Thanks

Reply
Ravi Jayagopal - February 7, 2010

Julie,

Have you purchased the Paypal IPN Pro script (which is Upsell Tree for Paypal Pro)?

If not, then you can ignore those fields, and use just regular paypal buttons. See:
http://www.digitalaccesspass.com/doc/setting-up-your-paypal-button-and-paypal-ipn/

– Ravi Jayagopal

Reply
Julie - February 8, 2010

No, I have not purchased the PayPal IPN Pro Script – I am still evaluating DAP overall – I’ve been waiting for the PayPal Pro functionality to be released.
So, you’re saying that I need to purchase the Upsell Tree for any of the PayPal Pro functionality? Mmmhhh.
What I am trying to determine is what the customer payment experience would be? E.g. do they have to have a PayPal account? what is the payment flow?
Is there anyway I can test that out before I buy DAP?

Reply
Ravi Jayagopal - February 8, 2010

Julie,

Customer doesn’t need Paypal account. They do need to have a credit card, however.

Payment flow will be:
1) Put special PPP (paypal payments pro) buy button (that DAP will provide you, from the Products page) on your sales page

2) Buyer clicks on buy button, goes to typical shopping cart page, where they see the entire form, asking for cc information, billing info, address, etc.

3) They fill it out and submit it. It connects via DAP to PPP. Then DAP does what it does best, to give user access to the product s/he just signed up for, sends out welcome email, etc.

That’s it.

Also, just fyi – I will be setting up a free trial of the Upsell Tree plugin. You can then try it out for yourself for $0.01.

Does that help?

– Ravi Jayagopal

Reply
Julie - February 8, 2010

Thank you – do you ever sleep or take time off? 🙂
That’s what I was hoping you would say – I assume then that the credit card information is stored within a profile on PayPal for subscription billing.
Thanks for the Upsell free trial option – I only have another week left in my DAP trial and was hoping to get this tested out before that ends, because setting up a Paypal account is not an option for our customers.

Reply
Ravi Jayagopal - February 8, 2010

Julie,

>>I assume then that the credit card information is stored within a profile on PayPal for subscription billing<< Yes, correct. DAP does not store any credit card information. I have updated the sales page to reflect the Free 30-day trial. See http://DigitalAccessPass.com/buynow.php#upselltree

Reply
Julie - February 9, 2010

OK – I must be the densest person on the planet. I’ve downloaded the PPP trial (thank you!) and got it configured for my sandbox site. I’ve processed a successful payment for a subscription.
Now I am wondering how the renewal will be billed to the customer? It seems that your using the DirectPayment method and not the RecurringPaymentsMethod – how will the renewal be processed?
I guess I could wait until the test subscription I’ve set up matures, but just thought I’d ask.
Also, how does the customer cancel their subscription?
My apologies in advance for my continued questions on this topic. Trying to be not too much of a pest 🙂

Reply
Fred - February 27, 2010

Hi Ravi,

I’m using PayPal Website Payments Pro. Am I correct in assuming that I need to set up recurring billing on the PayPal side (which I think is an extra fee they charge)?

Thanks,

Fred

Reply
Ravi Jayagopal - February 27, 2010

Julie,

>>Now I am wondering how the renewal will be billed to the customer? << When you set up your button within the DAP Products page, DAP already puts information in there that Paypal needs to create the "subscription" on Paypal's own site. >>Also, how does the customer cancel their subscription?<< Through their own Paypal account, or by sending you an email. - Ravi Jayagopal

Reply
Ravi Jayagopal - February 27, 2010

Fred,

>>Im using PayPal Website Payments Pro. Am I correct in assuming that I need to set up recurring billing on the PayPal side (which I think is an extra fee they charge)?<< To sell subscriptions using "PayPal Website Payments Pro", you do have to sign-up for their "Recurring Billing" module, and they do charge extra ever month for that. - Ravi Jayagopal

Reply
Kevin - March 1, 2010

Ravi,
So, if I use PayPal I don’t have to set up a cron at all?

Thank you.
Kevin Collins
CreateOurOwn.com

Reply
Ravi Jayagopal - March 2, 2010

Kevin,

You don’t have to set up the “Email Order Processing Cron” (dap-emailorder.php). You still need to set up the hourly cron (dap-cron.php) that sends out autoresponder and broadcast emails, etc.

– Ravi Jayagopal

Reply
Dave - March 10, 2010

Do we send the customer back to a certain page after the transaction?

Reply
Ravi Jayagopal - March 10, 2010

You don’t have to, but if you do, send them to a page on your site that says something to the effect of “your membership details are being sent to you in an email. Pls check your email within the next few minutes….”.

– Ravi Jayagopal

Reply
Jim - March 17, 2010

Ravi,

You said :

To sell subscriptions using PayPal Website Payments Pro, you do have to sign-up for their Recurring Billing module, and they do charge extra ever month for that.

We have a PPP site and right now we are using 1SC to handle the recurring billing since PPP does not do that. I do know or have seen anything regarding a Recurring Billing Module in Paypal. Can you point me in the right direction?

Thanks,

Jim

Reply
Ian - July 17, 2010

Hi Ravi – hope you’re getting back to normal a bit now you’re back in the US.

A question regarding paypal:

There’s an option with Website Payments Standard to create an Installment Plan payment (e.g. 3 payments of $97 monthly for 3 months).

it’s mid way between a one-off buy button and a subscription. It needs a minor upgrade to your plan which costs $10 per month – but paypal aren’t charging for it until 20111.

i’d like to use this option to give customers the possibility of paying for things in three easy instalments. But it seems it doesn’t work with DAP. I tried it, but the notification didn’t seem to work to create a new user so I had to do it manually.

Any plans to include this option in future?

Ian

Reply
John - August 14, 2010

Hi Ravi

I’ve set up the product in dap and paypal. I receive payments via paypal, dap confirms the payment and lists the payment within dap but doesn’t send out the user email or password….. I know it’s something I haven’t done?

john

Reply
Ray Lance - October 16, 2010

I was testing the PayPal refund, but apparently it is not handled by DAP. What should I have expected to happen? What manual steps should be taken for a refund?

Reply
Mark - November 2, 2010

If my PayPal button sits on a separate HTML sales page site outside of my DAP-enabled WP site, should IPN and notifications be set for the external site where the PayPal button resides or the DAP-enabled site where members will then be gaining access to their member materials?

Reply
Veena Prashanth - November 2, 2010

Mark,
Regardless of where the paypal button sits, to integrate the purchase with DAP, you need to set the IPN to point to the DAP-enabled site.

Reply
Payment Processing Via Email — DAP Documentation - November 8, 2010

[…] [For Paypal, DAP has a Paypal IPN Plugin] […]

Reply
Goran - December 19, 2010

Hi Ravi, Veena,
Do you have any advice of how to use IPN when I have more than one URL to where PayPal should send their messages? I mean when the same PayPal account is serving DAP on more than one site?
I suppose the “basic” URL in the IPN-set-up must be the same as the URL in the advanced settings for the Buy Now button? And in that case it rules out using IPN for more than one DAP-site?
Thanks,
Goran

Reply
Veena Prashanth - December 19, 2010

Yes, you CAN have one Paypal account to serve multiple DAP sites. Here’s how.

The basic/global IPN setting under Paypal Profile -> Instant Payment Notification Preferences, can point to any one of the DAP sites. It just needs to be set and needs to point to a valid URL.

The main thing is the button level IPN (under button advanced settings). The button level IPN needs to point to the right DAP site and the button item_name needs to match the product name in that DAP site.

For example, say you have 3 DAP sites (SITEA, SITEB and SITEC).

The Paypal Button(s) that you use to sell items off SITEA, needs to have the button level IPN pointing to SITEA (http://SITEA/dap/dap-paypal.php) and item_name matching one of the products that you sell out of SITEA.

The Paypal Button(s) that you use to sell items off SITEB, needs to have the button level IPN pointing to SITEB (http://SITEB/dap/dap-paypal.php) and item_name matching one of the products that you sell out of SITEB.

And the same deal with SITEC. The button level IPN for SITEC should point to SITEC (http://SITEC/dap/dap-paypal.php) and item_name matching one of the products that you sell out of SITEC.

The global IPN (under paypal profile) can point to any of the sites. It could be set to http://SITEA/dap/dap-paypal.php OR http://SITEB/dap/dap-paypal.php
OR http://SITEC/dap/dap-paypal.php.

The global IPN always needs to be set BUT it is ONLY used if the button level IPN is NOT set.

Reply
Simon - January 28, 2011

I have quite a few sites that have products on my Paypal account, 1 with DAP the rest without.
If I set the Global IPN to just that 1 site with DAP on it and do not set the button level IPN to anything for my other products on non DAP sites, does that mean that my DAP site will get notifications from all of my other transactions on non Dap sites?
If so does anyone know a way around this?

Reply
Veena Prashanth - January 30, 2011

>> If I set the Global IPN to just that 1 site with DAP on it and do not set the button level IPN to anything for my other products on non DAP sites, does that mean that my DAP site will get notifications from all of my other transactions on non Dap sites?
If so does anyone know a way around this? < < Yes, there is a way around it. Paypal requires that the global IPN be set and point to a valid script. We recommend that if you use DAP, then you set the global IPN to the same dap script (dap-paypal.php) as the button level IPN. BUT... you DO NOT have to set the global IPN to the dap script. You can point it to any valid php script on any of your sites. You can upload a file called paypal_global.php to the root of one of your sites with just this :

Then set the global IPN to point to this script on your site :

http://yoursite.com/paypal_global.php

Reply
Andy - April 3, 2011

Hiya, I’m trying to test the customer journey, I signed up via Paypal but had an issue with the return url (paypal error not DAP) but now when trying to purchase payment goes through but no user name or password is created even though I have deleted the previous user from the database. Payment shows as invalid in the ‘orders’ section but money was deducted?

Reply
Henry - November 14, 2011

I would like to use the dap generated button, but I have the impression that within dap you can not stop the automatic payment after a fixed amount of payments.

Is that correct? If so I have to use the paypal generated buttons, but lose the nice feature of redirecting new customers straight to their product, without having to wait for the confrimation email and inlog data.

I hope I am wrong and it is possible. Can you tell me how to do it or refer me to the right part in the help section that I missed?

If I am right I would like to suggest it as a new feature in the next update. (To be able to automatically stop the payments after a certain period.)

Thanks anyway and looking forward to your response.

Reply
Veena Prashanth - November 15, 2011

Henry,

>>I have the impression that within dap you can not stop the automatic payment after a fixed amount of payments. < < You can set the "recurring count" in the dap products page => price&recurring settings tab to limit the number of payments.

Thanks,
Veena

Reply
Henry - November 18, 2011

Thank you Veena,
I misinterpretated the recurring as having to put the price in there. You taught me to push the info buttons more regularly to be sure what I am actually doing when filling in a field.
Thanks for your help and problem solved!

Greetings Henry

Reply
Saba - July 31, 2012

Hi – I am trying to set up paypal buttons – when I try the dap generated buttons, or the paypal generated buttons after following all the steps, & I test the button, when I log into paypal, I get the message that the link I have used to enter the PayPal system is invalid. What could be the problem? Thanks!

Reply
Dwayne - November 19, 2012

OK, I found the IPN Redirect plugin and purchased it. That looks like it will solve the IPN issue if I can get it configured correctly. Thanks!

I beleive I will have to convert all 50 autoresponders from Mailchimp to DAP to make this work for me. A ton of work but if I can get this all working, well worth it!

Using paypal generated buttons…

I have created a product and can make a purchase (with my sons credentials) but once paypal accepts payment I do not get directed back to the website and logged in (also had this problem with DAP generated buttons so I tried the paypal generated). There is a link that says “Return to yourwebsite.com” and I have to manually click it to go to the automatic Paypal redirect page which then redirects to the website. Unfortunately, I then get sent to the wrong website; I assume because the wrong IPN is being passed even though I added notify_url=http://yoursite.com/routerurl2.php to the advanced variables section.

Suggestions?

Oh, using FOPEN

Reply
Veena Prashanth - December 8, 2012

>> OK, I found the IPN Redirect plugin and purchased it. That looks like it will solve the IPN issue if I can get it configured correctly. Thanks! < < Thanks for purchasing our ipnredirect plugin. >> There is a link that says “Return to yourwebsite.com” and I have to manually click it to go to the automatic Paypal redirect page which then redirects to the website. < < You have to enable auto return in your PayPal account, otherwise paypal will ignore the return field. Auto Return is turned off by default. To turn on Auto Return: Log in to your PayPal account. Under the paypal profile -> Selling Preferences column, click the Website Payment Preferences link.

Under Auto Return for Website Payments, click the on the radio button to enable Auto Return.

Edit the paypal hosted button and make sure to enter the URL to which you want your payers redirected after they complete their payments in the ‘return’ url field.

Now see if you get auto-returned.

>>http://yoursite.com/routerurl2.php < < If you have set the rules for routerurl2.php url in WP admin - > settings -> ipnredirect, and if you find the routerurl2.php script at the root of your site, then this is correct.

notify_url=http://yoursite.com/routerurl2.php

Reply
Dwayne - December 12, 2012

Ravi or Veena,

Can you please edit all my comments on this thread and remove “http://yoursite.com/routerurl2.php” from them?

It seems folks are copying and pasting or maybe bots are going there, but either way, I keep getting emails from DAP telling me Invalid IPN Coming In. In the body is: cmd=_notify-validate&redirectcomplete=y

I have done the copy paste thing myself and sure enough, it causes the error.

Thanks!
Dwayne

P.S. You guys are awesome! I love DAP!

Reply

Leave a Reply: