Quote Originally Posted by dbltoe View Post
This was found in troubleshooting today. We loaded the 1.03 files to Zen Cart 1.5.8 and were getting stopped at Confirm Checkout with a token error.

For those wondering about 1.5.8, WebPay works exactly as expected in Zen Cart 1.5.8 WITHOUT One Page Checkout.

If you are going to use WebPay AND One Page Checkout with Zen Cart, you will need to get the OLD square javascript file from includes/modules/pages/checkout_payment/ called jscript_square.php.

Copy or FTP that file to includes/modules/pages/checkout_one/.

The includes/modules/pages/checkout_payment/jscript_square.php is still part of the 1.5.8 distribution zip file. It may not be part of further distros.
this is just wrong.

following this advice is not recommended by me; and i wrote the square webPay module.

the code from that file is here.

looking at it here, one can see that said file will just return false without doing anything.

PHP Code:
if (!defined('MODULE_PAYMENT_SQUARE_STATUS') || MODULE_PAYMENT_SQUARE_STATUS != 'True' || (!defined('MODULE_PAYMENT_SQUARE_APPLICATION_ID') || MODULE_PAYMENT_SQUARE_ACCESS_TOKEN == '')) {
    return 
false;
}
if (
$payment_modules->in_special_checkout() || empty($square) || !$square->enabled) {
    return 
false;

there is nothing in the jscript_square.php that has anything to do with square webPay.

why this situation works for this poster, i can not say; nor will i offer a guess.

best.