Jump to content

Authorize.net AIM Integration


Al Brookbanks

Recommended Posts

Guest anhtruong

Hi,

I'm trying to set up Authorize.net AIM wih InternetSecure. Now according to InternetSecure, it can emulate authorize.ent AIM, to enable it to work I would just have to change https://secure.authorize.net/gateway/transact.dll to https://secure.internetsecure.com/process.cgi instead. as well as set x_login to my merchant account number. I did this both through the admin area as well as be editing x_login in the PHP file directly. Everything seems to work until you actually submit the payment. I get this error:

Authorize.Net

Advanced Implementation Method (AIM)

Debug Info:

01: Post the transaction (see the code for specific information):

02: Get post results:

We cannot process your transaction.

You are reading this page because one of the following errors has occurred

Cannot find one or any of these variables: MerchantNumber, Products, ReturnURL or ReturnCGI

The MerchantNumber is not valid.

The Merchant does not have an active account in the requested currency.

The Products string is not in a recognizable format.

Please notify the merchant about this error. Thank you.

03: Parse post results (simple approach)

We cannot process your transaction.

You are reading this page because one of the following errors has occurred

Cannot find one or any of these variables: MerchantNumber, Products, ReturnURL or ReturnCGI

The MerchantNumber is not valid.

The Merchant does not have an active account in the requested currency.

The Products string is not in a recognizable format.

Please notify the merchant about this error. Thank you.

04: Parse the results string into individual, meaningful segments:

Length of the returned string from Authorize.Net: 830

Number of delimiter characters in the returned string: 0

1:

We cannot process your transaction.

You are reading this page because one of the following errors has occurred

Cannot find one or any of these variables: MerchantNumber, Products, ReturnURL or ReturnCGI

The MerchantNumber is not valid.

The Merchant does not have an active account in the requested currency.

The Products string is not in a recognizable format.

Please notify the merchant about this error. Thank you.

04: Done.

Does anyone know what I should do to resolve this error? Furthermore, why doesnt CubeCart some with AIM already??? The tech support guys at internetsecure were speaking as if AIM is something that most carts come with (I dont know if this is true) Any help would be appreciated. Thanks

Link to comment
Share on other sites

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

Guest anhtruong

One more thing. SIM worked fine (I changed the same things as mentioned above), but I was told by InternetSecure AIM should work too

Link to comment
Share on other sites

Guest roninjotatan

does anyone know if this mod can work with 2checkout.com (2co)? I am having problems getting my hosting company to enable mhash so i am trying this mod... i am having some problems is there any changes i have to do to set it up?

Link to comment
Share on other sites

  • 2 weeks later...

I think I've discovered a minor bug in this gateway module that may appear in others as well.

If a customer goes through the checkout process and completes everything until the very last screen (the Authorize AIM screen where they need to enter their credit card info) and then just keeps that page open for a very long time before clicking "Continue", their session will have timed out but their order will be processed anyway. They won't be notified that they've been logged out until they are returned to the confirmation page. They are not sent a confirmation email, the one that is sent to the administrator is mostly blank, and the info saved into the order_sum table is incomplete (customer number 0) and therefore the order doesn't show up in the Orders list (although if you manually correct the data in the order_sum table it reappears).

So it seems to me as if there should be some other timeout code on this page. Perhaps something as simple as a meta refresh or JavaScript location.href to the main cart.php page after the session time is expired. Anyone else dealt with this issue (on this or any other gateway)?

Link to comment
Share on other sites

So I've just added the following to my global/cart.tpl:

<meta http-equiv="refresh" content="1440">

