{"id":10,"date":"2010-06-02T08:19:51","date_gmt":"2010-06-02T08:19:51","guid":{"rendered":"http:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/?p=10"},"modified":"2013-02-06T03:10:38","modified_gmt":"2013-02-06T03:10:38","slug":"third-3rd-party-integration-guide","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/third-3rd-party-integration-guide-10","title":{"rendered":"Third (3rd) Party Integration Guide (HTTP POST Method)"},"content":{"rendered":"<p><span style=\"color: #ff0000;\"><strong>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. <\/strong><\/span><\/p>\n<p><span style=\"color: #ff0000;\"><strong>It is very hard to troubleshoot another coder&#8217;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.<\/strong><\/span><\/p>\n<h3>Overview<\/h3>\n<p>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:<\/p>\n<ol>\n<li>Generate POST data<\/li>\n<li>Send POST data to the POST URL<\/li>\n<li>Process the returned data<\/li>\n<\/ol>\n<h3>POST Values<\/h3>\n<p>WP PDF Stamper expects a certain set of variables to be sent to it via HTTP POST. These variables are:<\/p>\n<p><strong>Mandatory Variables<\/strong><\/p>\n<ul>\n<li>Secret Key:\u00a0 A Secret API key (you can find this value in the settings menu of this plugin)<\/li>\n<li>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)<\/li>\n<\/ul>\n<p><strong>Optional Variables<\/strong><\/p>\n<ul>\n<li>Customer Name: The name of the customer<\/li>\n<li>Customer Email: The email address of the customer<\/li>\n<li>Customer Address: The customer\u2019s address<\/li>\n<\/ul>\n<h3>Return Value<\/h3>\n<p>Upon successful processing, WP PDF Stamper will return a plain text message that will have two lines similar to the following:<br \/>\n<code><br \/>\nSuccess!<br \/>\nhttp:\/\/examle.com\/wp-content\/plugins\/wp-pdf-stamper\/stamped-files\/test-ebook_4c05fffce4de3.pdf<br \/>\n<\/code><br \/>\nor<br \/>\n<code><br \/>\nError!<br \/>\nSecret key is invalid<br \/>\n<\/code><\/p>\n<ol>\n<li>The first line is an indication of success or error<\/li>\n<li>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)<\/li>\n<\/ol>\n<h3>Sample PHP Code<\/h3>\n<p>The following link has a sample PHP code that shows how easy it is to integrate with WP PDF Stamper.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-content\/uploads\/2010\/06\/pdf-stamper-integration-sample-php-code1.txt\" target=\"_blank\">Sample Integration PHP Code<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s code. So if you use this documentation and do a custom integration yourself then please note that we cannot offer you any [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[9],"tags":[27,6],"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/posts\/10"}],"collection":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/wp-pdf-stamper\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}