Jump to content
Sign in to follow this  
dkap

Authorize.net questions

Recommended Posts

I suppose that would be a good reason, but are you sure it's true? I'm 99% positive I've seen situations where cards are charged prior to shipment for things like computer orders, partial shipments on movie pre-orders, etc. Maybe there are exceptions to the rule?

 

At any rate, my products are all electronic delivery...

 

Dan

Share this post


Link to post
Share on other sites

Thanks for all the help Dan!

 

how can I fix these things you noticed in the #1453 contrib I'm using

 

You said:

"It also retains the unwise JavaScript requirement for a non-empty CVV submission in authorizenet.php. That's a sure way to generate failed transactions... Ditto for the incorrect $response[0] processing still being there in authorizenet.php"

 

How do I fix the unwise Javascript for a non-empty CVV? I'm not sure I completely understand the $response[0] thing?

 

did you fix these things in your #613 contrib update?

 

do you mind sharing these fixes?

 

thanks!!!!

 

-tom

Share this post


Link to post
Share on other sites

There are a couple of these Anet/CVV threads running in parallel, so it might be the other one I discussed the JavaScript fix in...

 

In authorizenet.php, change the following line:

 

'    if (cc_cvv == "" || cc_cvv.length < "3") {' . "\n".

 

to:

 

'    if (cc_cvv != "" && cc_cvv.length < "3") {' . "\n".

 

The first method does not allow a non-blank CVV submission, whereas the second one only checks for minimum CVV length if the field is not blank. Much more reliable approach.

 

not sure I completely understand the $response[0] thing?

Also in authorizenet.php,

 

$response_vars = explode(',', $response[0]);

 

should be:

 

$response_vars = explode(',', $response);

 

The first one will technically work, at least in most cases, but it's iffy at best and can easily break down depending on the response.

 

did you fix these things in your #613 contrib update?

I actually haven't posted any contributions. :) Just working with others' for the time being.

 

Dan

Share this post


Link to post
Share on other sites

You can charge a customer's credit card in advance of shipment provided:

 

1. The merchant has every reason to believe that s/he will be able to ship the product within 30 days; or

 

2. It is clearly communicated to the customer that the item will not be shipped at the time the charge is processed, but will be shipped at a future point disclosed to the customer.

 

BTW, I have learned today from AuthorizeNet that if a merchant has an active shopping cart and is trying to upgrade to the new AIM system, AuthorizeNet will provide the merchant with a separate "Testing Account."

 

In my case it allows me to test my new osCommerce cart while my PerlShop cart continues to process orders through WebLink.

Share this post


Link to post
Share on other sites
BTW, I have learned today from AuthorizeNet that if a merchant has an active shopping cart and is trying to upgrade to the new AIM system

 

FYI - AIM is not new. It's always been available as the Direct Connect method. Nothing's changed except the name.

Share this post


Link to post
Share on other sites

Yes AuthorizeNet rebrands its products often, and resellers rebrand the AuthorizeNet product, selling it under different names as their own. Marking it up to merchants as it rolls through the distribution channels.

Edited by TBK3

Share this post


Link to post
Share on other sites

Dan,

Wanted to thank you for your help. My website is up and running. It is in production mode and the credit card transaction seems to be running smoothly!

 

Appreciate all your help.

 

Anaam.

 

If you want to check out my site: www.staypumped.com

The OS Commerce Catalog is at: www.staypumped.com/catalog

If you want to help me, buy a product B)

Share this post


Link to post
Share on other sites

Hey all/Dan,

 

Got another question. Just found that the shipping address change doesn't work... the problem once a user creates the account with, lets say, his work address and then goes ahead to buy a product, s/he then goes to change the billing address for the credit card to his credit card address, lets say, his home address. On authorizenet_direct.php the variables:

 

x_First_Name => "{$order->customer['firstname']}",

x_Last_Name => "{$order->customer['lastname']}",

x_Address => "{$order->customer['street_address']}",

x_City => "{$order->customer['city']}",

x_State => "{$order->customer['state']}",

x_Zip => "{$order->customer['postcode']}",

 

still carry the original value of the work address. I'm guessing the $order variable should be reset somewhere, maybe at the checkout_new_address.php page??

 

Any help is much appreciated. Thank you.

 

Anaam

Share this post


Link to post
Share on other sites

Guys,

I've solved this problem. The issue resides within authorizenet_direct.php file.

 

The portion should read as follows:

 

x_First_Name => "{$order->customer['firstname']}",

x_Last_Name => "{$order->customer['lastname']}",

x_Address => "{$order->billing['street_address']}",

x_City => "{$order->billing['city']}",

x_State => "{$order->billing['state']}",

x_Zip => "{$order->billing['postcode']}",

 

