I receive an "Order processing error ! Payment processor can not process your order. Data is invalid" error when submitting a $0 order with the One Page Checkout.

By: Bill Brewer
Created: Mar 23, 2010 5:28 PM
Last Modified: Sep 29, 2012 4:11 PM
2 Ratings | 0 Comments
Somewhere around X-Cart version 4.1.8 or later, X-Cart changed the include/payment_method.php file introducing a bug that will not allow a $0 order.  When a $0 order is submitted there is an error:

Order processing error !
Payment processor can not process your order. Data is invalid.

This error will occur with the One Page Checkout enabled or disabled.  This is core X-Cart file order processing logic needs to be changed/fixed.

To fix:

Open include/payment_method.php:

Find this code near line 71:

# # Get userinfo and cart products and output an error if empty #
After insert:

if ($cart['total_cost'] == 0){     if (empty($userinfo) || func_is_cart_empty($cart)){         func_header_location($xcart_web_dir.DIR_CUSTOMER."/error_message.php?error_ccprocessor_baddata");     } } else {
Find this code near line 88:

$userinfo = func_array_merge($userinfo,$HTTP_POST_VARS);
BEFORE THIS enter:

}

Still Have Questions?

If you are unable to find a solution in the knowledgebase please open a support ticket for a personal response from the support desk.

Related Articles

Rate or comment on this article

Rate This Article (Select a star)

Add Comment

You must be logged in to add a comment.