Post by CJC » Sat Feb 04, 2023 12:22 am

Hello,
My client has called a few times and stated that their customers are having a problem placing orders on the site. They all report that they are getting 'invalid token' errors. Unfortunately there's not much more info than that. I know its not all customers because there are orders that have been successfully placed during this timeframe. I've seen a bunch of other threads here regarding token problems but they are all related to accessing the Admin. Any ideas of what I can look for to start troubleshooting this?

OC 3.0.3.8, default template

Thank You,
CJ

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by JNeuhoff » Sat Feb 04, 2023 1:02 am

More details needed, such as: website URL, payment method, other extensions, PHP version

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by CJC » Sat Feb 04, 2023 2:12 am

JNeuhoff wrote:
Sat Feb 04, 2023 1:02 am
More details needed, such as: website URL, payment method, other extensions, PHP version
The website is: https://www.shorelinepetroleum.com. The allowed payment methods are authorize.net or COD. PHP version is 7.4. Below is a snapshot of installed extensions.
Image
Image

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by SohBH » Sat Feb 04, 2023 4:55 pm

Hi
Can you post this file
system/config/catalog.php

Business Web Development | Content Creation | Analytics and Reporting | SEO


User avatar
Active Member

Posts

Joined
Mon Nov 02, 2020 12:01 am
Location - Malaysia

Post by ADD Creative » Sun Feb 05, 2023 12:01 am

Check both your PHP and OpenCart error logs.

The token probably related to the authorize.net payment extension. Put through some test orders and check your web browser's developer console for errors.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon Feb 06, 2023 8:08 pm

CJC wrote:
Sat Feb 04, 2023 12:22 am
Any ideas of what I can look for to start troubleshooting this?
The first step is usually to try and replicate the problem.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by CJC » Mon Feb 06, 2023 10:28 pm

SohBH wrote:
Sat Feb 04, 2023 4:55 pm
Hi
Can you post this file
system/config/catalog.php
Yes, here it is:

Code: Select all

<?php
// Site
$_['site_url']           = HTTP_SERVER;
$_['site_ssl']           = HTTPS_SERVER;

// Url
$_['url_autostart']      = false;

// Database
$_['db_autostart']       = true;
$_['db_engine']          = DB_DRIVER; // mpdo, mysqli or pgsql
$_['db_hostname']        = DB_HOSTNAME;
$_['db_username']        = DB_USERNAME;
$_['db_password']        = DB_PASSWORD;
$_['db_database']        = DB_DATABASE;
$_['db_port']            = DB_PORT;

// Session
$_['session_autostart']  = false;
$_['session_engine']     = 'db';
$_['session_name']       = 'OCSESSID';

// Template
$_['template_engine']    = 'twig';
$_['template_directory'] = '';
$_['template_cache']     = true;

// Autoload Libraries
$_['library_autoload']   = array();

// Actions
$_['action_pre_action']  = array(
	'startup/session',
	'startup/startup',
	'startup/error',
	'startup/event',
	'startup/maintenance',
	'startup/seo_url'
);

// Action Events
$_['action_event'] = array(
	'controller/*/before' => array(
		'event/language/before'
	),
	'controller/*/after' => array(
		'event/language/after'
	),	
	'view/*/before' => array(
		500  => 'event/theme',
		998  => 'event/language',
	),
	'language/*/after' => array(
		'event/translation'
	),
	//'view/*/before' => array(
	//	1000  => 'event/debug/before'
	//),
	//'controller/*/after'  => array(
	//	'event/debug/after'
//	)
);

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by CJC » Mon Feb 06, 2023 11:04 pm

ADD Creative wrote:
Sun Feb 05, 2023 12:01 am
Check both your PHP and OpenCart error logs.

The token probably related to the authorize.net payment extension. Put through some test orders and check your web browser's developer console for errors.
I did find a few of these in the OC error log and I believe they would correspond to the timeframe of the customer's complaint:

2023-01-28 0:41:50 - PHP Notice: Undefined index: token in /home/shorelin/public_html/catalog/controller/extension/payment/authorizenet_ah.php on line 92
2023-01-28 0:41:51 - PHP Notice: Undefined index: token in /home/shorelin/public_html/catalog/controller/extension/payment/authorizenet_ah.php on line 156

I just tried placing an order and I finally received the 'invalid token' error myself. This is the first time I've seen it after having tried several test transactions. This is what came up in the browser console:

main.bundle.js:1 ERROR TypeError: Cannot read properties of null (reading 'offsetHeight')
at e.ngAfterViewInit (main.bundle.js:1:83835)
at Di (main.bundle.js:1:699177)
at Pi (main.bundle.js:1:698935)
at Si (main.bundle.js:1:698800)
at Object.Qi [as checkAndUpdateView] (main.bundle.js:1:708169)
at e.detectChanges (main.bundle.js:1:689775)
at main.bundle.js:1:653228
at Array.forEach (<anonymous>)
at e.tick (main.bundle.js:1:653199)
at main.bundle.js:1:651573
Se @ main.bundle.js:1

Authorize.net did have a update somewhat recently, but when I inquired about seeing the changelog to see what had been done, they never answered.

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by ADD Creative » Tue Feb 07, 2023 1:28 am

Does seem to be an issue with the payment extension. Probably best to contact the developer.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 263 guests