3

DAP-Generated Paypal Button – FAQ/Troubleshooting

NOTE: If you wish to set up your Paypal IPN URL to be broadcast to multiple sites, you may also consider our IPN Redirect plugin from WickedCoolPlugins.com
_____________________________________________

Question 1A: How can I share one Paypal account with multiple DAP and non-DAP sites?

-OR-

Question 1B: If I use “DAP” generated buy-buttons, and I have to set up the “auto-return URL” in Paypal, which is limited to just one URL. How can I use that if I’m selling from multiple web sites and using the same Paypal account?

Answer: You can share same Paypal account between multiple DAP and other non-DAP sites if you use DAP-generated Paypal buttons or Paypal-hosted buttons or a combination of both.

If you use DAP generated Paypal buttons:

DAP sends button-level return value to Paypal.  By default, DAP sets the button level return to point to a DAP script on the site where you generated the button ( http://yoursite.com/dap/dap-thankyou.php ). Upon payment, the users are returned to that dap-thankyou.php.   And then the dap-thankyou.php script creates the membership account , auto-logs in users to their membership area and redirects users upon login to whatever you have in DAP product-level or DAP global-level login redirect. So the users automatically land at theDAP product-level or DAP global-level login redirectupon successful payment.

If you want the users to be redirected to a different URL upon login, then you can add a redirect tag to dap generated button code:

<input type=”hidden” name=”redirect” value=”http://yoursite.com/thankyou” />

The auto-return needs to be set and pointed to some URL – any URL – otherwise Paypal will not be able to automatically return users back to your website upon payment for non-paypal hosted buttons. DAP does not care what you set it to – but if you do set it, then make sure that all the Paypal buttons you use (DAP-generated or Paypal-hosted) have their own auto-return value.

If you use a DAP-generated Paypal button, you do not have to worry about the auto-return URL, because DAP will set it and send it to Paypal at a button level. But if you use Paypal-hosted buttons, then make sure you set the button level ‘return’ value.

If you do not set the button level return value, then the Paypal profile -> global level auto-return will get used. So if your global auto-return (under Paypal -> Profile -> Website Payment Preferences) is set to some URL on Site B and say you use a Paypal button to sell something on SITE A but that paypal button does not have a return value set, then upon purchase, the users will get returned to the URL on SITE B and that is probably not what you want.  so make sure you set the button level return value for paypal-hosted buttons.

Question 2:

I added DAP hosted buttons and did a test purchase.  After purchase the user was redirected to the login page and but the user was NOT automatically logged in. The login page states: SUCCESS! Thank you for completing the purchase. Please check your email for further details. Have I setup something incorrect?

Answer:

What do you see in DAP Payments/Coupons -> Orders page for this transaction ?

Hit the search button in the orders page and it will bring up all orders.
Is the payment status “Pending” or is it “Complete” ?

If it’s pending, it could be why the user is not getting logged in. Click on the transaction Id hyperlink for that order and it will take you to the transactions page… here you can see what Paypal sent in the transaction blob.

See if Paypal sent Payment Status = pending.  It yes, it can happen if the buyer didnot confirm their email in paypal.

But if payment status is complete, then do this.

Set DAP setup -> config -> log level to 5
Then go to dap system -> logs and Empty log content

Then rerun the paypal purchase and send us the log snippet.

Question 3:  Users are not getting auto-logged in.

I see these errors in the dap log.

>> 2011-03-29 10:54:02:dap-thankyou: after fopen
2011-03-29 10:54:02:dap-thankyou.php: paypal communication failed <<

Answer: In dap-thankyou.php script, dap uses fopen to connect to paypal to retrieve purchase details and to auto-login users.

If it is failing, then there is probably a fopen connection issue between your host and paypal.

Try this:

In dap config -> payment processing -> Set “Use CURL to connect to Paypal” to FOPEN.

If you set it to fopen, the the IPN script (dap-paypal.php) will use FOPEN to talk to Paypal also. Otherwise it will use CURL.

If the dap-paypal.php (backend ipn script) works, the user account will get created successfully in DAP but for auto-login to work, the front-end script (dap-thankyou.php) needs to work. But for front-end dap-thankyou.php script to work, FOPEN needs to work on your server/host.

So to test if FOPEN is working,  do this:

Set DAP setup -> config -> log level to 5
Then go to dap system -> logs and Empty log content

Make the backend IPN script also use FOPEN (by setting dap config -> “Use CURL to connect to Paypal” to FOPEN)

Now rerun purchase and see if you notice dap-paypal.php lines in there with fopen communication error in DAP Logs.

If yes, then the problem is that your host is preventing fopen communication with paypal.
If no, then open a ticket with us and we will look into it.

Question 4:  How do I replace the DAP generated PP button with my own image?

Look for this line in the button code:

<input type=”image” src=”http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif” border=”0″ name=”submit” alt=”Make payments with PayPal – its fast, free and secure!” />

Replace the “src” tag with the path to your own image file.

Ex – <input type=”image” src=”/dap/images/myimage,gif” border=”0″ name=”submit” alt=”Make payments with PayPal – its fast, free and secure!” />

Question 5: How to redirect Paypal buyers to a custom URL after purchase?

Answer:

If you’re using buy button form code, then you can add a redirect tag to dap generated buy button code:

<input type=”hidden” name=”redirect” value=”http://yoursite.com/thankyou” />

If you are using a buy button link, then add the text below at the end of your link.

&redirect=http://yoursite.com/thankyou/

Like this:

http://YourSite.com/dap/paypalCoupon.php?cmd=_xclick-subscriptions&item_number=10&currency_code=USD&redirect=http://yoursite.com/thankyou/

Or

http://YourSite.com/dap/paypalCoupon.php?cmd=_xclick-subscriptions&item_number=10&currency_code=USD&redirect=/thankyou/

Click Here to Leave a Comment Below 3 comments
Kit - July 21, 2011

I upgraded to the new system and now my order pages are redirected to my main wordpress with a page not found..

I have the DAP folder in my root.. and my order pages are URL.com/dap/buy.php

So the URL thinks that the /dap/buy.php is a wordpress page and redirects it to a page not found..

Anyone else have this problem?

Reply
Lindsay - September 7, 2011

I’m having a problem with the PayPal Terms when you click on the DAP-Generated PayPal Subscribe Button.

It says:
“$25.00 USD for the first 3 days
Then $25.00 USD for each 30 days”

But I want it to be $0 for the first 3 days and then $25 USD for each 30 days.

How do I fix the language? It appears to be set up with the right numbers through the DAP Admin panel.

Reply
Veena Prashanth - September 7, 2011

>> But I want it to be $0 for the first 3 days and then $25 USD for each 30 days. << In the DAP products page, set the trial price to 0.01. You cannot do $0 trial. See - http://www.digitalaccesspass.com/doc/payment-options-setup/

Reply

Leave a Reply: