{"id":553,"date":"2010-08-24T04:47:14","date_gmt":"2010-08-24T08:47:14","guid":{"rendered":"http:\/\/www.digitalaccesspass.com\/doc\/?p=553"},"modified":"2014-03-01T22:35:53","modified_gmt":"2014-03-02T06:35:53","slug":"troubleshooting-paypal-hosted-button-integration","status":"publish","type":"post","link":"http:\/\/digitalaccesspass.com\/doc\/troubleshooting-paypal-hosted-button-integration\/","title":{"rendered":"Troubleshooting Paypal Hosted Button Integration"},"content":{"rendered":"<p><strong>1) I got an e-mail with this subject:<br \/>\n[DAP] http:\/\/yoursite.com: dap-paypal: Invalid IPN Coming In<br \/>\n<\/strong><br \/>\nThis can happen if you click on this URL in a browser.<\/p>\n<p>http:\/\/yoursite.com\/dap\/dap-paypal.php (replace yoursite.com with the name of your site).<\/p>\n<p>This is a backend script and should not be called directly via browser. But if you click on this accidently, this error can be ignored.\u00a0 Just make sure that the DAP and Paypal are integrated and purchases via Paypal are getting registered in dap correctly.<\/p>\n<p><strong>2) DAP Paypal IPN Error (Rejected): IPN Product Name = does not match any DAP Product Name.<br \/>\nBut REJECTING MISMATCH it because of your Config settings (Product Mismatch)<\/strong><\/p>\n<p>Make sure that the item_name in Paypal button is set to eXactly match a DAP product name otherwise DAP cannot process the payment notifications. If the notification is for a product that you sell outside of DAP, then DAP will reject it with this error message and no action is needed.<\/p>\n<p>If you want DAP to process Paypal notifications even if the product name in DAP does not match the Paypal item_name, then enable this setting in DAP :<\/p>\n<p><strong>DAP Setup -&gt; Config -&gt; Payment Processing -&gt; Should DAP process Customer Emails even when the Product names don`t match -&gt; <\/strong><br \/>\nSet this to &#8220;<strong>Y<\/strong>&#8221; if you want DAP to process non-dap defined product purchase notification from Paypal.<\/p>\n<p><strong>3) Paypal failing with &#8220;Check Product and Price(Reprocessible)&#8221; in DAP Orders page <\/strong><\/p>\n<p><strong>Note: <\/strong>DAP Orders page moved under Payment\/Coupons menu in DAP 4.0<\/p>\n<p>This could be due to a problem with the CURL library on your site.<br \/>\nWith DAP 4.0, you can easily switch your site to use FOPEN instead of CURL.<\/p>\n<p><strong>DAP Setup -&gt; Config -&gt; Payment Processing -&gt; How DAP connects to Paypal -&gt; <\/strong>Select <strong>FOPEN<\/strong><\/p>\n<p><strong>4) Can I use my Paypal account to sell products outside of DAP even if the global IPN points to a DAP script?<br \/>\n<\/strong><br \/>\nSure. Paypal has 2 IPN settings:<\/p>\n<p><strong>a) Local button level IPN<\/strong><br \/>\nThis one needs to point to the DAP script (http:\/\/yoursite.com\/dap\/dap-paypal.php) on your site so for all sales via this button,<br \/>\nPaypal can send a notification to DAP.<\/p>\n<p><strong>b) Global IPN &#8211; under your Paypal profile -&gt; instant payment notification preferences<br \/>\n<\/strong>This one is used by Paypal ONLY if button level IPN is not set. If the button level IPN is set, then Paypal ignores the global IPN.<\/p>\n<p>We recommend that you set both button level and global IPN to point to the same dap script &#8211;<br \/>\nhttp:\/\/<strong>yoursite.com\/<\/strong>dap\/dap-paypal.php<br \/>\n(<strong>NOTE:<\/strong> replace <strong>yoursite.com<\/strong> with the name of your site)<\/p>\n<p>Now, if you are selling other products outside of DAP using Paypal and for those Paypal buttons, if there is no button level IPN notification defined, then Paypal will look at the global IPN setting (which also points to dap) and send notifications to dap. But dap will reject that message because the product is not defined in DAP.<br \/>\nThat is when you receive these &#8216;IPN rejected&#8217; messages and you can ignore them.<\/p>\n<p><strong>5) I have integrated DAP and Paypal per your documentation but it still does not work.<br \/>\n<\/strong><br \/>\nThree key things to watch out for when you integrate DAP and Paypal are:<br \/>\n<strong>a) <\/strong>Make sure that the Paypal button has the item_name set to exactly match a DAP product name\u00a0 otherwise DAP cannot process the payment notifications.<\/p>\n<p><strong>b) <\/strong>Button-level IPN must point to DAP script (http:\/\/<strong>yoursite.com<\/strong>\/dap\/dap-paypal.php &#8211; replace <strong>yoursite.com <\/strong>with the name of your site).<\/p>\n<p>In Paypal button creation page, under \u00c3\u00a2\u00e2\u201a\u00ac\u00c5\u201c<strong>Step 3: Customize advanced features (optional)<\/strong>\u00c3\u00a2\u00e2\u201a\u00ac\u00c2\u009d tab, within the <strong>\u00c3\u00a2\u00e2\u201a\u00ac\u00c5\u201cAdvanced Variables\u00c3\u00a2\u00e2\u201a\u00ac\u00c2\u009d<\/strong> text box,<br \/>\nenter the following (change the text <strong>yoursite.com <\/strong>below to your domain name).<\/p>\n<p><strong>notify_url=http:\/\/yoursite.com\/dap\/dap-paypal.php<\/strong><br \/>\n<strong>Note: <\/strong>replace <strong>yoursite.com <\/strong>with the name of your site<\/p>\n<p><strong>c)<\/strong> Global IPN must be enabled and pointed to the DAP script as descrbed in step 1 of this document.<br \/>\nhttp:\/\/www.digitalaccesspass.com\/doc\/setting-up-your-paypal-button-and-paypal-IPN\/<\/p>\n<p><strong>6) What config items in DAP are required if I use Paypal HOSTED button?<br \/>\n<\/strong><br \/>\nIf you want to use sandbox for testing, then<br \/>\n<strong>DAP Setup -&gt; Config -&gt; Payment Processing -&gt; Use Paypal Sanbox For Testing -&gt; Set to &#8220;Y&#8221;.<br \/>\n<\/strong><br \/>\nIf your site has trouble connecting to Paypal via CURL and you see this error in DAP orders page &#8211; Check Product and Price(Reprocessible), then update the config to use FOPEN.<\/p>\n<p><strong>DAP Setup -&gt; Config -&gt; Payment Processing -&gt; <\/strong><strong>How DAP connects to Paypal<\/strong><strong> &#8211;<\/strong>&gt; <strong>Set to &#8220;Y&#8221;.<\/strong><\/p>\n<p><strong>NOTE: <\/strong>In the DAP Products page, you <strong>ONLY <\/strong>need to set the <strong>Product Price, Trial Amount<\/strong> and <strong>Recurring Count<\/strong> if you use the <strong>DAP hosted\/generated buttons<\/strong> for Paypal.\u00a0 <strong>Not needed if you use Paypal hosted buttons. <\/strong>You can leave it empty if you use Paypal hosted buttons.\u00a0 Even if you populate it, it will not be used.<\/p>\n<p>If you use the Paypal hosted buttons, then you DO NOT need to set the following in DAP Setup -&gt; Config -&gt; Payment Processing -&gt;<\/p>\n<p><strong>Paypal API Username <\/strong>&#8211; Only needed if you use the DAP upsell tree plugins for Paypal Payments Pro or Paypal Standard.<br \/>\n<strong>Paypal API Password <\/strong>&#8211; Only needed if you use the DAP upsell tree plugins for Paypal Payments Pro or Paypal Standard.<br \/>\n<strong>Paypal API Signature<\/strong> &#8211; Only needed if you use the DAP upsell tree plugins for Paypal Payments Pro or Paypal Standard.<br \/>\n<strong>Paypal API Endpoint <\/strong>&#8211; Only needed if you use the DAP upsell tree plugins for Paypal Payments Pro or Paypal Standard.<\/p>\n<p><strong>Paypal Business Email ID <\/strong>&#8211; Only needed if you use the DAP generated button for Paypal (DAP Payments\/Coupons -&gt; Generate paypal button)<br \/>\n<strong><br \/>\nMerchant&#8217;s Payment Gateway API Login ID <\/strong>&#8211; Only needed if you use e-junkie or the DAP upsell tree plugin for Authorize.net<br \/>\n<strong>Merchant&#8217;s Payment Gateway Transaction Key<\/strong> &#8211; Only needed if you use e-junkie or the DAP upsell tree plugin for Authorize.net<br \/>\n==========================================================<\/p>\n<p>Please check all of the steps at the link below&#8230;<br \/>\n<a href=\"http:\/\/www.digitalaccesspass.com\/doc\/setting-up-your-paypal-button-and-paypal-ipn\/\">http:\/\/www.digitalaccesspass.com\/doc\/setting-up-your-paypal-button-and-paypal-ipn\/<\/a><\/p>\n<p>Especially check the &#8220;notify_url&#8221; part towards the end.<\/p>\n<p>If you are absolutely sure that you have followed all of the steps above, and DAP is still not creating an account for the new user, it is  possible that your host is not allowing your server and Paypal to  communicate correctly. You can confirm if this is an issue, by going to  the &#8220;Orders&#8221; page, searching for all orders, and see if your test purchase in  question has been recorded by DAP (even if DAP didn&#8217;t give access to the  user).<\/p>\n<p>If you find the order in DAP, but the user has not been created, then check with your host and make sure &#8220;fopen&#8221; or &#8220;curl&#8221; is enabled for your web site.<\/p>\n<p>If they say it is enabled, and it still doesn&#8217;t work, please do the following:<\/p>\n<p>1) Go to Setup &gt; Config &gt; Dap Log Level and set it to &#8220;5&#8221;.<\/p>\n<p>2) Completely delete test user from DAP<\/p>\n<p>3) Repeat test purchase<\/p>\n<p>3) Go to System &gt; Logs and copy\/paste the information there into a <a href=\"http:\/\/DigitalAccessPass.com\/support\/\" target=\"_blank\">support ticket<\/a><\/p>\n<p>4) And then please update the ticket with&#8230;<\/p>\n<p>* Domain name where DAP is installed<br \/>\n* FTP info<br \/>\n* DAP admin info<\/p>\n<p>And we&#8217;ll investigate this asap.<\/p>\n<p>5) Go to Setup &gt; Config &gt; Dap Log Level and set it back to &#8220;1&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1) I got an e-mail with this subject: [DAP] http:\/\/yoursite.com: dap-paypal: Invalid IPN Coming In This can happen if you click on this URL in a browser. http:\/\/yoursite.com\/dap\/dap-paypal.php (replace yoursite.com with the name of your site). This is a backend script and should not be called directly via browser. But if you click on this [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60,30,37,9,26,5,7],"tags":[],"_links":{"self":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/553"}],"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=553"}],"version-history":[{"count":18,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/553\/revisions"}],"predecessor-version":[{"id":4303,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/553\/revisions\/4303"}],"wp:attachment":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/media?parent=553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/categories?post=553"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/tags?post=553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}