Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Authorize.net AIM and InternetSecure Gateway

Authorize.net AIM and InternetSecure Gateway

Views: 1,160

Results 1 to 6 of 6
22 Nov 2015, 6:59 PM
#1
crestlinecorp avatar

crestlinecorp

New Zenner

Join Date:
Nov 2015
Location:
Salem, Oregon
Posts:
4
Plugin Contributions:
0

Authorize.net AIM and InternetSecure Gateway

I have been working on upgrading from 1.3.7 to 1.5.1 and I have run into problems with getting the payment module to work properly.

I have changed the URLs to point to internetsecure
I have removed the hash

The payment goes through but it does not complete the order and returns the site to a page that displays : "Whoops! Your session has expired.
If you were placing an order, please login and your shopping cart will be restored. You may then go back to the checkout and complete your final purchases.

If you had completed an order and wish to review it, or had a download and wish to retrieve it, please go to your My Account page to view your order."

and then logs you out.

InternetSecure emails me the approval and the transaction is completed, however zencart acts as though the payment didn't go through.

Any advise would be helpful.

-Graham

23 Nov 2015, 3:49 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Authorize.net AIM and InternetSecure Gateway

The module available for internetsecure is very old and most likely does not contain the correct coding for it to operate correctly
https://www.zen-cart.com/downloads.php?do=file&id=58

23 Nov 2015, 7:03 PM
#3
crestlinecorp avatar

crestlinecorp

New Zenner

Join Date:
Nov 2015
Location:
Salem, Oregon
Posts:
4
Plugin Contributions:
0

Re: Authorize.net AIM and InternetSecure Gateway

kobra:

The module available for internetsecure is very old and most likely does not contain the correct coding for it to operate correctly
https://www.zen-cart.com/downloads.php?do=file&id=58

I am using the built-in authorize.net AIM payment module. I modified the code per past instructions by changing the URL and commenting out the HASH code.

The payment is processed however the shopping cart does not recognize this and does not record the order.

Is there a way to find out why it errored?

Internet secure and the debug code emails me with a sucessfull transaction but zencart does not.

Thanks for your reply

I was hoping DrByte might see this and give me some insight.

-Graham

24 Nov 2015, 1:40 AM
#4
crestlinecorp avatar

crestlinecorp

New Zenner

Join Date:
Nov 2015
Location:
Salem, Oregon
Posts:
4
Plugin Contributions:
0

Re: Authorize.net AIM and InternetSecure Gateway

crestlinecorp:

I am using the built-in authorize.net AIM payment module. I modified the code per past instructions by changing the URL and commenting out the HASH code.

The payment is processed however the shopping cart does not recognize this and does not record the order.

Is there a way to find out why it errored?

Internet secure and the debug code emails me with a sucessfull transaction but zencart does not.

Thanks for your reply

I was hoping DrByte might see this and give me some insight.

-Graham

I have made some more changes to the code, commenting out related HASH code.

The shopping cart is not going to completion, but going back to step 2 and giving and error of this:

Error - Your credit card could not be authorized for this reason. Please correct the information and try again or contact us for further assistance.

HOWEVER - the payment goes through on Internetsecure's side.

Code Changed:

Line 88://        if (strlen(MODULE_PAYMENT_AUTHORIZENET_AIM_MD5HASH) > 20) $this->title .= '<span class="alert"> (NOTE: MD5 Hash key too long)</span>';
Line 381:    //$response['Expected-MD5-Hash'] = $this->calc_md5_response($response[6], $response[9]);
    //$response['HashMatchStatus'] = ($response[37] == $response['Expected-MD5-Hash']) ? 'PASS' : 'FAIL';
Line 402: //    if ($response['HashMatchStatus'] != 'PASS' && defined('MODULE_PAYMENT_AUTHORIZENET_AIM_MD5HASH') && MODULE_PAYMENT_AUTHORIZENET_AIM_MD5HASH != '') {
//      $this->order_status = 1;
//      $messageStack->add_session('header', MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_AUTHENTICITY_WARNING, 'caution');
//    }
Line 480: //    $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function) values ('MD5 Hash', 'MODULE_PAYMENT_AUTHORIZENET_AIM_MD5HASH', '*Set A Hash Value at AuthNet Admin*', 'Encryption key used for validating received transaction data (MAX 20 CHARACTERS, exactly as you entered in Authorize.net account settings). Or leave blank.', '6', '0', now(), 'zen_cfg_password_display')");
Line 507:     return array('MODULE_PAYMENT_AUTHORIZENET_AIM_STATUS', 'MODULE_PAYMENT_AUTHORIZENET_AIM_LOGIN', 'MODULE_PAYMENT_AUTHORIZENET_AIM_TXNKEY', /*'MODULE_PAYMENT_AUTHORIZENET_AIM_MD5HASH', */'MODULE_PAYMENT_AUTHORIZENET_AIM_TESTMODE', 'MODULE_PAYMENT_AUTHORIZENET_AIM_AUTHORIZATION_TYPE', 'MODULE_PAYMENT_AUTHORIZENET_AIM_STORE_DATA', 'MODULE_PAYMENT_AUTHORIZENET_AIM_EMAIL_CUSTOMER', 'MODULE_PAYMENT_AUTHORIZENET_AIM_EMAIL_MERCHANT', 'MODULE_PAYMENT_AUTHORIZENET_AIM_USE_CVV', 'MODULE_PAYMENT_AUTHORIZENET_AIM_SORT_ORDER', 'MODULE_PAYMENT_AUTHORIZENET_AIM_ZONE', 'MODULE_PAYMENT_AUTHORIZENET_AIM_ORDER_STATUS_ID', 'MODULE_PAYMENT_AUTHORIZENET_AIM_REFUNDED_ORDER_STATUS_ID', 'MODULE_PAYMENT_AUTHORIZENET_AIM_DEBUGGING');
Line 531:     $url = 'https://secure.internetsecure.com/process.cgi';
25 Nov 2015, 9:44 PM
#5
crestlinecorp avatar

