close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PayPal keeps returning to failure page

Thread began 10/26/2015 10:18 am by Dave W | Last modified 11/04/2015 4:17 pm by Ray Borduin | 1261 views | 18 replies |

Dave W

PayPal keeps returning to failure page

I am having a problem with eCart6 since making it live.
When an order is sent to PayPal it returns to checkout failure every time. I have tried several methods of payment (of which I know all have funds), without any luck.
The site worked fine when it was using my own server on my computer, but as soon as I uploaded it the problems started.
I have changed the return address in pp_confirm from the local host to the servername which I presume is correct as before I changed them they where returning to my local server address.
I have attached my pp_confirm page so you can make sure I have made the correct changes for redirect.
Any ideas?

UPDATE.
I have sorted it. It wasn't the pp_confirm page where the alterations were needed.
I did a site search for my local server name and found two occurances on the confirm.php page which I changed for the full URL of the site. I also changed the pp_confirm back to their original settings and all works well now.
It's a shame that I had to do a search to find them, couldn't there be an easier way to change this? I'm sure most people use a local server for testing and this needs to be set up when you first set up the cart. Would it be possible (in the future) for us to be able to change this when we call up the Cart Object or similar?

Sign in to reply to this post

joerg431091

Sorry for jumping on an older post but I am having the same issue.

After reading this post I also found the localhost reference in the confirm.php page and changed it. But this unfortunately did not do it for you. The paypal window opening still shows the checkout_failure.php page.

If I apply the checkout wizard again and test it on my local machine = it works. But as soon as it is uploaded to the live server the checkout_failure.php page appears.

Any new ideas on this one?

Thanks a lot,

Joerg

Sign in to reply to this post

Ray BorduinWebAssist

This can sometimes happen if you are browsing the the site with www. in front of the domain and then redirect back in the paypal code without it or vice-versa. The solution, if that is the problem, is to use .htaccess to force one way or the other and be consistent.

Sign in to reply to this post

joerg431091

Thanks Ray,

The site is actually forced using the .htaccess into the www at the moment. Is there a way to change the necessary paypal code to www?

I already changed the Return URL and CancelURL in the confirm.php page to www but that seems not to be the only problem.

$WA_PP_ECO_Set_params[0][$nextIndex] = "ReturnURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "https://www.tedescohound.com/pp_confirm.php";
$nextIndex = count($WA_PP_ECO_Set_params[0]);
$WA_PP_ECO_Set_params[0][$nextIndex] = "CancelURL";
$WA_PP_ECO_Set_params[1][$nextIndex] = "https://www.tedescohound.com/cart.php?ppcancel=1";

I will attach a copy of the confirm.php page just in case you might see something that does not look right.

Thanks again,

Joerg

Sign in to reply to this post

Ray BorduinWebAssist

That looks correct... what about the pp_confirm.php page... can I see a copy of that?

The next step is to add debug code to the failure page like:

<?php
var_dump($_SESSION);
die();
?>

That will give us more information about exactly where and why it is failing.

Sign in to reply to this post

joerg431091

Of course. I will attache a copy of the pp_confirm.php page.

I added the debug code and it's still live so you can also see yourself by checking out using Paypal at www.tedescohound.com. But I will also attach a text file with the error code for the checkout_failure.php page.

Thanks Ray.

Joerg

Sign in to reply to this post

Ray BorduinWebAssist

The issue is that it is trying to run the authorize.net checkout. I think you can fix the problem by moving the paypal code above the authorize.net code on the confirm.php page.

Just copy lines 225-309 and move them after line 52 instead

Sign in to reply to this post

joerg431091

Thanks Ray but this unfortunately did not do it.

I will attach a new copy of the confirm.php page as well as the new error message after moving the paypal code above the authorized.net code. Maybe you can spot something.

Thx.
Joerg

Sign in to reply to this post

Ray BorduinWebAssist

Try changing the trigger of the authorize.net server behavior on line 144 to:

if (!isset($_GET["plugin_file"]) && (!isset($_POST["payment-type"]) || $_POST["payment-type"]=="paypal")) {

That should make sure it doesn't run when the paypal code is supposed to.

Sign in to reply to this post

joerg431091

I did this - but it was actually line 55 of the paypal code as I moved the paypal code before the authorized.net code as suggested earlier.

This does not work unfortunately as changing the code refers the cart.php directly to the paypal checkout without even opening the checkout.php page.

I will attach a copy of the changed confirm.php page to this post but I have changed the code (line 55) back to the previous as I need to have the checkout page come up.

Any other thoughts?

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...