cancel
Showing results for 
Search instead for 
Did you mean: 

Error processing your payment

I'm working on the AIM API method using the payment-form sample code. (The page refers to it as the sample app). Is that the same thing as the SDK? I'm confused.

The code I'm using requires AuthorizeNet.php and through that AuthorizeNetAIM.php. Apparently it doesn't use the AuthnetAIM.class, however.

It works fine in test server using the test config file, and test cc info, exp date and cvv.

But using the secure server, with correct MERCHANT_LIVE_login id and trans key in the config file, and using real credit card info,  I get:
"There was an error with your submission. Please make the necessary corrections and try again. We encountered an error while processing your payment. Your credit card was not charged. Please try again or contact customer service to place your order.

Please help! Thanks.

auththch
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

I wasn't sure what I had anymore either, but I got it working! After reading your last post and looking at the payment-form again, I realized I WAS using an sdk. It even references that it's coming from the auth_net_sdk folder and using AuthorizeNetAIM in the auth_net_sdk/lib/ folder. So I guess I'm not using Conde's authnetAIM.class after all. Amazing.

HOLD ON--I just checked and I am currently using require ('AuthnetAIM.class.php'); in the 2008 catch/try version of my form, but it's not to be used in the new payment-form version. So that answers that. Great!

I really messed up the config file too by attempting to use  
  define("MERCHANT_API_LOGIN_ID","xxxxxxxx"); instead of   
  define("AUTHORIZENET_API_LOGIN_ID","xxxxxxxx");

And I needed to change true to false here:
 define("AUTHORIZENET_SANDBOX",false);  

So with those things fixed, the form validated and processed. Wow. I finally made it. Thanks for walking me through this and helping me undertand what I was dealing with. Just by calling me out on a few things told me I was off base with them, and yes, I was just throwing a couple of things out there hoping they'd work.

Thanks again. I really appreciate the help. I won't bug any of you anymore! I GOT IT!!

View solution in original post

9 REPLIES 9

Yes the sample app use the sdks.     

Can you look at the response and see what the reason code is?

RaynorC1emen7
Expert

The response is right in the page. It is:

  "There was an error with your submission. Please make the necessary corrections and try again. We encountered an error while processing your payment. Your credit card was not charged. Please try again or contact customer service to place your order.

 

If it doesn't say that, it says things like "Please enter a valid expiration date for your credit card".

 

I'm not sure this is the sample app. I think it's sample code -- the John Conde code that doesn't use the .class file. Does it help for you to consider that aspect of what's going on?

 

Thanks.

.class are for java, are you using java or php? If it php you already have the code to debug. Or you can hire a Certified Developer John Conde is one.

I've taken your advice and invited John Conde to help me with my page using Elance. I won't hold my breath that he'll answer, but I hope he does!

Sorry to be a bother with this, but John Conde didn't answer my request for a bid and he's the only one I extended it to. Because of a bad experience with an aggressive freelancer who tried to win a previous bid, I'm not likely to extend the offer to anyone else on Elance.

You say the sample app uses the sdk and I should look at the response code. Then you say the .classees are for java, not .php, and if I'm using .php I already have the code in the page to debug. Now I'm even more confused.

I've been working on the payment-form.php AIM setup for 1 1/2 years now, days at a time, month after month, and although I have it working on my test account, it doesn't work on my production server using MERCHANT_LOGIN_ID, define("AUTHORIZENET_SECURE",true); and my secure login in config.php. I think I've caught all of the slight missteps like $credit_card_number vs $credit_card in validation.js, and I'm wondering if there's a call missing in the php. It does catch all the validations properly but it still won't process. Someone has to know the answer to this but isn't sharing it.

For the past year I've been using Conde's try/catch method to accomplish credit card charges through authorize.net (who is no help at all on this). That is the only setup I've been able to get working for AIM. I am able to get the response code using that setup, but I'd really like to use the upgraded payment-form.php system.

If I can't get any help through Elance or from authorize.net, this community/developer forum is the only place I can go to for help. Please help me with this!

Then you say the .classees are for java, not .php

I think you mean autho????.class.php   the file extension is .php

 

if I'm using .php I already have the code

