Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jul 2013
    Location
    Cambridge, UK
    Posts
    9
    Plugin Contributions
    0

    application error "A valid amount is required" error with Authorize.net AIM

    I have just signed up to Authorize.net and I am using the builtin Authorize.net AIM paymant module in Zencart.

    I have tried this in test mode and production mode and I still get the same error message when trying to process a transaction. I have set up the log file (shown below) and it shows x_amount => 0.00 when the transaction is actially for £16.60 GBP.

    Has anyone else seen this error and can you help?

    Many thanks
    Peter


    Mar-07-2014 08:32:20
    =================================

    Response Code: 3.
    Response Text: (TESTMODE) A valid amount is required.

    Sending to Authorizenet: Array
    (
    [x_login] => *******
    [x_tran_key] => *******
    [x_relay_response] => FALSE
    [x_delim_data] => TRUE
    [x_delim_char] => |
    [x_encap_char] => *
    [x_version] => 3.1
    [x_type] => AUTH_CAPTURE
    [x_method] => CC
    [x_amount] => 0.00
    [x_currency_code] => USD
    [x_card_num] => XXXXXXXXX0015
    [x_exp_date] => 1214
    [x_card_code] => ****
    [x_email_customer] => FALSE
    [x_email_merchant] => FALSE
    [x_cust_id] => 1
    [x_invoice_num] => TEST-10502-VQbRfk
    [x_first_name] => Peter
    [x_last_name] => Ward
    [x_company] => BugGrub Limited
    [x_address] => 4 Lynn Road
    [x_city] => King's Lynn
    [x_state] => Norfolk
    [x_zip] => PE33 0EW
    [x_country] => United Kingdom
    [x_phone] => 447973320013
    [x_email] => [email protected]
    [x_ship_to_first_name] => Peter
    [x_ship_to_last_name] => Ward
    [x_ship_to_address] => 4 Lynn Road
    [x_ship_to_city] => King's Lynn
    [x_ship_to_state] => Norfolk
    [x_ship_to_zip] => PE33 0EW
    [x_ship_to_country] => United Kingdom
    [x_description] => Test product 1 (qty: 1)
    [x_recurring_billing] => NO
    [x_customer_ip] => 86.157.161.22
    [x_po_num] => Mar-07-2014 08:32:19
    [x_tax_exempt] => FALSE
    [x_duty] => 0
    [x_allow_partial_Auth] => FALSE
    [Date] => March 7, 2014, 8:32 pm
    [IP] => 86.157.161.22
    [Session] => fd1d8a867b6f52d2ed82c01ccd11e2f7
    [x_test_request] => TRUE
    [url] => https://secure.authorize.net/gateway/transact.dll
    )


    Results Received back from Authorizenet: Array (
    [0] => Response from gateway
    [1] => 3
    [2] => 1
    [3] => 5
    [4] => (TESTMODE) A valid amount is required.
    [5] => 000000
    [6] => P
    [7] => 0
    [8] => TEST-10502-VQbRfk
    [9] => Test product 1 (qty: 1)
    [10] => 0.00
    [11] => CC
    [12] => auth_capture
    [13] => 1
    [14] => Peter
    [15] => Ward
    [16] => BugGrub Limited
    [17] => 4 Lynn Road
    [18] => Kings Lynn
    [19] => Norfolk
    [20] => PE33 0EW
    [21] => United Kingdom
    [22] => 447973320013
    [23] =>
    [24] => [email protected]
    [25] => Peter
    [26] => Ward
    [27] =>
    [28] => 4 Lynn Road
    [29] => Kings Lynn
    [30] => Norfolk
    [31] => PE33 0EW
    [32] => United Kingdom
    [33] =>
    [34] => 0.00
    [35] =>
    [36] => FALSE
    [37] => Mar-07-2014 08:32:19
    [38] => FC50DAC180EE8E7A303080D6285E4272
    [39] =>
    [40] =>
    [41] =>
    [42] =>
    [43] =>
    [44] =>
    [45] =>
    [46] =>
    [47] =>
    [48] =>
    [49] =>
    [50] =>
    [51] => XXXX0015
    [52] => MasterCard
    [53] =>
    [54] =>
    [55] =>
    [56] =>
    [57] =>
    [58] =>
    [59] =>
    [60] =>
    [61] =>
    [62] =>
    [63] =>
    [64] =>
    [65] =>
    [66] =>
    [67] =>
    [68] =>
    [69] => March 7, 2014, 8:32 pm
    [70] => 86.157.161.22
    [71] => fd1d8a867b6f52d2ed82c01ccd11e2f7
    [Expected-MD5-Hash] => FC50DAC180EE8E7A303080D6285E4272
    [HashMatchStatus] => PASS
    )


    CURL communication info: Array
    (
    [url] => https://secure.authorize.net/gateway/transact.dll
    [content_type] => text/html
    [http_code] => 200
    [header_size] => 288
    [request_size] => 208
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 1.137378
    [namelookup_time] => 0.027753
    [connect_time] => 0.2024
    [pretransfer_time] => 0.75883
    [size_upload] => 1048
    [size_download] => 633
    [speed_download] => 556
    [speed_upload] => 921
    [download_content_length] => 633
    [upload_content_length] => 1048
    [starttransfer_time] => 0.934109
    [redirect_time] => 0
    [certinfo] => Array
    (
    )

    [primary_ip] => 64.94.118.32
    [redirect_url] =>
    )


    RAW data received:
    *3*|*1*|*5*|*(TESTMODE) A valid amount is
    required.*|*000000*|*P*|*0*|*TEST-10502-VQbRfk*|*Test product 1 (qty:
    1)*|*0.00*|*CC*|*auth_capture*|*1*|*Peter*|*Ward*|*BugGrub Limited*|*4 Lynn
    Road*|*Kings Lynn*|*Norfolk*|*PE33 0EW*|*United
    Kingdom*|*447973320013*|**|*[email protected]*|*Peter*|*Ward*|**|*4
    Lynn Road*|*Kings Lynn*|*Norfolk*|*PE33 0EW*|*United
    Kingdom*|**|*0.00*|**|*FALSE*|*Mar-07-2014
    08:32:19*|*FC50DAC180EE8E7A303080D6285E4272*|**|**|**|**|**|**|**|**|**|**|**|** |*XXXX0015*|*MasterCard*|**|**|**|**|**|**|**|**|**|**|**|**|**|**|**|**|*March
    7, 2014, 8:32 pm*|*86.157.161.22*|*fd1d8a867b6f52d2ed82c01ccd11e2f7*

  2. #2
    Join Date
    Jul 2013
    Location
    Cambridge, UK
    Posts
    9
    Plugin Contributions
    0

    Default Re: "A valid amount is required" error with Authorize.net AIM

    One further thing to add is that I have Paypal Express installed and this works correctly, sending both the correct amount and currency to PayPal.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: "A valid amount is required" error with Authorize.net AIM

    I'm guessing you have no currency-exchange rate configured in your store for both USD and GBP? Admin->Localisation->Currencies
    .

    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.

  4. #4
    Join Date
    Jul 2013
    Location
    Cambridge, UK
    Posts
    9
    Plugin Contributions
    0

    Default Re: "A valid amount is required" error with Authorize.net AIM

    DrByte

    I only have one currency set up, GBP with no conversion rate. USD is not used.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: "A valid amount is required" error with Authorize.net AIM

    The module is apparently translating to USD, and since there's not exchange rate set for it, it's using 0.00 as the multiplier.

    So, either add USD with an exchange rate of 1.0000 so it submits the same amount regardless of currency,
    or experimentally add the authnet module from v1.6.0 as found on the zen cart github account, and see if it solves the problem for you (since it's designed to support GBP as well as USD for authorize.net).
    .

    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.

  6. #6
    Join Date
    Jul 2013
    Location
    Cambridge, UK
    Posts
    9
    Plugin Contributions
    0

    Default Re: "A valid amount is required" error with Authorize.net AIM

    I've added USD as a payment option with the correct conversion rate, and it has cleared the above problem but seems to be sending the converted price as USD and my merchant account does not accept USD only GBP.

    (TESTMODE) The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate. - Your credit card could not be authorized for this reason. Please correct the information and try again or contact us for further assistance.

    Mar-11-2014 11:49:00
    =================================

    Response Code: 3.
    Response Text: (TESTMODE) The supplied currency code is either invalid, not supported, not allowed for this merchant or doesn't have an exchange rate.

    Sending to Authorizenet: Array
    (
    [x_login] => *******
    [x_tran_key] => *******
    [x_relay_response] => FALSE
    [x_delim_data] => TRUE
    [x_delim_char] => |
    [x_encap_char] => *
    [x_version] => 3.1
    [x_type] => AUTH_CAPTURE
    [x_method] => CC
    [x_amount] => 29.55
    [x_currency_code] => USD
    [x_card_num] => XXXXXXXXXXXXX0027
    [x_exp_date] => 1214
    [x_card_code] => ****
    [x_email_customer] => FALSE
    [x_email_merchant] => FALSE
    [x_cust_id] => 1
    [x_invoice_num] => TEST-10502-GXptfs


    I think my only option will be to install "the authnet module from v1.6.0 as found on the zen cart github account" as you suggested above. I can't believe the standard Authorize.net is not set up to accept payments other than in USD. Surely other customers in the UK must have this payment method.

    I'll send an update later.

    Peter

  7. #7
    Join Date
    Jul 2013
    Location
    Cambridge, UK
    Posts
    9
    Plugin Contributions
    0

    Default Re: "A valid amount is required" error with Authorize.net AIM for GBP

    I have downloaded the authnet module from v1.6.0 as found on the zen cart github account and placed the following 3 files in my shop:-

    /includes/modules/payment/authorizenet_aim.php
    /includes/modules/payment/authorizenet/authorizenet_admin_notification.php
    /includes/languages/english/modules/payment/authorizenet_aim.php

    When I go to modules -> payment in the site admin the page stops just below the new "authorizenet_aim" and doesn't load the remaining payment modules. I am just thinking that maybe I need to make a change to the DB for this new module.

    If so, could you please provide the sql script for this.

    For info. if I roll back to the original 3 files, the pages loads correctly.

    Many thanks
    Peter
    Last edited by BugGrub.com; 11 Mar 2014 at 12:54 PM.

  8. #8
    Join Date
    Jul 2013
    Location
    Cambridge, UK
    Posts
    9
    Plugin Contributions
    0

    Default Re: "A valid amount is required" error with Authorize.net AIM for GBP

    I have been doing a little playing around and found that if I use:-

    /includes/languages/english/modules/payment/authorizenet_aim.php (v1.5.1)

    I have used the original language file version from v1.5.1 alongside the two v1.6.0 payment module files and it seems to be working now in GBP. Should this be OK?

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: "A valid amount is required" error with Authorize.net AIM

    Quote Originally Posted by BugGrub.com View Post
    I can't believe the standard Authorize.net is not set up to accept payments other than in USD. Surely other customers in the UK must have this payment method.
    It's quite simple really: At the time when v1.5.1 was published, Authorize.net didn't offer GBP support, so it wasn't built into the code.
    .

    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.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: "A valid amount is required" error with Authorize.net AIM for GBP

    Quote Originally Posted by BugGrub.com View Post
    I have downloaded the authnet module from v1.6.0 as found on the zen cart github account and placed the following 3 files in my shop:-

    /includes/modules/payment/authorizenet_aim.php
    /includes/modules/payment/authorizenet/authorizenet_admin_notification.php
    /includes/languages/english/modules/payment/authorizenet_aim.php

    When I go to modules -> payment in the site admin the page stops just below the new "authorizenet_aim" and doesn't load the remaining payment modules. I am just thinking that maybe I need to make a change to the DB for this new module.

    If so, could you please provide the sql script for this.

    For info. if I roll back to the original 3 files, the pages loads correctly.

    Many thanks
    Peter
    Apologies. I'd forgotten that v1.6.0 introduced some new features to make admin troubleshooting of payment/shipping modules easier. But in doing so made it incompatible with v1.5.x
    The v1.5.2 edition of those files should be fine. There's a beta for v1.5.2 available in the forum's News & Announcements section.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Authorize.net (AIM) - "Credit card number is required"
    By swguy in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 13 Sep 2017, 06:36 PM
  2. Issues with authorize.net aim "communications error"
    By ericlewis in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 12 Oct 2011, 04:47 AM
  3. Authorize.net SIM Working but AIM Always "Declined"
    By alexsbrown in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 1 Feb 2009, 12:23 AM
  4. Help with "tax exempt required"/Authorize.net issue
    By camigo in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 23 May 2008, 06:24 PM
  5. Authorize.net (AIM), "The transaction cannot be found." error-- HELP!
    By luvsealssoaps in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 31 Jul 2006, 10:20 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