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.
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
WP PDF Stamper expects a certain set of variables to be sent to it via HTTP POST. These variables are:
- 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)
- Customer Name: The name of the customer
- Customer Email: The email address of the customer
- Customer Address: The customer’s address
Upon successful processing, WP PDF Stamper will return a plain text message that will have two lines similar to the following:
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.