Guest Bushwacker Posted May 21, 2007 Share Posted May 21, 2007 Hey all. I *almost* have Cubecart up and running for a client, but there is one critical problem: Order payments won't complete with Authorize.net because the CV code is apparently missing, and Cubecart doesn't ask for it. Below is the debugging mode output: Authorize.Net Advanced Implementation Method (AIM) Debug Info: 01: Post the transaction (see the code for specific information): 02: Get post results: 3|2|33|Card Code is required.||P|0||070521-144127-8782|32.22|CC|auth_capture||Andrew|Bourdon||33 test st|ttomano|CA|92106||||||||||||||||||10AC80DD864721E0E9C322319F90A15B||||||||||| ||||||||||||||||||||FALSE|||| 03: Parse post results (simple approach) 3 2 33 Card Code is required. P 0 070521-144127-8782 32.22 CC auth_capture Andrew Bourdon 33 test st ttomano CA 92106 10AC80DD864721E0E9C322319F90A15B FALSE 04: Parse the results string into individual, meaningful segments: Length of the returned string from Authorize.Net: 211 Number of delimiter characters in the returned string: 72 Response Code: Error Response Subcode: 2 Response Reason Code: 33 Response Reason Text: Card Code is required. Approval Code: NO VALUE RETURNED AVS Result Code: P Transaction ID: 0 Invoice Number (x_invoice_num): NO VALUE RETURNED Description (x_description): 070521-144127-8782 Amount (x_amount): 32.22 Method (x_method): CC Transaction Type (x_type): auth_capture Customer ID (x_cust_id): NO VALUE RETURNED Cardholder First Name (x_first_name): Andrew Cardholder Last Name (x_last_name): Bourdon Company (x_company): NO VALUE RETURNED Billing Address (x_address): 33 test st City (x_city): ttomano State (x_state): CA ZIP (x_zip): 92106 Country (x_country): NO VALUE RETURNED Phone (x_phone): NO VALUE RETURNED Fax (x_fax): NO VALUE RETURNED E-Mail Address (x_email): NO VALUE RETURNED Ship to First Name (x_ship_to_first_name): NO VALUE RETURNED Ship to Last Name (x_ship_to_last_name): NO VALUE RETURNED Ship to Company (x_ship_to_company): NO VALUE RETURNED Ship to Address (x_ship_to_address): NO VALUE RETURNED Ship to City (x_ship_to_city): NO VALUE RETURNED Ship to State (x_ship_to_state): NO VALUE RETURNED Ship to ZIP (x_ship_to_zip): NO VALUE RETURNED Ship to Country (x_ship_to_country): NO VALUE RETURNED Tax Amount (x_tax): NO VALUE RETURNED Duty Amount (x_duty): NO VALUE RETURNED Freight Amount (x_freight): NO VALUE RETURNED Tax Exempt Flag (x_tax_exempt): NO VALUE RETURNED PO Number (x_po_num): NO VALUE RETURNED MD5 Hash: 10AC80DD864721E0E9C322319F90A15B Card Code Response: NO VALUE RETURNED Reserved (40): NO VALUE RETURNED Reserved (41): NO VALUE RETURNED Reserved (42): NO VALUE RETURNED Reserved (43): NO VALUE RETURNED Reserved (44): NO VALUE RETURNED Reserved (45): NO VALUE RETURNED Reserved (46): NO VALUE RETURNED Reserved (47): NO VALUE RETURNED Reserved (48): NO VALUE RETURNED Reserved (49): NO VALUE RETURNED Reserved (50): NO VALUE RETURNED Reserved (51): NO VALUE RETURNED Reserved (52): NO VALUE RETURNED Reserved (53): NO VALUE RETURNED Reserved (54): NO VALUE RETURNED Reserved (55): NO VALUE RETURNED Reserved (56): NO VALUE RETURNED Reserved (57): NO VALUE RETURNED Reserved (58): NO VALUE RETURNED Reserved (59): NO VALUE RETURNED Reserved (60): NO VALUE RETURNED Reserved (61): NO VALUE RETURNED Reserved (62): NO VALUE RETURNED Reserved (63): NO VALUE RETURNED Reserved (64): NO VALUE RETURNED Reserved (65): NO VALUE RETURNED Reserved (66): NO VALUE RETURNED Reserved (67): NO VALUE RETURNED Reserved (68): NO VALUE RETURNED Merchant-defined (69): : FALSE Merchant-defined (70): : NO VALUE RETURNED Merchant-defined (71): : NO VALUE RETURNED Merchant-defined (72): : NO VALUE RETURNED Merchant-defined (73): : 04: Done. I took it off test mode and the above problem is still there. The cart doesn't ask the buyer for the CV code. How do I fix this? Thanks, Andrew Quote Link to comment Share on other sites More sharing options...
Guest Posted May 22, 2007 Share Posted May 22, 2007 I'm not sure why, but the default AIM gateway has the CCV code turned off, as you've discovered. It's been a while, but I think the field is in the form, just commented out. Open the file - /modules/gateway/Authorize_AIM/form.tpl and look for <!-- <tr align="left"> <td><strong>{LANG_SECURITY_CODE}</strong> <td colspan="3"><input type="text" name="cvc2" value="" size="3" maxlength="3" class="textbox" /></td> </tr> --> Remove the "<!--" and "-->". Next, open the form.inc.php file in the same directory and find the section that begins with $authnet_values = array ( "x_invoice" => $basket['cart_order_id'], "x_login" => $auth_net_login_id, You'll have to add a line for the CCV code, which should look like "x_card_code" => $_POST["cvc2"], While you're at it, I believe the country code needs to be added here too, so make sure there's a line that looks like "x_country" => $_POST["country"], In fact, here is the whole section in my file, just in case there's something else I had to add $authnet_values = array ( "x_login" => $auth_net_login_id, "x_version" => "3.1", "x_delim_char" => "|", "x_delim_data" => "TRUE", "x_url" => "FALSE", "x_type" => "AUTH_CAPTURE", "x_method" => "CC", "x_tran_key" => $auth_net_tran_key, "x_relay_response" => "FALSE", "x_card_num" => $_POST["cardNumber"], "x_exp_date" => $_POST["expirationMonth"].$_POST["expirationYear"], "x_card_code" => $_POST["cvc2"], "x_invoice" => $basket['cart_order_id'], "x_description" => $basket['cart_order_id'], "x_amount" => $basket['grandTotal'], "x_first_name" => $_POST["firstName"], "x_last_name" => $_POST["lastName"], "x_address" => $_POST["addr1"].' '.$_POST["addr2"], "x_city" => $_POST["city"], "x_state" => $_POST["state"], "x_zip" => $_POST["postalCode"], "x_country" => $_POST["country"], "CustomerBirthMonth" => "", "CustomerBirthDay" => "", "CustomerBirthYear" => "", "SpecialCode" => "", ); Quote Link to comment Share on other sites More sharing options...
Guest Bushwacker Posted May 23, 2007 Share Posted May 23, 2007 Cool it worked! Thanks so much, Alan! Now all I have left is one cosmetic issue, and one tax issue: Cosmetic: What file do I need to edit such that I can change the shipping method string from "First Class", etc. to "Standard Ground", and the like? My client wants it done this way for whatever reason. I'm currently using the Ship By Weight method, and the purchaser sees "1st Class" as the default (and currently only) shipping method choice. Tax: By default, Cubecart seems to base tax on the purchaser location, not where it is being shipped to. In California, USA, sales tax applies to goods being shipped into or inside of the state. Exported goods are not taxed. Is making this switch possible, and if so, how? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.