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 Name” EXACTLY 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).
(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.
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.