I you open a .php file in notepad or any text editor, isn't the code is in there?

 

https://github.com/stymiee/Authorize.Net-XML

he does have readme file

 

define("AUTHORIZENET_SECURE",true);

where did you get this?

I guess we really aren't speaking the same language -- English, that is!
Your Answer 1 - - -
I realize the whatever.class.php file ends in .php. What does that have to do with me using java though? If Conte's payment-form.php solution is based on the  java class, it should be referred to in either the config.php file or in the payment-form.php file. Right? Well, it isn't.

Your Answer 2 - - -
Yes, I realize I can open up any .php page in a text editor or Dreamweaver.

You refer me to a link called https://github.com/stymiee/Authorize.Net-XML
But why would I check out that link? I'm not doing anything in XML. Am I?

The README file at that link says:
    (This is) A PHP library for working with all Authorize.Net's XML APIs.
    This is an alternative to the PHP SDK offered by Authorize.Net.

Is the payment-form.php an XML setup? If so, I wasn't aware of that.

Your Answer 3 - - -  
I saw define("AUTHORIZENET_SANDBOX",false); in a test config.php file that I found after a long, hard search for a payment-form.php config file, since it was missing from the initial download of the payment-form.php setup. Do you see how hard this has been for me and many other people trying to make this work? Without the config.php file we've all had to try to come up with something that would suffice. Was this another misstep in the rollout of the payment-form.php setup?

Since the original payment-form.php setup was for a test setup, I changed the config file to define("AUTHORIZENET_SECURE",true); Just trying to make it work. It also saw define("MERCHANT_API_LOGIN_ID","xxxxxxxx");    // Add your API LOGIN ID
define("MERCHANT_TRANSACTION_KEY","xxxxxxxxxxxxxxxx"); // Add your API transaction key
in that config file and removed the // to allow it and added the secure login info, since it was for real-time transaction processing.

But wait.. I now see that my payment-form.php is still using this in the "Process the transaction" section:
            $transaction->setSandbox(AUTHORIZENET_SANDBOX);


That would be causing problems for me. Right? I've changed it to:
            // Process the transaction using the AIM API
            $transaction = new AuthorizeNetAIM;
            // $transaction->setSandbox(AUTHORIZENET_SANDBOX);
               $transaction->setSecure(AUTHORIZENET_SECURE);
            $transaction->setFields(
                array(
But it still doesn't work.
What's wrong with my "Process the transaction using the AIM API?" in payment-form.php?

Thanks for your help!

 

 

1)On your original post youse said "Apparently it doesn't use the AuthnetAIM.class, however." since you only said about sample application from authorize.net, I have no way to know what you are referencing to Conde code.

 

2)Since I'm not sure what you have anymore, It is a mixed of the sample application and Conde code? Since you did the change, you will need to figure it out.

 

3)$transaction->setSecure(AUTHORIZENET_SECURE);

What is the setSecure()? Did you create a new method? Did you just make it up and hope it works?

 

instead of creating your own. Just

define("AUTHORIZENET_SANDBOX", false);

I wasn't sure what I had anymore either, but I got it working! After reading your last post and looking at the payment-form again, I realized I WAS using an sdk. It even references that it's coming from the auth_net_sdk folder and using AuthorizeNetAIM in the auth_net_sdk/lib/ folder. So I guess I'm not using Conde's authnetAIM.class after all. Amazing.

HOLD ON--I just checked and I am currently using require ('AuthnetAIM.class.php'); in the 2008 catch/try version of my form, but it's not to be used in the new payment-form version. So that answers that. Great!

I really messed up the config file too by attempting to use  
  define("MERCHANT_API_LOGIN_ID","xxxxxxxx"); instead of   
  define("AUTHORIZENET_API_LOGIN_ID","xxxxxxxx");

And I needed to change true to false here:
 define("AUTHORIZENET_SANDBOX",false);  

So with those things fixed, the form validated and processed. Wow. I finally made it. Thanks for walking me through this and helping me undertand what I was dealing with. Just by calling me out on a few things told me I was off base with them, and yes, I was just throwing a couple of things out there hoping they'd work.

Thanks again. I really appreciate the help. I won't bug any of you anymore! I GOT IT!!