Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Charging via Authorizenet's SIM when items SHIP


majik

Recommended Posts

Posted

I am looking for a way to charge a card when an order status changes to "shipped". Many of my company's products have really long lead times and I would like to be able to not charge people weeks in advance. I am using Authorize.net and their SIM module. If anyone can share how to do this, I would really appreciate it. Thanks.

Posted

You will need to modify your catalog/includes/modules/payment/authorizenet.php module to do an Authorization only when the order is placed. Then at least you know that everything is still valid even though the authorization will drop by the time you are ready to charge.

 

You will also need to make some edits to the process_button function to do set the x_type based upon the order status. You will also need to include the x_type in the process_button_string along with carrying over the cc_number, cc_expire_date, and cc_name so it will be stored in the database.

 

You will need to edit your admin/orders.php file to process the response code returned by authorize.net, to load the authorizenet.php payment class, and to submit to authorize.net when the order status changes for orders that were processed through them.

 

You will also need to modify the database to add a field to the orders table to store the transaction id to possibly use when you charge the account.

 

I think that will do it. :)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

  • 2 weeks later...
Posted

I was just wondering if you got this working I am looking to do the same thing and I was going to start changing the code. Do you have any pointers or changed code?

Posted

I haven't actually embarked on this yet. I am still working out the logistics for my company. Finance isn't sure they want the shipping department people doing the charges, and frankly, I am not thrilled about storing CC numbers in our database. So I am setting it simmer for awhile to see if I can come up with an alternate solution.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...