Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Authorize.Net Consolidated 1.7 with Curl Fix bug?


Guest

Recommended Posts

Hey guys I am using this payment module:

 

Authorize.Net Consolidated 1.7 with Curl Fix

 

It works like a champ, but I have noticed one bug.

 

When someone processes a credit card, and Authorize.net declines the card. OsCommerce still adds the order to the orders.table. Then when you are in ADMIN view, I see that the order is shown as "PENDING". It's shown as PENDING even though it was declined. It will also add an entry for each time they try and process the card and it's declined. So if they try three times, I get three PENDING orders.

 

When I click on PENDING in the admin screen, it shows me nothing...I can't even delete it because it did not set some flag correctly or created another table entry correctly.

 

I always have to go into MyPHPAdmin and delete the table entry in the orders.table to get rid of the PENDING status that was created for a declined card.

 

Has anyone else had this problem?

Link to comment
Share on other sites

per the readme file included with the package:

 

Failed orders are still assigned an order number - In order to be able to send an order number to Authorize.net without having to rewrite a substantial portion of OsCommerce, the order is assigned an ID before it is approved by Authorize.net. These orders are then deleted if the processing fails with Authorize.net, however it was already assigned a number, so your order numbers will "skip" over that number. There is no currently foreseeable way around this.

 

If you encounter any other issues or bugs please report them to me immediately.

 

 

I do not have that problem with any of the sites i have this installed on, double check your installation and make sure it is all installed.

Link to comment
Share on other sites

Hi John,

 

The explaination you provided might be some of the problem.

 

It must be creating an order ID, but when the payment fails, it does not delete them like it should.

 

I see the order that got created in orders.table in the database, and since it's created there, then it counts a Pending order in the Admin screen, except you actually see it in the admin screen. I can see the pending number, but can't click on it to delete it or edit it. I have to go in manually to the orders.table and delete the entry in orders.table.

 

What files would be assocatied with deleting the order if the processing fails?

 

 

I've looks at all the files and everything seems ok.

 

Thanks for your feedback.

 

Chris

 

 

 

per the readme file included with the package:

 

Failed orders are still assigned an order number - In order to be able to send an order number to Authorize.net without having to rewrite a substantial portion of OsCommerce, the order is assigned an ID before it is approved by Authorize.net. These orders are then deleted if the processing fails with Authorize.net, however it was already assigned a number, so your order numbers will "skip" over that number.  There is no currently foreseeable way around this.

 

If you encounter any other issues or bugs please report them to me immediately.

I do not have that problem with any of the sites i have this installed on, double check your installation and make sure it is all installed.

Link to comment
Share on other sites

Hi Chris, I faced the same problem (although I could not see the order in the Admin screen - only in the db using phpMyAdmin).

 

I made the following changes to the function before_process() in the file authorizenet.php which is under catalog/includes/modules/payment. I have put comments preceded by XXX:

 

---------------------------------------------------

function before_process() {

global $response;

 

// Change made by using ADC Direct Connection

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

$x_response_code = $response_vars[0];

$x_response_subcode = $response_vars[1];

$x_response_reason_code = $response_vars[2];

$x_response_reason_text = $response_vars[3];

// XXX added variable to hold order id

$x_response_order_id = $response_vars[7]; // order id is stored as the invoice number

 

if ($x_response_code != '1') {

// XXX insert_id is not defined at this point - so it doesnot delete

//tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$insert_id . "'"); //Remove order

 

// XXX I get the order id from the response from Authorize.net. Now it deletes the order if transaction fails

tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$x_response_order_id . "'");

 

if($x_response_code == '') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('The server cannot connect to Authorize.net. Please check your cURL and server settings.'), 'SSL', true, false));

}

else if($x_response_code == '2') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('Your credit card was declined ') . urlencode('(') . urlencode("$x_response_reason_code") . urlencode('): ') . urlencode("$x_response_reason_text"), 'SSL', true, false));

}

else if($x_response_code == '3') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('There was an error processing your credit card ') . urlencode('(') . urlencode("$x_response_reason_code") . urlencode('): ') . urlencode("$x_response_reason_text"), 'SSL', true, false));

}

else {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('There was an unspecified error processing your credit card.'), 'SSL', true, false));

}

}

}

---------------------------------------------------

 

Hope this helps.

 

regards,

sandip

Link to comment
Share on other sites

Yes, yes, yes! Finally two people that have the same problem. Me too. I could not see the DECLINED order in the admin, but I can see it in phpmyadmin also just like you. I will try your edits and see what happens then report back.

 

Thank you so very much for helping. Sometimes you feel like your the only one.

 

Chris

 

 

Hi Chris, I faced the same problem (although I could not see the order in the Admin screen - only in the db using phpMyAdmin).
Link to comment
Share on other sites

  • 4 weeks later...

I finally got around to making edits to this module...geez I sure was busy.

 

But this FIXED MY PROBLEM!!!!

 

Thank you, thank you, thank you!

 

Chris

Link to comment
Share on other sites

  • 7 months later...

Hi, I'm having this same problem and found this thread to fix it. I was wondering, does anyone know if this fix also adds the products back into stock? I'm using OSC to track my stock levels, and I don't want the order getting deleted without adding the products back.

 

Alternately, is there a way to see the order as "declined" in admin (if I add another status called "declined"), I'd like to see what the orders look like before they disappear.

 

Thanks for any help,

Adrienne

Link to comment
Share on other sites

Hi, I'm having this same problem and found this thread to fix it.  I was wondering, does anyone know if this fix also adds the products back into stock?  I'm using OSC to track my stock levels, and I don't want the order getting deleted without adding the products back.

 

Alternately, is there a way to see the order as "declined" in admin (if I add another status called "declined"), I'd like to see what the orders look like before they disappear.

 

Thanks for any help,

Adrienne

 

Thank Heavens..... I thought I was the only one with this problem...although I did not relate the ghosted orders to be from a declined process.

Thank you, thank you, thank you :thumbsup:

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...