{"id":2012,"date":"2011-10-23T21:26:07","date_gmt":"2011-10-24T04:26:07","guid":{"rendered":"http:\/\/www.digitalaccesspass.com\/doc\/?p=2012"},"modified":"2014-03-01T22:34:01","modified_gmt":"2014-03-02T06:34:01","slug":"dap-integration-with-2checkout","status":"publish","type":"post","link":"http:\/\/digitalaccesspass.com\/doc\/dap-integration-with-2checkout\/","title":{"rendered":"DAP integration with 2Checkout"},"content":{"rendered":"<p>DAP now integrates with 2CO!<\/p>\n<p>To integrate DAP with your 2CO account, pls update the IPN in your 2CO account to point to http:\/\/<strong>yoursite.com<\/strong>\/dap\/dap-2co.php (replace <strong>yoursite.com<\/strong> with the name of your site) for the following events:<\/p>\n<p><strong>&#8211; Order Created<\/strong><br \/>\n<strong> &#8211; Fraud Status Changed<\/strong><br \/>\n<strong> &#8211; Recurring Installment Success<\/strong><br \/>\n<strong> &#8211; Recurring Installment Failed<\/strong><br \/>\n<strong> &#8211; Recurring Restarted<\/strong><\/p>\n<p><strong>NOTE:<\/strong> When you create products in 2CO to sell, make sure you create products by the EXACT same name in DAP otherwise the transaction will not be processed by DAP.<\/p>\n<p><a href=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2011\/10\/2co.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-2013\" style=\"border: 1px solid black;\" title=\"2co\" src=\"http:\/\/www.digitalaccesspass.com\/doc\/wp-content\/uploads\/2011\/10\/2co-1024x801.png\" alt=\"\" width=\"717\" height=\"561\" srcset=\"http:\/\/digitalaccesspass.com\/doc\/wp-content\/uploads\/2011\/10\/2co-1024x801.png 1024w, http:\/\/digitalaccesspass.com\/doc\/wp-content\/uploads\/2011\/10\/2co-300x234.png 300w, http:\/\/digitalaccesspass.com\/doc\/wp-content\/uploads\/2011\/10\/2co.png 1131w\" sizes=\"(max-width: 717px) 100vw, 717px\" \/><\/a><\/p>\n<p>Here&#8217;s how the script will work:<\/p>\n<p><strong>1) Order Created<\/strong><\/p>\n<p>DAP will create and activate the membership account at the time of purchase.<br \/>\nDAP will look for the message type of <strong>ORDER_CREATED a<\/strong>nd invoice_status of &#8220;<strong>approved<\/strong>&#8221; to automatically create the membership account. The user will receive the welcome email with full access to the purchased items (based on content drip settings in dap products page) upon purchase completion.<\/p>\n<p><strong>2) Fraud Status Changed<\/strong><\/p>\n<p>2CO approves or disapproves a purchase inmediately. If the purchase is approved, DAP will receive an &#8220;Order created&#8221; message via IPN from 2CO; if not, 2CO will not send any message. After that, 2CO has a &#8220;second tier&#8221; fraud check. Upon the completion of Fraud Check, 2CO will send out <strong>FRAUD_STATUS_CHANGED<\/strong> message. DAP will not take any action if <strong>fraud_status<\/strong> = <strong>&#8220;pass&#8221;<\/strong>. But if fraud_status in <strong>NOT<\/strong> &#8220;pass&#8221;, then dap will set the user&#8217;s product status in DAP to <strong>INACTIVE<\/strong>.\u00a0 So the user will not be able to access the DAP product any more.<\/p>\n<p><strong>3) Recurring Installment Success<\/strong><\/p>\n<p>Upon successful recurring payment notification from 2CO, DAP will simply extend the user&#8217;s access end date based on the &#8216;recurring cycle&#8217; setting in dap products page -&gt; Price\/Recurring tab for the product.<\/p>\n<p><strong>4) Recurring Installment Failed<\/strong><\/p>\n<p>DAP will reset the access end date to current date if recurring payment fails so user will not be able to access content past the failed date.<\/p>\n<p><strong>5) Recurring Restarted<\/strong><\/p>\n<p>DAP will start back from where the user last left off. The user&#8217;s access end date will be extended from whatever it was set to previously. The access end date is extended based on the recurring period settings in the dap products page -&gt; Price\/Recurring tab for the product.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DAP now integrates with 2CO! To integrate DAP with your 2CO account, pls update the IPN in your 2CO account to point to http:\/\/yoursite.com\/dap\/dap-2co.php (replace yoursite.com with the name of your site) for the following events: &#8211; Order Created &#8211; Fraud Status Changed &#8211; Recurring Installment Success &#8211; Recurring Installment Failed &#8211; Recurring Restarted NOTE: [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/2012"}],"collection":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/comments?post=2012"}],"version-history":[{"count":9,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/2012\/revisions"}],"predecessor-version":[{"id":2016,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/2012\/revisions\/2016"}],"wp:attachment":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/media?parent=2012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/categories?post=2012"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/tags?post=2012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}