crestlinecorp

New Zenner

Join Date:
Nov 2015
Location:
Salem, Oregon
Posts:
4
Plugin Contributions:
0

Re: Authorize.net AIM and InternetSecure Gateway

I decided to start over by starting with the original authorize.net AIM module.

I only updated the URL to internet secures URL

After attempting a payment I get returned back to step 2 of 3 with the respond "Error - Your credit card could not be authorized for this reason. Please correct the information and try again or contact us for further assistance."

Internetsecure approves the transaction and captures it. My website goes to the above error. And the following is the response:

Nov-25-2015 01:18:38

Response Code: 1|1|000|This transaction has been
approved.|515281|Y|1472832847.47A1|2-jQPWrE|test (qty: 1)
|0.01|CC|auth_capture|1||||*** ******* **
||OR|97304|US|5555551212||gkuberski######################|||||||||0.00|0.00|0.00|FALSE|Nov-25-2015
01:18:36||M||||||||||||||||||||||||||||||USD|FALSE|November 25, 2015, 1:18
pm|0ugjd
************|FALSE|67.44..|TRUE|1404.
Response Text:

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.01
[x_currency_code] => USD
[x_card_num] => XXXXXXXXXXXXXXXX2485
[x_exp_date] => 1016
[x_card_code] => ****
[x_email_customer] => TRUE
[x_email_merchant] => TRUE
[x_cust_id] => 1
[x_invoice_num] => 2-jQPWrE
[x_first_name] => ******** <-obfuscated intentionally
[x_last_name] => ******** <-obfuscated intentionally
[x_company] =>
[x_address] => ******** <-obfuscated intentionally
[x_city] => ******** <-obfuscated intentionally
[x_state] => ******** <-obfuscated intentionally
[x_zip] => ******** <-obfuscated intentionally
[x_country] => United States
[x_phone] => 5555551212
[x_email] => ###################### <-obfuscated intentionally
[x_ship_to_first_name] =>
[x_ship_to_last_name] =>
[x_ship_to_address] =>
[x_ship_to_city] =>
[x_ship_to_state] =>
[x_ship_to_zip] =>
[x_ship_to_country] =>
[x_description] => test (qty: 1)
[x_recurring_billing] => NO
[x_customer_ip] => 67.44.
.
<-obfuscated intentionally
[x_po_num] => Nov-25-2015 01:18:36
[x_freight] => 0.00
[x_tax_exempt] => FALSE
[x_tax] => 0.00
[x_duty] => 0
[x_allow_partial_Auth] => FALSE
[Date] => November 25, 2015, 1:18 pm
[IP] => 67.44.
.**
[Session] => 0ugjd*************** <-obfuscated intentionally
[url] => https://secure.internetsecure.com/process.cgi
)

Results Received back from Authorizenet: Array
(
[0] => Response from gateway
[1] => 1|1|000|This transaction has been
approved.|515281|Y|1472832847.47A1|2-jQPWrE|test (qty: 1)
|0.01|CC|auth_capture|1||||**** ****** **
|
|OR|97304|US|5555551212||######################|||||||||0.00|0.00|0.00|FALSE|Nov-25-2015
01:18:36||M||||||||||||||||||||||||||||||USD|FALSE|November 25, 2015, 1:18
pm|0ugjd
*********|FALSE|67.44..|TRUE|1404
[Expected-MD5-Hash] => ED2058C578511461084BD84B9A51D3CE
[HashMatchStatus] => FAIL
)

CURL communication info: Array
(
[url] => https://secure.internetsecure.com/process.cgi
[content_type] => text/html; charset=UTF-8
[http_code] => 200
[header_size] => 230
[request_size] => 1112
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 1.365167
[namelookup_time] => 0.266674
[connect_time] => 0.286255
[pretransfer_time] => 0.324007
[size_upload] => 928
[size_download] => 373
[speed_download] => 273
[speed_upload] => 679
[download_content_length] => 373
[upload_content_length] => 928
[starttransfer_time] => 1.365155
[redirect_time] => 0
[certinfo] => Array
(
)

[primary_ip] => 198.203.***.*** <-obfuscated intentionally
[primary_port] => 443
[local_ip] => 173.236.***.*** <-obfuscated intentionally
[local_port] => 47123
[redirect_url] =>

)

RAW data received:
1|1|000|This transaction has been
approved.|515281|Y|1472832847.47A1|2-jQPWrE|test (qty: 1)
|0.01|CC|auth_capture|1||||**** ******* **
|
|OR|97304|US|5555551212||######################|||||||||0.00|0.00|0.00|FALSE|Nov-25-2015
01:18:36||M||||||||||||||||||||||||||||||USD|FALSE|November 25, 2015, 1:18
pm|0ugjd
*******|FALSE|67.44.193.221|TRUE|14041

26 Nov 2015, 11:05 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Authorize.net AIM and InternetSecure Gateway

[Expected-MD5-Hash] => ED2058C578511461084BD84B9A51D3CE
[HashMatchStatus] => FAIL
Think this explains it