I used 1440 seconds because that's what my server's setting for maximum session life is (that's the PHP 4 default value). That's 24 minutes (for all of you who were rushing to open your calculator app), which is probably much longer than anyone would hem and haw over any form they intend to complete. But then again there's really no predicting people, so it's best to play it safe.

The idea is that after 24 minutes their session info should be invalid and so refreshing the page should make CC boot them back to the "You have been logged out" screen. This seems like it would be a good idea in general, no? Anyone else have experience with this?

Link to comment
Share on other sites

Hmm... Except it doesn't seem to work that way. Instead it boots them back to the last page they have completed, so it acts as sort of a "keep-alive" function for the session.

That's probably OK, I guess. It could be a security issue if someone leaves their browser open, but that's something that people ought to know better than to do and which would still be a problem during those first 24 minutes even without this code. But just in case I'm going to change it to this:

<meta http-equiv="refresh" content="1440;url=http://www.yourserver.com/index.php?act=logout">

Link to comment
Share on other sites

  • 3 weeks later...
Guest bluegrassdigital

I'll bundle this module in 3.0.11 ;)

I just downloaded 3.0.11 and installed it. This is what I get from Debug:

01: Post the transaction (see the code for specific information):

02: Get post results:

03: Parse post results (simple approach)

04: Parse the results string into individual, meaningful segments:

Length of the returned string from Authorize.Net: 0

Number of delimiter characters in the returned string: 0

1:

04: Done.

It doesn't do anything when I try and submit the order, Transaction key key and login ID are correct. Not sure what to even do now as it's seems like it's not even attempting to contact authorize.net? :)

Link to comment
Share on other sites

  • 2 weeks later...

It doesn't do anything when I try and submit the order, Transaction key key and login ID are correct. Not sure what to even do now as it's seems like it's not even attempting to contact authorize.net? :rolleyes:

I'm having the same issue. Any word on this? For the record I'm on a GoDaddy hosting account... possibly notable since Godaddy doesn't support the mhash() function that Authorize.net uses. This was a problem with the previous Authorize module and gave an error. That particular mhash error is gone with this new AIM compliant module so I'm not sure if that is still a concern.

Otherwise everything is great, but this is a major blocker so If anyone has any suggestions or can help pinpoint if this is a CC issue or a hosting issue that would be great!

Thanks,

Gabe

Link to comment
Share on other sites

Guest bluegrassdigital

I never did figure it out. I had powweb as a host. It worked fine until powweb did a major change and since my account was about to expire, I moved to Bluehost and now it works perfectly.

Link to comment
Share on other sites

Thanks for the fast reply... I've come to the same conclusion and have successfully moved to Dreamhost where everything works fine.

For anyone reading this, the reason that Godaddy doesn't work is that apparently AIM requires connection on a specific port that Godaddy won't open. Something to possibly check out with a host for those having similar connection issues.

Link to comment
Share on other sites

Guest fulmater

Mine does the same thing I submit an order and click the submit it changes screens to the index home page and my item is still in the shopping cart. It does not seem to even do any thing but change screens with the AIM integrated with cc 3.0.11.

What port is it looking for so I can open my port just in case thats my problem.

Thanks

Link to comment
Share on other sites

  • 3 weeks later...

;) Every thing in the authorize.net - AIM fix is working fine. Had to add a small fix to form.inc.php:

add about line 54 "x_card_code" => $_POST['cvc2'],

That transfers the cvv2 to authorize.net.

My problem is when Authorize.net reurns the info it does not set the order to 'Processing'.

I am using all digital and the shipping is set to free.

Some command appears to be missing to set order to 'Processing'.

Is there a fix or am I missing something?

metromkt

Link to comment
Share on other sites

Guest katherinedenger

Apparently, this script is set for automatic processing. Is there a way to set it up so that it does manual processing? My client wants to be able to manually log into Authorize.net and approve the transaction only when he is about to ship the item.

Thanks!

I would also like to be able to set it up so that the processing is manual. I need it to authorize, but not capture, then go and log into authorize.net to manually capture when the item is shipped. I looked in the authorize.net gateway files but am not familiar enough with it to figure out what needs changing. Thanks in advance!

Link to comment
Share on other sites

Guest katherinedenger

Apparently, this script is set for automatic processing. Is there a way to set it up so that it does manual processing? My client wants to be able to manually log into Authorize.net and approve the transaction only when he is about to ship the item.

Thanks!

I would also like to be able to set it up so that the processing is manual. I need it to authorize, but not capture, then go and log into authorize.net to manually capture when the item is shipped. I looked in the authorize.net gateway files but am not familiar enough with it to figure out what needs changing. Thanks in advance!

Well, I found the other thread dealing with this issue. oops. and I think that part of it is working.

It seems like a lot of people need the "securesource" version of this mod, that includes the country code and other info, like invoice, etc... It seems like it sure would be helpful if that version were in cubecart 3.0.11 and 3.0.12, rather than the version that doesn't have this extra code in it. Maybe it will be in 3.1.0?

Link to comment
Share on other sites

:( Every thing in the authorize.net - AIM fix is working fine. Had to add a small fix to form.inc.php:

add about line 54 "x_card_code" => $_POST['cvc2'],

That transfers the cvv2 to authorize.net.

My problem is when Authorize.net reurns the info it does not set the order to 'Processing'.

I am using all digital and the shipping is set to free.

Some command appears to be missing to set order to 'Processing'.

Is there a fix or am I missing something?

metromkt

I have looked throght the entire BBS. I can't find an answer to my post.

Simply, when using authorize.net - Aim authorize.net returns the info. however, it does not set the order to 'Processing'. It stays at Pending. Using SIM method it does set the order to Proccessing.

Link to comment
Share on other sites

  • 2 weeks later...

I'm sure many of you may find this useful:

To get Authorize to email a reciept to the customer and merchant...

Please open the file:

\modules\gateway\Authorize_AIM\form.inc.php

Towards the top you will find:

$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_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"],

		"CustomerBirthMonth"	=> "",

		"CustomerBirthDay"		=> "",

		"CustomerBirthYear"		=> "",

		"SpecialCode"			=> "",

	

	);




