in reply to Business::OnlinePayment::AuthorizeNet Problems

Yes this module does have some problems. I haven't seen the encapsulate problem, that should encapsulate the info in whatever you set it to. I also don't see this line in AuthorizeNet 3.13 (latest version), perhaps you have a different version of it?

Also I don't see where the name field is required, and the module adds the x_ and the proper name for AuthorizeNet for you (since adding a x_ to all the params is annoying and seems unnessicary). They also don't exactly coorispond, I think the idea is to make all the OnlinePayment modules similar.

Anyway, with the newest version, I had some problems with a missing parameter and sometimes AuthorizeNet was returning '*' characters around the fields along with the encapsulation. I wrote a small patch that fixed these problems and sent it to the authors. I don't believe they have released a new version since however.

Make sure you have the newest version and put in the patch see if it works for you :)

--- AuthorizeNet.pm.org 2003-08-28 14:56:03.000000000 -0500 +++ AuthorizeNet.pm 2003-08-28 14:52:51.000000000 -0500 @@ -83,6 +83,7 @@ type => 'x_Method', login => 'x_Login', password => 'x_Password', + merchant_email => 'x_Merchant_Email', transaction_key => 'x_Tran_Key', action => 'x_Type', description => 'x_Description', @@ -179,6 +180,10 @@ my $csv = new Text::CSV_XS({ 'binary'=>1 }); $csv->parse($page); my @col = $csv->fields(); + + # AuthorizeNet seems to be returning * * around + # the fields + foreach(@col) { s/(?:^\*|\*$)//g } $self->server_response($page); $self->avs_code($col[5]);

Replies are listed 'Best First'.
Re^2: Business::OnlinePayment::AuthorizeNet Problems
by saberworks (Curate) on Jul 08, 2004 at 19:37 UTC
    Thanks a lot. I'm sure there's some way to apply a patch easily, could you give me a quick tip? Okay, I just checked my version. It's 2.01! No wonder it's not working! Gah I'm such an idiot, you wouldn't believe how much time I spent on this. Thanks a lot for your help. UGH.

      if you're on unix just copy my patch into a file, find where the AuthorizeNet.pm is located and do patch Authorize.pm copied_patch_file should do the trick (backup first though!)

      If you're on Windows, I don't how to patch there, I'm sure there's a utiltity for it out there somewhere, if you don't figure it out just /msg me with your email and I'll send you a copy that's been patched.

        I'm on linux, thanks a lot! I'm installing the latest version now then I will patch it. I really appreciate your help!