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

No Payment Gateway confirm order page problem

Thread began 1/04/2011 10:05 pm by nancy268153 | Last modified 1/05/2011 3:53 pm by Jason Byrnes | 1109 views | 9 replies |

nancy268153

No Payment Gateway checkout failure

Using Powerstore 3 and None for Payment Gateway. I intend to email or call for payment info at a later date / custom orders.
all works well until I hit the "Submit Order" button on the confirm.php page.

Here is what happens wrong:
1) the order being entered in the database but it is replacing the last test order. ie. there is still only 1 order in the database no matter how many test orders I try to do. the order in the database always matches the most recent test order
2) I do NOT get taken to the checkout_success.php page. it's just reloading the same "confirm.php" page.
3) the item(s) are still in the shopping cart.

how do I fix it?
thanks Nancy

Sign in to reply to this post

Jason ByrnesWebAssist

points 1 and 3 are a result of point 2. the cart gets cleared when you get to the success page. the order id also gets reset so the next order will create a new record.

most likely there is a php error occurring that is preventing the redirect to the success page.

add the following code at line one of the confirm page to turn error reporting on:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>
Sign in to reply to this post

nancy268153

thanks, I added the code to the very beginning (line 1) of the confirm.php and uploaded it. tried another order and got the same result.
Was this supposed to show the error on the confirm.php page on the site after trying to order? if so, it did not work.
confused???
Help

Sign in to reply to this post

Jason ByrnesWebAssist

If an error is occurring that code should show the error.

if it is not showing an error, there are 2 possibilities:
1) I was wrong initially, and the problem is not caused by a php error

2) the server is configured to not allow error reporting to be turned on using ini_set.


I'm going to assume it is possibility 1, wouldn't be the first time i guessed wrong, and it certainly wont be the last.

If it's not a php error, my next guess is that the server does not have the $_SERVER["HTTP_REFERER"] variable enabled.

try changing the following code at line 1091 - 1093:

php:
else if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))  {

  $WA_Store_Cart->redirStr = "checkout_success.php";
}



to:

php:
else if (isset($_POST["Submit_order"]))  {

  $WA_Store_Cart->redirStr = "checkout_success.php";
}
Sign in to reply to this post

nancy268153

sorry, still nothing.
I made another little change on the page to the heading just to be sure I was fixing the correct page and it was getting uploaded and it showed up. so, I know I am changing the right page and getting it up to the server with the changes but still nothing that we have tried yet has worked.
still with me? I hope. I appreciate your patience.
BTW, should I change back those things above that we have tried and did not work?

Sign in to reply to this post

Jason ByrnesWebAssist

create a new php page with the following code in it:
<?php phpinfo(); ?>

upload it to the server and send a link.

Also send a copy of your confirm page so I can look at the code.

Sign in to reply to this post

nancy268153

OK, wow, thanks for staying with me. so good to get this done all at once.
here is the new test page URL:
test.php

I am also attaching a copy of confirm.php with the changes that you have suggested intact.

Attached Files
confirm.zip
Sign in to reply to this post

Jason ByrnesWebAssist

ok, try changing line 1238 - 1244:

php:
<?php

// WA eCart Redirect
if ($WA_Store_Cart->redirStr != "")     {
    unset(
$_SESSION['randomConfirm']);
  
header("Location: ".$WA_Store_Cart->redirStr);
}
?>




to:

php:
<?php if($GLOBALS['WAGLOBAL_Gateway'] == && isset($_POST["Submit_order"]))  {

  
$WA_Store_Cart->redirStr "checkout_success.php"
}
?>
<?php
// WA eCart Redirect
if ($WA_Store_Cart->redirStr != "")     {
    unset(
$_SESSION['randomConfirm']);
  
header("Location: ".$WA_Store_Cart->redirStr);
}
?>
Sign in to reply to this post

nancy268153

well thank you :) that has it working as far as I can see.

should I leave the other/previous changes or switch them back?

hooray! thank you so much.

Sign in to reply to this post

Jason ByrnesWebAssist

great, glad to hear it is working, you can switch the other changes back.

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...