Guest User

Untitled

a guest
Jun 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. You need to BACKUP!! BACKUP!! BACKUP!! BACKUP!! then find a bit of code in catalog/includes/modules/payment/authorizenet_cc_aim.php that looks like this:
  2.  
  3. function before_process() {
  4. global $HTTP_POST_VARS, $customer_id, $order, $sendto, $currency;
  5.  
  6. $params = array('x_login' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID, 0, 20),
  7. 'x_tran_key' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_KEY, 0, 16),
  8. 'x_version' => '3.1',
  9. 'x_delim_data' => 'TRUE',
  10. 'x_delim_char' => ',',
  11. 'x_encap_char' => '"',
  12. 'x_relay_response' => 'FALSE',
  13. 'x_first_name' => substr($order->billing['firstname'], 0, 50),
  14. 'x_last_name' => substr($order->billing['lastname'], 0, 50),
  15. 'x_company' => substr($order->billing['company'], 0, 50),
  16. 'x_address' => substr($order->billing['street_address'], 0, 60),
  17. 'x_city' => substr($order->billing['city'], 0, 40),
  18. 'x_state' => substr($order->billing['state'], 0, 40),
  19. 'x_zip' => substr($order->billing['postcode'], 0, 20),
  20. 'x_country' => substr($order->billing['country']['title'], 0, 60),
  21. 'x_phone' => substr($order->customer['telephone'], 0, 25),
  22. 'x_cust_id' => substr($customer_id, 0, 20),
  23. 'x_customer_ip' => tep_get_ip_address(),
  24. 'x_email' => substr($order->customer['email_address'], 0, 255),
  25. 'x_description' => substr(STORE_NAME, 0, 255),
  26. 'x_amount' => substr($this->format_raw($order->info['total']), 0, 15),
  27. 'x_currency_code' => substr($currency, 0, 3),
  28. 'x_method' => 'CC',
  29. 'x_type' =>
  30.  
  31. And Replace it with this:
  32.  
  33. function before_process() {
  34. global $HTTP_POST_VARS, $customer_id, $invoice_id, $order, $sendto, $currency;
  35.  
  36. $next_inv = '';
  37. $inv_id = tep_db_query("select orders_id from " . TABLE_ORDERS . " order by orders_id DESC limit 1");
  38. $last_inv = tep_db_fetch_array($inv_id);
  39. $next_inv = $last_inv['orders_id']+1;
  40.  
  41. $params = array('x_login' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_LOGIN_ID, 0, 20),
  42. 'x_tran_key' => substr(MODULE_PAYMENT_AUTHORIZENET_CC_AIM_TRANSACTION_KEY, 0, 16),
  43. 'x_version' => '3.1',
  44. 'x_delim_data' => 'TRUE',
  45. 'x_delim_char' => ',',
  46. 'x_encap_char' => '"',
  47. 'x_relay_response' => 'FALSE',
  48. 'x_invoice_num' => substr($next_inv, 0, 20),
  49. 'x_first_name' => substr($order->billing['firstname'], 0, 50),
  50. 'x_last_name' => substr($order->billing['lastname'], 0, 50),
  51. 'x_company' => substr($order->billing['company'], 0, 50),
  52. 'x_address' => substr($order->billing['street_address'], 0, 60),
  53. 'x_city' => substr($order->billing['city'], 0, 40),
  54. 'x_state' => substr($order->billing['state'], 0, 40),
  55. 'x_zip' => substr($order->billing['postcode'], 0, 20),
  56. 'x_country' => substr($order->billing['country']['title'], 0, 60),
  57. 'x_phone' => substr($order->customer['telephone'], 0, 25),
  58. 'x_cust_id' => substr($customer_id, 0, 20),
  59. 'x_customer_ip' => tep_get_ip_address(),
  60. 'x_email' => substr($order->customer['email_address'], 0, 255),
  61. 'x_description' => substr(STORE_NAME, 0, 255),
  62. 'x_amount' => substr($this->format_raw($order->info['total']), 0, 15),
  63. 'x_currency_code' => substr($currency, 0, 3),
  64. 'x_method' => 'CC',
  65. 'x_type' =>
Add Comment
Please, Sign In to add comment