Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2013
    Location
    Ohio
    Posts
    22
    Plugin Contributions
    0

    help question Authorize.net SIM module not passing invoice num

    'x_invoice_num' => ' ',

    What do I put in the ' ' to allow for the invoice number to be passed.

    C

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Authorize.net module not passing invoice num

    There is no invoice number generated by Zen Cart until AFTER the payment is completed. That's why it's passed blank.

    But if you want to GUESS the order-number that will be assigned, you can add the following 2-part code:

    1. Above the line where the array starts ... ie: above this line $submit_data_core = array(
    Add this:
    Code:
        $last_order_id = $db->Execute("select orders_id from " . TABLE_ORDERS . " order by orders_id desc limit 1");
        $new_order_id = $last_order_id->fields['orders_id'];
        $new_order_id = ($new_order_id + 1);
        // add randomized suffix to order id to produce uniqueness ... since it's unwise to submit the same order-number twice to authorize.net
        $new_order_id = (string)$new_order_id . '-' . zen_create_random_value(6, 'chars');
    2. Then change:
    Code:
    'x_invoice_num' => ' ',
    to:
    Code:
    'x_invoice_num' => $new_order_id,
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Authorize.Net Sim Sending Order # or Invoice #
    By WiccanWitch420 in forum General Questions
    Replies: 2
    Last Post: 11 Nov 2011, 08:14 AM
  2. Not passing data to Authorize.net?
    By mel150 in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 7 Dec 2010, 08:23 PM
  3. USPS module not working properly and Authorize.net SIM giving error
    By aikisho in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 3 Jul 2010, 12:44 AM
  4. Authorize.net SIM module not processing
    By datatv in forum Addon Payment Modules
    Replies: 6
    Last Post: 23 Apr 2009, 04:53 AM
  5. Authorize.Net SIM Module not working right for us
    By chaoscube in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 12 Sep 2008, 09:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR