It is possible to integrate a 3rd party software with the WP PDF Stamper using the HTTP GET method. All you need to do is construct the GET values then add it to the URL of the API and execute it.
WP PDF Stamper expects a certain set of variables to be sent to it via HTTP GET method. These variables are:
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 following is an example of name/value pair that can be used in a HTTP GET Request (each name/value pair is separated by an “&” character):
secret_key=4bc671656782.45045137&source_file=http://www.example.com/wp-content/uploads/my-ebook.pdf&customer_name=jon doe&customer_email=jon.doe@gmail.com&customer_address=123 Some Street, San Jose, CA - 95130, U.S.A
Once you have the GET name/value pair data ready you simply have to join it with the API/POST URL with a “?” character. The API/POST URL for your site can be found on the “Integration help” menu of the plugin. It will look similar to the following:
http://www.example.com/wp-content/plugins/wp-pdf-stamper/api/stamp_api.php
So the full URL should look similar to the following:
http://www.example.com/wp-content/plugins/wp-pdf-stamper/api/stamp_api.php?secret_key=4bc671656782.45045137&source_file=http://www.example.com/wp-content/uploads/my-ebook.pdf&customer_name=jon doe&customer_email=jon.doe@gmail.com&customer_address=123 Some Street, San Jose, CA - 95130, U.S.A
You should be able to paste the recently created URL in the browser’s address bar and test how it works.
Leave a Reply