As you can see it doesn't include the email. To include it please the parameter for email.



You'll need to add the line somewhere in that code:




"x_email"		=> $ccUserData[0]['email'], // This is the customers email

"x_email_customer"		=> TRUE,  // This tells Authorize to email the customer

"x_merchant_email" 		=> $config['masterEmail'], // This sends a copy to the merchant too

I hope that helps.

Link to comment
Share on other sites

  • 2 weeks later...
Guest ddcrank

I have looked throght the entire BBS. I can't find an answer to my post.

Simply, when using authorize.net - Aim authorize.net returns the info. however, it does not set the order to 'Processing'. It stays at Pending. Using SIM method it does set the order to Proccessing.

Did you ever find an answer?

I'm trying to find and fix the same problem myself.

crank!

Link to comment
Share on other sites

Guest ddcrank

FYI: I found an answer (I believe it's correct) to the Authorize_AIM module not advancing the state of the purchase after receiving the approved response:

At the end of the transfer.inc.php file (line 124-ish) is an option called

$stateUpdate = FALSE;
 which just needs to be changed to 
$stateUpdate = TRUE;

.

This seems to have done the trick for me.

crank!

Link to comment
Share on other sites

FYI: I found an answer (I believe it's correct) to the Authorize_AIM module not advancing the state of the purchase after receiving the approved response:

At the end of the transfer.inc.php file (line 124-ish) is an option called

$stateUpdate = FALSE;
 which just needs to be changed to 
$stateUpdate = TRUE;

.

This seems to have done the trick for me.

crank!

Thanks ddcrank,

That is the fix. It works perfectly.

metromkt

Link to comment
Share on other sites

Guest skelly77

Glad you got things working. Enjoy.

As far as the shipping info stuff... thats another forum and thread. This is for Authorize issues. :(

Actually I think that this is an Authorize issue. I don' receive the shipping fields in the confirmation emails as well. I noticed in the form.inc.php file the following fields are missing in the "$authnet_values = array" section:

"x_ship_to_first_name" => $_POST["shipfirstName"],

"x_ship_to_last_name" => $_POST["shiplastName"],

"x_ship_to_company" => $_POST["shipCompany"],

"x_ship_to_address" => $_POST["shipaddress"],

"x_ship_to_city" => $_POST["shipcity"],

"x_ship_to_state" => $_POST["shipstate"],

"x_ship_to_zip" => $_POST["shipzip"],

"x_ship_to_country" => $_POST["country"],

The values on the left are valid field names from the AIM_guide.PDF. The values in the POST function I made up but are obviously not what CubeCart is looking for. Since I am still not getting the shipping fields in my confirmation email, I assume that the field names in the POST function correspond to CubeCart fieldd names from the payment form. Can anyone tell me what the actual field names are so that I can modify the form.inc.php?

Thanks,

Scot Kelly

Artistream.com

Link to comment
Share on other sites

Can anyone please explain what is meant in transfer.inc.php under the 'Fixed Vars' comment about the country code?

$ccUserData[0]['country']	- Invoice country Id we can look up the country name like this

										countryName($ccUserData[0]['country']);

I would like to see the country ISO instead of the table id on my auth.net invoice but I don't understand what must be done with the supplied info.

Thanks!

skelly77,

have you looked at the file I'm asking about? I'm also attaching the AIM Guide from Auth.net to this post. I hope that's ok?

Link to comment
Share on other sites

Guest skelly77

Can anyone please explain what is meant in transfer.inc.php under the 'Fixed Vars' comment about the country code?

$ccUserData[0]['country']	- Invoice country Id we can look up the country name like this

										countryName($ccUserData[0]['country']);

I would like to see the country ISO instead of the table id on my auth.net invoice but I don't understand what must be done with the supplied info.

Thanks!

skelly77,

have you looked at the file I'm asking about? I'm also attaching the AIM Guide from Auth.net to this post. I hope that's ok?

Dibber,

I have looked at the file you are asking about and I have read portions of the AIM Guide. I am fairly new to Cube Cart as well as PHP but have had some success in troubleshooting various problems so far. What I think would help both you and me would be a develper's guide that listed the field names for all of the customer /product/shipping/etc. data that is captured in Cube Cart and what the fields are used for. These could then be matched up to the AIM guidelines for customizing the invoices and confirms sent. Does anyone know if such a development guide exists?

Scot Kelly

Artistream.com

Link to comment
Share on other sites

Can anyone please explain what is meant in transfer.inc.php under the 'Fixed Vars' comment about the country code?

$ccUserData[0]['country']	- Invoice country Id we can look up the country name like this

										countryName($ccUserData[0]['country']);




I would like to see the country ISO instead of the table id on my auth.net invoice but I don't understand what must be done with the supplied info.



Thanks!



skelly77,



have you looked at the file I'm asking about?  I'm also attaching the AIM Guide from Auth.net to this post.  I hope that's ok?
Dibber, I have looked at the file you are asking about and I have read portions of the AIM Guide. I am fairly new to Cube Cart as well as PHP but have had some success in troubleshooting various problems so far. What I think would help both you and me would be a develper's guide that listed the field names for all of the customer /product/shipping/etc. data that is captured in Cube Cart and what the fields are used for. These could then be matched up to the AIM guidelines for customizing the invoices and confirms sent. Does anyone know if such a development guide exists? Scot Kelly Artistream.com
Scot, You didn't mention which version of CC you're using but in 3.0.12 (and I don't know otherwise) the answers to your problem, as I understand it, are /* commented */ at the top of transfer.inc.php which is what I was inquiring about. Here is what my form.inc.php looks like (for delivery details) and it seems to be working without error: :) Edit: On second thought, I should probably go ahead and post the whole comment..?

		"x_ship_to_first_name"	=> $basket['delInf']['firstName'],

		"x_ship_to_last_name"	=> $basket['delInf']['lastName'],

		"x_ship_to_address"		=> $basket['delInf']['add_1'].' '.$basket['delInf']['add_2'], // cat because auth.net provides no second address line to my knowledge

		"x_ship_to_city"		=> $basket['delInf']['town'],

		"x_ship_to_state"		=> $basket['delInf']['county'],

		"x_ship_to_zip"			=> $basket['delInf']['postcode'],

		"x_ship_to_country"		=> $basket['delInf']['country'],




Sorry for the delay in response, I always forget to tick the box to alert me to replies  
version 3.0.12 ./modules/gateway/Authorize_AIM/transfer.inc.php



/*

//////////////////////////

// IPAY GATEWAY

//////////////////////////

// L@@K AT ALL THE LOVELY 

// VARIABLES WE HAVE TO

// PLAY WITH!!

//////



//////////////////////////

// IN THE REPEATED REGION

//////

$orderInv['productId']						- product id as an integer

$orderInv['name']							- product name as a varchar

$orderInv['price']							- price of each product (inc options)

$orderInv['quantity']						- quantity of products as an integer

$orderInv['product_options']				- products attributes as test

$orderInv['productCode']					- product code as a varchar

$i											- This is the current incremented integer starting at 0



/////////////////////////

// FIXED VARS

///////

$cart_order_id							- cart order id as a varchar

$ccUserData[0]['email']						- Customers email address

$ccUserData[0]['title']						- Customers title (Mr Miss etc...)

$ccUserData[0]['firstName']					- Customers first name

$ccUserData[0]['lastName']					- Customers last name 

$ccUserData[0]['add_1']						- Invoice Address line 1

$ccUserData[0]['add_2']						- Invoice Address line 1

$ccUserData[0]['town']						- Invoice Town or city

$ccUserData[0]['county']					- Invoice County or state

$ccUserData[0]['postcode']					- Invoice Post/Zip Code

$ccUserData[0]['country']					- Invoice country Id we can look up the country name like this

										countryName($ccUserData[0]['country']);

$ccUserData[0]['phone']						- Contact phone no

$ccUserData[0]['mobile']					- Mobile/Cell phone number



$basket['delInf']['title']				- Delivery title (Mr Miss etc...)

$basket['delInf']['firstName']			- Delivery customers first name

$basket['delInf']['lastName']			- Delivery customers last name 

$basket['delInf']['add_1']				- Delivery Address line 1

$basket['delInf']['add_2']				- Delivery Address line 2 // <- edited from original :)

$basket['delInf']['town']				- Delivery Town or city

$basket['delInf']['county']				- Delivery County or state

$basket['delInf']['postcode']			- Delivery Post/Zip Code

$basket['delInf']['country']			- Delivery  country Id we can look up the country name like this	

									countryName($basket['delInf']['country']);





$basket['subTotal'] 					- Order Subtotal (exTax and Shipping)

$basket['grandTotal']					- Basket total which has to be paid (inc Tax and Shipping).

$basket['tax']							- Total tax to pay

$basket['shipCost']						- Shipping price

////////////////////////////////////////////////////////

*/
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...