Administrator
- Join Date:
- Feb 2006
- Location:
- Tampa Bay, Florida
- Posts:
- 10,699
- Plugin Contributions:
- 56
[Done v1.3.9g] Authorize net module debug data may have mismatched id number
The call
$new_order_id = (string)$new_order_id . '-' . zen_create_random_value(6);
could produce a random string including digits, which would be misparsed by the logic which gets the order number for use in the AUTHORIZENET table:
$sql = $db->bindVars($sql, ':orderID', preg_replace('/[^0-9]/', '', $response[7]), 'integer');
I believe it would be safer to do
$new_order_id = (string)$new_order_id . '-' . zen_create_random_value(6,'chars');
Consider the string:
TEST-1530-XLWNS7
which would result in order 15307, not 1530.