You can see that before it used to read $order->customer['street_address'] and now they read $order->billing['street_address'] and so on. Similarly, below in the file we have the portion for the shipping address, which is correct.

 

Thanks,

 

Anaam.

Share this post


Link to post
Share on other sites

Good find. Probably worth doing the same for x_first_name and x_last_name for consistency, although it doesn't really matter since the customer name is never even used in the transaction...

 

Similarly, below in the file we have the portion for the shipping address, which is correct.

That part uses $order->delivery['...'] instead of $order->customer['...'], which I guess is what makes the most sense, since all you need in the transaction info is: a) their billing info, and B) their ship-to address for shippable goods. The $order->customer['...'] probably shouldn't even enter into the transaction anywhere, other than maybe phone number.

 

Dan

Share this post


Link to post
Share on other sites

You know, now that I look at it, I'm not even clear on how the billing address is handled within osCommerce. You don't get a chance to set it differently from the shipping address until you reach the payment page, and there's nothing I can find in the customers table that indicates which one is the billing address. There's the 'customers_default_address_id' field, which after I changed my billing address still showed the shipping address entry, but nothing else I can see...

 

The odd thing is, it properly sends the billing info when the transaction is submitted. I just don't quite see how.

 

I did have a customer yesterday complaining about the system not allowing him to proceed even after he changed his majorly screwed up address, so I'm thinking the billing thing may have been coming into play.

 

Dan

Share this post


Link to post
Share on other sites

Dan,

 

You know, now that I look at it, I'm not even clear on how the billing address is handled within osCommerce. You don't get a chance to set it differently from the shipping address until you reach the payment page, and there's nothing I can find in the customers table that indicates which one is the billing address.

 

Yes I was confused at first with this too but I realized that during the checkout process the billing address was defaulted to the customer address. At the page for billing/cc confirmation, the $orders->billing variables gets populated either with the default (customer address) or with the new addition the user might make.

 

So by using the $orders->billing, you are safe as that variable gets populated prior to sending the transaction to Authorize.net.

 

Anaam.

Share this post


Link to post
Share on other sites

Seems like a rather goofy way of doing things, but I suppose it's just a variation of the typical "click for billing address same as shipping address" approach.

 

Dan

Share this post


Link to post
Share on other sites

One question. In order to get the authorize.net contribution to work, is it required to have the following setting set within the Authorize.net account?

 

1) Default Receipt URL

2) Default Relay Response URL

 

If yes, I would assume the the value is "https://www.mystore.com/catalog//checkout_process.php", correct?

 

Additionally, I am getting the error "There has been an error processing your credit card. Please try again.", what codes to I have to add to the authorizenet.php file in order to see the true error instead of this generic message?

 

Thanks in advance for any help.

-Tuan

Share this post


Link to post
Share on other sites
It is indeed odd. I haven't quite figure out how it's passing the following condition...

 

if ($x_response_code != '1') {
?tep_redirect(tep_href_link(..., 'error_message=' . urlencode(...), 'SSL', true, false));
}

I'm thinking the != '1' portion is unintentionally being treated the same as == 'false', which sort of makes sense in that it would be a false condition due to processing $response wrong, but doesn't make sense in that I would expect the code to choke prior to that.

 

If I'm right about that, then it would never return a negative response from Authorize.net. Details...

 

That's my best guess, at any rate. :)

 

Dan

A bit delayed in getting here...looking for feedback on Authorize.net Consolidated. For those running it who want to make suggestions for my next revision, please go here:

 

http://forums.oscommerce.com/index.php?act=ST&f=2&t=54791

 

I have a few days free to sit down and do some heavy duty coding, and whereas I was adding new features in the previous versions I am also rewriting the code I based my code off of (which had some serious issues in it and definitely could have been done better). I have already upgraded it to 1.4 which incorporates a host of new features and would like everyone's input. Also if you have issues please post there too...rather than me hunting for them on the forums (which I'm going to stop doing after this).

 

And in reply to some extremely old posts...

 

dkap:

No, the != 1 means "if there's an error". Auth.net returns a 1 for a successful transaction. This has been changed quite a bit as of the latest revision, and I think you'll find it getting better than the other contrib you list. It looks like you have some good feedback in later posts regarding this contribution. If you could state it better to me in that thread above...I'll add it in. I'm trying to make this contribution the end-all-be-all...espeically since it seems most people are using it already and I don't want people using code I wrote that could be better.

 

crock:

Actually response[1] holds the subcode...useless to you. [3] holds the identifier and [4] holds the text. As for capturing Authorized transactions...I have a very good way of doing this which ties in well with other things I want it to do. If you're interested in this functionality still, let me know.

 

thome:

That's the great thing about AIM...it doesn't hold anything. It transmits it directly to Auth.net

 

Tuan Le:

