Fixed order total mismatch issue on cancelled page
Fixed token validation issue Fixed issue displaying shipping method and fee on checkout Added Light only theme Fixed positioning issue on mobile view
This commit is contained in:
@@ -160,17 +160,20 @@ router.post('/capture-order', validateCaptureOrder, async (req, res) => {
|
||||
tokenLength: token?.length
|
||||
});
|
||||
|
||||
// Declare tokenData at function scope
|
||||
let tokenData = null;
|
||||
|
||||
// Verify token (optional in development)
|
||||
const skipTokenValidation = process.env.NODE_ENV === 'development' && process.env.SKIP_TOKEN_VALIDATION === 'true';
|
||||
|
||||
if (token && !skipTokenValidation) {
|
||||
const tokenData = verifyToken(token);
|
||||
tokenData = verifyToken(token);
|
||||
console.log('Token verification result:', {
|
||||
isValid: !!tokenData,
|
||||
tokenData: tokenData
|
||||
});
|
||||
|
||||
if (!tokenData || tokenData.wc_order_id !== parseInt(wc_order_id)) {
|
||||
if (!tokenData || tokenData.wc_order_id !== String(wc_order_id)) {
|
||||
console.error('Token validation failed:', {
|
||||
tokenData,
|
||||
expectedOrderId: wc_order_id,
|
||||
|
||||
Reference in New Issue
Block a user