This documentation is only for developers. If you are not a developer with good PHP coding skills then you have no need to read this.
It is very hard to troubleshoot another coder’s code. So if you use this documentation and do a custom integration yourself then please note that we cannot offer you any support in terms of what is wrong with your code. You will need to hire us to take a look at your code and correct any mistakes you made.
Overview
Integrating a 3rd party payment system or shopping cart with WP PDF Stamper is possible. The integration process can be accomplished in three steps, namely:
- Generate POST data
- Send POST data to the POST URL
- Process the returned data
POST Values
WP PDF Stamper expects a certain set of variables to be sent to it via HTTP POST. These variables are:
Mandatory Variables
- Secret Key: A Secret API key (you can find this value in the settings menu of this plugin)
- Source File URL: The URL of the source file that needs to be stamped (a copy of the source file will be stamped to keep the source file intact)
Optional Variables
- Customer Name: The name of the customer
- Customer Email: The email address of the customer
- Customer Address: The customer’s address
Return Value
Upon successful processing, WP PDF Stamper will return a plain text message that will have two lines similar to the following:
Success!
http://examle.com/wp-content/plugins/wp-pdf-stamper/stamped-files/test-ebook_4c05fffce4de3.pdf
or
Error!
Secret key is invalid
- The first line is an indication of success or error
- The second line is the result. In the event of success, it will contain the URL of the stamped file (this is a copy of the source file but stamped with the appropriate information)
Sample PHP Code
The following link has a sample PHP code that shows how easy it is to integrate with WP PDF Stamper.
Hi Admin,
my boss purchased this product and im his developer. We are selling ebooks, and we use this tool to stamp the pdf. My problem is when im using this PHP Integration then encrypting 3 files in a consecutive way, sometimes one of the file among 3 was not stamped successfully. Please help.
Hi Burt, If you are trying to stamp 3 large PDF files then please make sure that the PHP script execution timeout value is big enough to finish the job otherwise the server will kill the script before it completes. You can check the PHP script execution timeout value in the PHP.ini file of your server and modify the value as necessary.
Thank you admin. your reply will be a big help for our business. 🙂
I intend to buy PDF Stamper plugin and use it on my clickbank site. Is there any chances that a non-tech person (like me) to be able to integrate it with clickbank.
Will be possible some advice (if nedeed) from you in this regard?
Best regards,
Constantin
The issue with clickbank is that it doesn’t send the address back to the site after the transaction. It only sends the name and the email address of the customer so PDF stamper will be able to stamp those details only (customer name and email address)