The WP PDF Stamper plugin can be integrated with a plain PayPal buy button so you can send a stamped copy of your eBook that you are selling after the customer makes a purchase.
To use a plain PayPal button with WP PDF Stamper you need two pieces of information:
For this integration you simply have to specify the URL of the eBook that you are selling in the “custom” field of the button and set the “notify_url” value to the IPN (Instant Payment Notification) handling script that comes with the plugin. The IPN handling script is stored in the “api” directory inside the “wp-pdf-stamper” plugin. The URL of this IPN handling script will be similar to the following when the plugin is uploaded to your server:
http://www.your-domain-name.com/wp-content/plugins/wp-pdf-stamper/api/ipn_handler.php
You need to specify the URL of this IPN handling script in your PayPal button’s code (you specify this URL in the “notify_url” field). For example:
<input name="notify_url" type="hidden" value="http://www.your-domain-name.com/wp-content/plugins/wp-pdf-stamper/api/ipn_handler.php" />
This basically tells PayPal to send the payment confirmation notification to this script so the sale can be processed (stamp the eBook and email it to the buyer).
There is one other piece of information that you need to include in the button which is the URL of the PDF eBook. This is the file that the plugin will make a copy of then stamp it with the customer details and send it via email. You can specify the URL of the PDF eBook in the “custom” field of the PayPal button. For example:
<input name="custom" type="hidden" value="http://www.your-domain-name.com/wp-content/uploads/2010/06/my-ebook.pdf" />
The following is an example button code that shows how the button code looks
If you are creating a PayPal hosted button for added security then you simply have to add the necessary information in the advanced variables section. When you create your button on PayPal from the “Merchant Services” menu, you will be able to specify some advanced variables in “Step 3″ of the button creation process.
You need to add the URL of the IPN handling script to the “notify_url” field and the URL of the eBook that you are selling to the “custom” field. First, prepare this information on a text file like the following:
notify_url=http://www.your-domain-name.com/wp-content/plugins/wp-pdf-stamper/api/ipn_handler.php
custom=http://www.your-domain-name.com/wp-content/uploads/2010/06/my-ebook.pdf
Once you are ready check the “add advanced variables” checkbox shown in the screenshot then copy and paste the above prepared text into the textarea.
After generating the button code, you can copy this code and paste it on the eBook selling page of your site. When someone makes a purchase using this button the WP PDF Stamper plugin will stamp a copy of the original eBook with the customer details and send it to him/her via email.
7 Responses
Leave a Reply
[...] Can be easily integrated with a plain PayPal “Buy” button. Read more here. [...]
If you use a plain button will the location of the raw pdf file (http://www.your-domain-name.com/wp-content/uploads/2010/06/my-ebook.pdf in your example above) not be visible and accessible for a person viewing the page source?
So would you need to use PayPal hosted buttons to avoid this problem?
Or is it not a problem?
@Anders, yes using a PayPal hosted button gives you more security as no one will be able to view the source and identify the raw URL. In some cases (depending on your target audience) it is okay to have the normal PayPal button as not everyone can view the source code and understand HTML code to find out the raw URL from there.
You can use both types of PayPal button (hosted or non-hosted) so use whichever one suits you better.
Hi,
i am very interested in the pdf-stamp plugin.
But i wonder if the plugin also sends the stamped ebook automatically to the customer after the purchase? via link?
Thank you
Jens
@Jens, yes the plugin will send an email to the customer with a link to the stamped copy of the PDF file.
Having some trouble integrating this. Even if I use the code supplied with the recommended chtnges nothing happens. just goes to PayPal, I make the payment but no file generated, no download link or even email from WP. Is there a better set of instructions for PayPal integration?
Hi, We just put up a set of videos on this that should help you with what you are looking to do:
http://www.tipsandtricks-hq.com/wp-pdf-stamper/wp-pdf-stamper-installation-and-usage-video-tutorials-155
I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.