No, and in fact you specifically don't want them set for Auth.net. I would also suggest you upgrade to 1.4 because I have replaced that original, cryptic message with something a bit better...which should tell you a bit more. I plan to completely rewrite the error codes, but at least for now, what I have will tell you a fair amount.

 

Austin519

Share this post


Link to post
Share on other sites

Hi Austin,

You helped me on another thread where I was having trouble trying to figure out what I was going to do since my provider would not put cUrl on the server....

Well, I'm back and what I've done is tried to back out any and everything that I had loaded re: authorize.net and I think I'm back to the original files so that I can set myself up in SIM. The problem is I can't get a credit card to process at all, with no errors coming up.

I've been reading for days thread after thread re: other problems people have had trying to find a solution, but to no avail.

I have added the code suggested to get an error code in

catalog/includes/modules/payment/authorizenet.php

but still don't get an error. it is routing to the proper url https://blahblahblah.dll and I get my success page, but nothing ever goes to authorize.net, and no email confirms. (this is in both live and test mode)

The only contributions I have in my checkout_process.php is QTPRO and OrderCheck other than that it is a pretty clean copy. I also have the option of having a total of 5 store sthrough my provider so I make Mock store that I use as back up for clean copies of things when all goes topsy turvey. So the authorize.net files in includes/modules/payment and in includes/languages/english/modules/payment are virgin as well as cc_validation in the includes/classes/

Also everything is being recorded in the database (order wise) but they don't show up in the admin...and lastly the shopping cart never empties even when I'm at the success page. Have any ideas or thoughts? I've already lost 2 orders now because of this credit card problem...Please help!!! I've become VERY desperate.

Teresa

Share this post


Link to post
Share on other sites

ttstitches:

Okay...so you want to set yourself up with sim now or AIM? For the issues with orders not showing up in admin, the shopping cart not emptying, etc...it sounds like you're being sent to the success page incorrectly. At this point Teresa I have no idea whatsoever the issue could be without delving into the code myself. As a suggestion...start fresh, install my latest version of the contrib, and let's work on that. Once we get THAT working, then install other mods, do other things, etc. It will be a lot easier to work with you and on this if I know everything is stock and we're just having issues with my contrib and cURL/SSL. Because what you're saying isn't innately caused by my contrib, so I don't know :(.

 

Austin519

Share this post


Link to post
Share on other sites

Austin,

Can you give me a list of files that need to be wiped clean

so far I have done:

catalog/includes/classes/cc_validation.php

catalog/includes/modules/authorizenet.php

catalog/includes/languages/english/modules/authorizenet.php

 

I expect that I need to add

catalog/checkout_process.php

any others?

Thanks again Austin!!!

PS. I can't use the the AIM contribution as it curl based, so this is strictly for the SIM module that came with oscommerce.

Teresa

Share this post


Link to post
Share on other sites

ttstitches:

For my contribution, the files included in each revision are listed in the readme Teresa. As for the SIM module...no idea Teresa, I didn't write it.

 

Austin519

Share this post


Link to post
Share on other sites

Thank Austin

What I think I am going to do is make a duplicate of my site so I can work on things without messing anything else up and then a brand new store. Pull fresh copies of the files I think need to be started from scratch from the new store into the duplicate store and test from there. If that doesn't work, then I guess I start completely from scratch.

Ordercheck has been causing me problems in other areas so that is the first thing I'm going to back out and see if it works.

Thanks again...If you have any further thoughts, I sure appreciate your input. As for the author of the "vanilla" authorizenet, hope they see my plight and offer some wisdom. I figured this was the right thread as the title did not associate with the AIM or ADC authorizenet.

Sorry for the confusion.

Teresa

Share this post


Link to post
Share on other sites

Ok I'm sure that this is a simple question and I'm also sure that I've read right passed the answer.

 

Authorizenet is looking for referral and return urls. What do they want.

 

I'm in secure mode.

 

Thanks in advance!


Confused worm farmer looking for assistance.

Share this post


Link to post
Share on other sites

ttstitches:

Not a bit...no worries...and yes that's exactly what I'd do. For me, and of course telling you this now may be a bit late...but I always just add one little thing at a time, test it thoroughly, make sure it works, do a backup, move on...keep doing that till I get where I want or revert to backups if something doesn't work. If you tone it down enough to get it working that'd be my suggestion. Otherwise I'm here to help, back in my contrib's main thread...I should be releasing 1.8 in a few weeks when I've gotten everyone's suggestions/ideas in...I think this may be the last release...there aren't really any more bugs as I or others have found.

 

spilotes:

Nope the question wasn't answered, but it IS simple :), lucky you. You don't want either if you're using AIM. That's a SIM only thing, leave them blank for AIM.

 

Austin519

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×