[ic] Re: Authorizenet payment module (modifications)
Philip S. Hempel
interchange-users@icdevgroup.org
Wed Jun 4 23:34:00 2003
John Young said:
>
> Philip S. Hempel wrote:
>
>> Only problem is when you have someone with a two line address, causes the line to
>> become split. When and address of this form looks like this
>>
>> 123 West Maybury
>> PO Box 123
>>
>> The split then would be on an address line moving all others fields down by one.
>> I have test this and found to be true only in this case. The case is even wors
>> when
>> both billing and shipping are two line fields.
>> This is what I have been trying to get past. I understand the reason behind why
>> they gave a character to use for field encap. Not only for the line delim.
>
> Sorry, but I don't believe I understand. I wasn't aware that
> AuthorizeNet.pm
> would even see a two-line address due to the following in Payment.pm:
>
It seems to put a comma in between the two and authorizenet make use of it to split
see the output from the logs later.
> if($actual{b_address1}) {
> $actual{b_address} = "$actual{b_address1}";
> $actual{b_address} .= ", $actual{b_address2}"
> if $actual{b_address2};
> }
>
> Now, IF you used three address blanks on forms, as some do, that would
> require
> modification of the logic above. In any event, I can't understand how you
> are getting multiple address lines to the payment gateway. Are you
> inserting
> a linefeed character or something interesting like that?
>
>
>> The suggestions that were put up erliear work fine if your not concerned about
>> the
>> output.
>> What my goal is to let the user know why the error so they do not try fixing the
>> address when the actual problem is cvv2.
>>
>> If I do not use the error codes releated to cvv2 output and only use the
>> secondary
>> response code it would be very generic but I could use it a least to say that it
>> is a cvv2 error.
>
This is the output that is sent back from a submission using the : (colon) as a delim.
It is required to have a field sperator, using the comma default is what I have
chosen. The field encapsulation chararacter is optionial if wanting to use the
extended (cvv2 and others) information then it would be required.
authorizenet page:
:1:,:1:,:1:,:This transaction has been
approved.:,:000000:,:P:,:0:,:2003010344:,::,:12.36:,:CC:,:auth_capture:,:philip:,:Philip:,:Hempel:,:Linux
HardCore:,:PO Box 74, 8712 South Lake Road:,:Berrien
Center:,:MI:,:49102:,:US:,:616-461-3214:,::,:me@my.com:,:Philip:,:Hempel:,:Linux
HardCore:,:8712 South Lake Road:,:Berrien
Center:,:MI:,:49102:,:US:,::,::,::,::,::,:77C12175C0E0615AE541000233CFC144:,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::,::
response: HTTP/1.1 200 OK
Notice how the first location starts the encapsulation chararacter. If I were to
use this in the present code it would see it as the seperator for a field.
What follows is the way IC thinks the data is. This output is using the pipe char
as the delim and then follows with output using a comma
Vend::Order:debug: FINISH checking profile credit_card: Fatal=1 Final=1 Status=1
Vend::Payment:debug: actual map result: {
'pin' => undef,
'mv_order_number' => '2003010355',
'fname' => 'Philip',
'po_number' => '',
'mv_credit_card_exp_month' => 4,
'state' => 'MI',
'email' => 'me@you.com',
'b_country' => 'US',
'item_code' => undef,
'b_lname' => 'Hempel',
'b_name' => 'Philip Hempel',
'mv_credit_card_reference' => 3,
'tax_duty' => undef,
'address' => '8712 South Lake Road, Box 74',
'shipping' => undef,
'tender' => undef,
'check_account' => undef,
'cyber_mode' => 'mauthcapture',
'salestax' => undef,
'check_checktype' => undef,
'b_company' => 'Linux HardCore',
'name' => 'Philip Hempel',
'zip' => '49102',
'b_fname' => 'Philip',
'lname' => 'Hempel',
'b_address1' => 'Box 74',
'b_state' => 'MI',
'address1' => '8712 South Lake Road',
'comment2' => undef,
'phone_day' => '616-461-3214',
'b_address' => 'Box 74, 8712 South Lake Road',
'check_routing' => undef,
'mv_username' => 'philip',
'origin_zip' => undef,
'mv_credit_card_number' => '4111111111111111',
'phone_night' => '616-461-3214',
'b_city' => 'Berrien Center',
'mv_credit_card_exp_year' => '04',
'tax_exempt' => undef,
'city' => 'Berrien Center',
'company' => 'Linux HardCore',
'mv_credit_card_exp_all' => '04/04',
'b_zip' => '49102',
'check_accttype' => undef,
'country' => 'US',
'b_address2' => '8712 South Lake Road',
'item_desc' => undef,
'comment1' => undef,
'check_magstripe' => undef,
'address2' => 'Box 74',
'cvv2' => '999',
'check_transit' => undef,
'amount' => undef,
'comment' => undef,
'check_dl' => undef,
'corpcard_type' => undef,
'mv_credit_card_cvv2' => '999',
'check_number' => undef
}
Vend::Payment:debug: auth_code= order_id=030605024309475
Vend::Payment:debug: Authorizenet query: {
'x_Address' => 'Box 74, 8712 South Lake Road',
'x_Card_Code' => '999',
'x_Ship_To_City' => 'Berrien Center',
'x_First_Name' => 'Philip',
'x_Bank_Phone' => undef,
'x_Ship_To_State' => 'MI',
'x_Echeck_Type' => undef,
'x_Encap_Char' => '|',
'x_State' => 'MI',
'x_Type' => 'AUTH_CAPTURE',
'x_Ship_To_Last_Name' => 'Hempel',
'x_Zip' => '49102',
'x_Bank_Acct_Type' => undef,
'x_Customer_IP' => '192.168.1.20',
'x_Test_Request' => 'TRUE',
'x_ADC_Delim_Data' => 'TRUE',
'x_Company' => 'Linux HardCore',
'x_Ship_To_Company' => 'Linux HardCore',
'x_Bank_Acct_Num' => undef,
'x_Method' => undef,
'x_Ship_To_First_Name' => 'Philip',
'x_Check_Num' => undef,
'x_Delim_Data' => 'TRUE',
'x_ADC_URL' => 'FALSE',
'x_Delim_Char' => '',
'x_Ship_To_Country' => 'US',
'x_Bank_ABA_Code' => undef,
'x_Phone' => '616-461-3214',
'x_Auth_Code' => undef,
'x_Last_Name' => 'Hempel',
'x_Country' => 'US',
'x_Version' => '3.1',
'x_Email' => 'me@you.com',
'x_Ship_To_Address' => '8712 South Lake Road, Box 74',
'x_Tran_Key' => 'mytransid',
'x_Cust_ID' => 'philip',
'x_Login' => 'mylogincode',
'x_Ship_To_Zip' => '49102',
'x_City' => 'Berrien Center',
'x_Trans_ID' => '030605024309475',
'x_Invoice_Num' => '2003010355',
'x_Card_Num' => '4111111111111111',
'x_Exp_Date' => '0404',
'x_Amount' => '17.49'
}
Vend::Payment:debug:
authorizenet page: |1|,|1|,|1|,|This transaction has been
approved.|,|000000|,|P|,|0|,|2003010355|,||,|17.49|,|CC|,|auth_capture|,|philip|,|Philip|,|Hempel|,|Linux
HardCore|,|Box 74, 8712 South Lake Road|,|Berrien
Center|,|MI|,|49102|,|US|,|616-461-3214|,||,|me@you.com|,|Philip|,|Hempel|,|Linux
HardCore|,|8712 South Lake Road, Box 74|,|Berrien
Center|,|MI|,|49102|,|US|,||,||,||,||,||,|2405CAABA2FFD4298A3D7E3C36093E5E|,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||,||
response: HTTP/1.1 200 OK
Vend::Payment:debug: authorizenet response_reason_text=, response_code: |
x_cvv2_resp_code=
Vend::Payment:debug: authorizenet result={
'x_address' => 's',
'pop.error-message' => ',',
'x_city' => ' ',
'x_avs_code' => '1',
'x_first_name' => 'T',
'pop.avs_addr' => 's',
'x_response_reason_code' => '|',
'x_response_reason_text' => ',',
'x_description' => '|',
'x_trans_id' => '|',
'x_ship_to_country' => 'a',
'pop.avs_code' => '1',
'x_ship_to_first_name' => 'c',
'x_email' => 'a',
'x_cvv2_resp_code' => ' ',
'x_shipt_to_zip' => 'h',
'x_ship_to_company' => 'i',
'x_last_name' => 'h',
'x_ship_to_city' => 'n',
'x_method' => '|',
'x_country' => 'a',
'x_fax' => 's',
'x_ship_to_address' => 'o',
'MStatus' => 'failure',
'x_state' => 't',
'pop.avs_zip' => 'r',
'x_type' => ',',
'x_zip' => 'r',
'x_tax' => 's',
'MErrMsg' => 'Authorizenet error: ,. Please call in your order or try again.',
'x_freight' => 'b',
'pop.cvv2_resp_code' => ' ',
'pop.order-id' => '|',
'x_ship_to_last_name' => 't',
'x_duty' => ' ',
'pop.status' => '|',
'x_auth_code' => '|',
'pop.auth-code' => '|',
'x_company' => 'i',
'x_md5_hash' => 'n',
'x_phone' => 'n',
'x_invoice_num' => ',',
'x_ship_to_state' => ' ',
'x_response_code' => '|',
'x_amount' => '1',
'x_po_num' => 'e',
'pop.invoice_num' => ',',
'x_cust_id' => '|',
'x_response_subcode' => '1',
'x_tax_exempt' => 'e'
}
Vend::Order:debug: route failed: log
Vend::Order:debug: checking route log for transactions
Vend::Order:debug: rolling back route log
Start DEBUG at Thu Jun 5 02:54:21 2003
Start DEBUG at Thu Jun 5 02:58:41 2003
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=fname, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=lname, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=address1, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=city, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=country, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=multistate
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=state, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=multizip
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=zip, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=phone
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=phone_day, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=phone_day, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=email, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=email, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=email
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=email, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=end_profile,
message=end_profile set failed.
Vend::Order:debug: &Vend::Order::do_check returning val=Incomplete, var=, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=cvv2, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: OrderCheck = HASH(0x9b4bcf0) routine=length
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=cvv2, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1,
var=mv_credit_card_valid, message=
Vend::Order:debug: &Vend::Order::do_check returning val=Real-time Credit Card (%c
-- authorizenet), var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=end_profile,
message=end_profile set failed.
Vend::Order:debug: &Vend::Order::do_check returning val=credit_card,
var=payment_method, message=payment_method set failed.
Vend::Order:debug: FINISH checking profile credit_card: Fatal=1 Final=1 Status=1
Vend::Payment:debug: actual map result: {
'pin' => undef,
'mv_order_number' => '2003010356',
'fname' => 'Philip',
'po_number' => '',
'mv_credit_card_exp_month' => 4,
'state' => 'MI',
'email' => 'me@you.com',
'b_country' => 'US',
'item_code' => undef,
'b_lname' => 'Hempel',
'b_name' => 'Philip Hempel',
'mv_credit_card_reference' => 3,
'tax_duty' => undef,
'address' => '8712 South Lake Road, Box 74',
'shipping' => undef,
'tender' => undef,
'check_account' => undef,
'cyber_mode' => 'mauthcapture',
'salestax' => undef,
'check_checktype' => undef,
'b_company' => 'Linux HardCore',
'name' => 'Philip Hempel',
'zip' => '49102',
'b_fname' => 'Philip',
'lname' => 'Hempel',
'b_address1' => 'Box 74',
'b_state' => 'MI',
'address1' => '8712 South Lake Road',
'comment2' => undef,
'phone_day' => '616-461-3214',
'b_address' => 'Box 74, 8712 South Lake Road',
'check_routing' => undef,
'mv_username' => 'philip',
'origin_zip' => undef,
'mv_credit_card_number' => '4111111111111111',
'phone_night' => '616-461-3214',
'b_city' => 'Berrien Center',
'mv_credit_card_exp_year' => '04',
'tax_exempt' => undef,
'city' => 'Berrien Center',
'company' => 'Linux HardCore',
'mv_credit_card_exp_all' => '04/04',
'b_zip' => '49102',
'check_accttype' => undef,
'country' => 'US',
'b_address2' => '8712 South Lake Road',
'item_desc' => undef,
'comment1' => undef,
'check_magstripe' => undef,
'address2' => 'Box 74',
'cvv2' => '987',
'check_transit' => undef,
'amount' => undef,
'comment' => undef,
'check_dl' => undef,
'corpcard_type' => undef,
'mv_credit_card_cvv2' => '987',
'check_number' => undef
}
Vend::Payment:debug: auth_code= order_id=030605025923532
Vend::Payment:debug: Authorizenet query: {
'x_Address' => 'Box 74, 8712 South Lake Road',
'x_Card_Code' => '987',
'x_Ship_To_City' => 'Berrien Center',
'x_First_Name' => 'Philip',
'x_Bank_Phone' => undef,
'x_Ship_To_State' => 'MI',
'x_Echeck_Type' => undef,
'x_Encap_Char' => '',
'x_State' => 'MI',
'x_Type' => 'AUTH_CAPTURE',
'x_Ship_To_Last_Name' => 'Hempel',
'x_Zip' => '49102',
'x_Bank_Acct_Type' => undef,
'x_Customer_IP' => '192.168.1.20',
'x_Test_Request' => 'TRUE',
'x_ADC_Delim_Data' => 'TRUE',
'x_Company' => 'Linux HardCore',
'x_Ship_To_Company' => 'Linux HardCore',
'x_Bank_Acct_Num' => undef,
'x_Method' => undef,
'x_Ship_To_First_Name' => 'Philip',
'x_Check_Num' => undef,
'x_Delim_Data' => 'TRUE',
'x_ADC_URL' => 'FALSE',
'x_Delim_Char' => '|',
'x_Ship_To_Country' => 'US',
'x_Bank_ABA_Code' => undef,
'x_Phone' => '616-461-3214',
'x_Auth_Code' => undef,
'x_Last_Name' => 'Hempel',
'x_Country' => 'US',
'x_Version' => '3.1',
'x_Email' => 'me@you.com',
'x_Ship_To_Address' => '8712 South Lake Road, Box 74',
'x_Tran_Key' => 'mytransidnumber',
'x_Cust_ID' => 'philip',
'x_Login' => 'mylogincode',
'x_Ship_To_Zip' => '49102',
'x_City' => 'Berrien Center',
'x_Trans_ID' => '030605025923532',
'x_Invoice_Num' => '2003010356',
'x_Card_Num' => '4111111111111111',
'x_Exp_Date' => '0404',
'x_Amount' => '17.49'
}
Vend::Payment:debug:
authorizenet page: 1|1|1|This transaction has been
approved.|000000|P|0|2003010356||17.49|CC|auth_capture|philip|Philip|Hempel|Linux
HardCore|Box 74, 8712 South Lake Road|Berrien
Center|MI|49102|US|616-461-3214||me@you.com|Philip|Hempel|Linux HardCore|8712 South
Lake Road, Box 74|Berrien
Center|MI|49102|US||||||2405CAABA2FFD4298A3D7E3C36093E5E||||||||||||||||||||||||||||||||
response: HTTP/1.1 200 OK
Vend::Payment:debug: authorizenet response_reason_text=| response_code: 1
x_cvv2_resp_code=e
Vend::Payment:debug: authorizenet result={
'x_address' => 'a',
'pop.error-message' => '|',
'x_city' => 'c',
'x_avs_code' => '|',
'x_first_name' => 'a',
'pop.avs_addr' => 'a',
'x_response_reason_code' => '1',
'x_response_reason_text' => '|',
'x_description' => 'i',
'x_trans_id' => 'T',
'x_ship_to_country' => ' ',
'pop.avs_code' => '|',
'x_ship_to_first_name' => 'a',
'x_email' => 'h',
'x_cvv2_resp_code' => 'e',
'x_shipt_to_zip' => 'n',
'x_ship_to_company' => ' ',
'x_last_name' => 'n',
'x_ship_to_city' => 'e',
'x_method' => ' ',
'x_country' => 'o',
'x_fax' => ' ',
'x_ship_to_address' => 'b',
'MStatus' => 'success',
'x_state' => 't',
'pop.avs_zip' => 'i',
'x_type' => 't',
'x_zip' => 'i',
'x_tax' => 'a',
'x_freight' => 'p',
'pop.cvv2_resp_code' => 'e',
'pop.order-id' => 'T',
'x_ship_to_last_name' => 's',
'x_duty' => 'p',
'pop.status' => '1',
'x_auth_code' => '1',
'pop.auth-code' => '1',
'x_company' => 's',
'x_md5_hash' => 'v',
'x_phone' => 'n',
'x_invoice_num' => 'h',
'x_ship_to_state' => 'e',
'x_response_code' => 1,
'x_amount' => 's',
'x_po_num' => 'o',
'pop.invoice_num' => 'h',
'x_cust_id' => 'r',
'order-id' => 'T',
'x_response_subcode' => '|',
'x_tax_exempt' => 'r'
}
Vend::Order:debug: checking route default for transactions
Vend::Order:debug: checking route log for transactions
Vend::Order:debug: committing route log
Vend::Order:debug: checking route main for transactions
Vend::Order:debug: checking route copy_user for transactions
Vend::Order:debug: checking route wap for transactions
Start DEBUG at Thu Jun 5 03:04:34 2003
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=fname, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=lname, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=address1, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=city, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=country, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=multistate
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=state, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=multizip
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=zip, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=phone
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=phone_day, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=phone_day, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=email, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=email, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=email
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=email, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=end_profile,
message=end_profile set failed.
Vend::Order:debug: &Vend::Order::do_check returning val=Incomplete, var=, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=required
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=cvv2, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: OrderCheck = HASH(0x9b5d730) routine=length
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=cvv2, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1,
var=mv_credit_card_valid, message=
Vend::Order:debug: &Vend::Order::do_check returning val=Real-time Credit Card (%c
-- authorizenet), var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=, message=
Vend::Order:debug: &Vend::Order::do_check returning val=1, var=end_profile,
message=end_profile set failed.
Vend::Order:debug: &Vend::Order::do_check returning val=credit_card,
var=payment_method, message=payment_method set failed.
Vend::Order:debug: FINISH checking profile credit_card: Fatal=1 Final=1 Status=1
Vend::Payment:debug: actual map result: {
'pin' => undef,
'mv_order_number' => '2003010357',
'fname' => 'Philip',
'po_number' => '',
'mv_credit_card_exp_month' => 4,
'state' => 'MI',
'email' => 'me@you.com',
'b_country' => 'US',
'item_code' => undef,
'b_lname' => 'Hempel',
'b_name' => 'Philip Hempel',
'mv_credit_card_reference' => 3,
'tax_duty' => undef,
'address' => '8712 South Lake Road, Box 74',
'shipping' => undef,
'tender' => undef,
'check_account' => undef,
'cyber_mode' => 'mauthcapture',
'salestax' => undef,
'check_checktype' => undef,
'b_company' => 'Linux HardCore',
'name' => 'Philip Hempel',
'zip' => '49102',
'b_fname' => 'Philip',
'lname' => 'Hempel',
'b_address1' => 'Box 74',
'b_state' => 'MI',
'address1' => '8712 South Lake Road',
'comment2' => undef,
'phone_day' => '616-461-3214',
'b_address' => 'Box 74, 8712 South Lake Road',
'check_routing' => undef,
'mv_username' => 'philip',
'origin_zip' => undef,
'mv_credit_card_number' => '4111111111111111',
'phone_night' => '616-461-3214',
'b_city' => 'Berrien Center',
'mv_credit_card_exp_year' => '04',
'tax_exempt' => undef,
'city' => 'Berrien Center',
'company' => 'Linux HardCore',
'mv_credit_card_exp_all' => '04/04',
'b_zip' => '49102',
'check_accttype' => undef,
'country' => 'US',
'b_address2' => '8712 South Lake Road',
'item_desc' => undef,
'comment1' => undef,
'check_magstripe' => undef,
'address2' => 'Box 74',
'cvv2' => '555',
'check_transit' => undef,
'amount' => undef,
'comment' => undef,
'check_dl' => undef,
'corpcard_type' => undef,
'mv_credit_card_cvv2' => '555',
'check_number' => undef
}
Vend::Payment:debug: auth_code= order_id=030605030542581
Vend::Payment:debug: Authorizenet query: {
'x_Address' => 'Box 74, 8712 South Lake Road',
'x_Card_Code' => '555',
'x_Ship_To_City' => 'Berrien Center',
'x_First_Name' => 'Philip',
'x_Bank_Phone' => undef,
'x_Ship_To_State' => 'MI',
'x_Echeck_Type' => undef,
'x_Encap_Char' => '',
'x_State' => 'MI',
'x_Type' => 'AUTH_CAPTURE',
'x_Ship_To_Last_Name' => 'Hempel',
'x_Zip' => '49102',
'x_Bank_Acct_Type' => undef,
'x_Customer_IP' => '192.168.1.20',
'x_Test_Request' => 'TRUE',
'x_ADC_Delim_Data' => 'TRUE',
'x_Company' => 'Linux HardCore',
'x_Ship_To_Company' => 'Linux HardCore',
'x_Bank_Acct_Num' => undef,
'x_Method' => undef,
'x_Ship_To_First_Name' => 'Philip',
'x_Check_Num' => undef,
'x_Delim_Data' => 'TRUE',
'x_ADC_URL' => 'FALSE',
'x_Delim_Char' => ',',
'x_Ship_To_Country' => 'US',
'x_Bank_ABA_Code' => undef,
'x_Phone' => '616-461-3214',
'x_Auth_Code' => undef,
'x_Last_Name' => 'Hempel',
'x_Country' => 'US',
'x_Version' => '3.1',
'x_Email' => 'me@you.com',
'x_Ship_To_Address' => '8712 South Lake Road, Box 74',
'x_Tran_Key' => 'mytransid',
'x_Cust_ID' => 'philip',
'x_Login' => 'mylogincode',
'x_Ship_To_Zip' => '49102',
'x_City' => 'Berrien Center',
'x_Trans_ID' => '030605030542581',
'x_Invoice_Num' => '2003010357',
'x_Card_Num' => '4111111111111111',
'x_Exp_Date' => '0404',
'x_Amount' => '26.45'
}
Vend::Payment:debug:
authorizenet page: 1,1,1,This transaction has been
approved.,000000,P,0,2003010357,,26.45,CC,auth_capture,philip,Philip,Hempel,Linux
HardCore,Box 74, 8712 South Lake Road,Berrien
Center,MI,49102,US,616-461-3214,,me@you.com,Philip,Hempel,Linux HardCore,8712 South
Lake Road, Box 74,Berrien
Center,MI,49102,US,,,,,,F353BBDD77070BAE37A49031A0EE9B80,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
response: HTTP/1.1 200 OK
Vend::Payment:debug: authorizenet response_reason_text=This transaction has been
approved. response_code: 1 x_cvv2_resp_code=
Vend::Payment:debug: authorizenet result={
'x_address' => 'Box 74',
'pop.error-message' => 'This transaction has been approved.',
'x_city' => ' 8712 South Lake Road',
'x_avs_code' => 'P',
'x_first_name' => 'Philip',
'pop.avs_addr' => 'Box 74',
'x_response_reason_code' => '1',
'x_response_reason_text' => 'This transaction has been approved.',
'x_description' => '',
'x_trans_id' => '0',
'x_ship_to_country' => 'MI',
'pop.avs_code' => 'P',
'x_ship_to_first_name' => 'me@you.com',
'x_email' => '',
'x_cvv2_resp_code' => '',
'x_shipt_to_zip' => 'Berrien Center',
'x_ship_to_company' => 'Hempel',
'x_last_name' => 'Hempel',
'x_ship_to_city' => '8712 South Lake Road',
'x_method' => 'CC',
'x_country' => '49102',
'x_fax' => '616-461-3214',
'x_ship_to_address' => 'Linux HardCore',
'MStatus' => 'success',
'x_state' => 'Berrien Center',
'pop.avs_zip' => 'MI',
'x_type' => 'auth_capture',
'x_zip' => 'MI',
'x_tax' => '49102',
'x_freight' => '',
'pop.cvv2_resp_code' => '',
'pop.order-id' => '0',
'x_ship_to_last_name' => 'Philip',
'x_duty' => 'US',
'pop.status' => '1',
'x_auth_code' => '000000',
'pop.auth-code' => '000000',
'x_company' => 'Linux HardCore',
'x_md5_hash' => '',
'x_phone' => 'US',
'x_invoice_num' => '2003010357',
'x_ship_to_state' => ' Box 74',
'x_response_code' => 1,
'x_amount' => '26.45',
'x_po_num' => '',
'pop.invoice_num' => '2003010357',
'x_cust_id' => 'philip',
'order-id' => '030605030542581',
'x_response_subcode' => '1',
'x_tax_exempt' => ''
}
> Forgive me if I still don't understand your issue. I would think
> the following logic near the end of AuthorizeNet.pm would do it:
>
> if ($result{x_response_code} == 1) {
> $result{MStatus} = 'success';
> $result{'order-id'} ||= $opt->{order_id};
> }
> else {
> $result{MStatus} = 'failure';
> delete $result{'order-id'};
>
> [...AVS error stuff, perhaps...]
>
> if ($result{x_cvv2_resp_code} eq 'N') {
> my $msg = $opt->{message_cvv2} ||
> q{Sorry, your credit card security code does not match.
> The bank returned the following error: %s};
> $result{MErrMsg} = errmsg($msg,
> $result{x_response_reason_text});
> }
>
> [... elsif P S U codes with nice messages, plus else with
> catchall...]
>
> }
> #::logDebug(qq{authorizenet result=} . uneval(\%result));
> return (%result);
>
>
> I'm still not sure if I'm missing something you are saying. With the logic
> above, you can give fairly specific error messages for each type of failure.
>
> Good luck!
> John Young
> (in digest mode, hence the delays in responding)
Thanks for the help, I know that the logs are kinda long as well.
--
debian/rules