Jump to content

Authorize.net


Christopher Short

Recommended Posts

Yes. The Authorize.net gateway code (version 1.1.1 is what I am looking at) will tell CubeCart to set the order to Pending if the response code is anything other than Approved. That is: Declined, Error, and Held for Review. It will do this regardless whatever status the order had previously.

This module (which might not be the same as the latest Authorize module from the MarketPlace) has two modes: SIM and AIM. The SIM mode does not record the order status in the respective order's Transaction Logs tab. The AIM mode does.

 

Link to comment
Share on other sites

 

Update order status to processing for auth only   check box should be off for that to work then?

Here is what I see in the code:

if($data["x_response_code"]=='1'){
            switch($data["x_type"]) {
                case "auth_only":
                    $status = 'Authorized';
                    if($this->_module['process_auth']=='1') {
                        $order->orderStatus(Order::ORDER_PROCESS, $data["x_invoice_num"]);
                        $order->paymentStatus(Order::PAYMENT_SUCCESS, $data["x_invoice_num"]);
                    }
                break;
                case "auth_capture":
                    $status = 'Captured';
                    $order->orderStatus(Order::ORDER_PROCESS, $data["x_invoice_num"]);
                    $order->paymentStatus(Order::PAYMENT_SUCCESS, $data["x_invoice_num"]);
                break;
                case "void":
                    $status = 'Void';
                    $order->orderStatus(Order::ORDER_CANCELLED, $data["x_invoice_num"]);
                    $order->paymentStatus(Order::PAYMENT_CANCEL, $data["x_invoice_num"]);
                break;
            }
            
        } else {
            
            switch($data["x_response_code"]) {
                case '2':
                    $status = 'Declined';
                break;
                case '3':
                    $status = 'Error';
                break;
                case '4':
                    $status = 'Held for Review';
                break;
            }
            
            $order->orderStatus(Order::ORDER_PENDING, $data["cart_order_id"]);
            $order->paymentStatus(Order::PAYMENT_PENDING, $data["cart_order_id"]);
        }
 

Link to comment
Share on other sites

So your question at first was not "Is this how it happens?", but rather "Can I make it do this?"

And by "this", perhaps you meant that the module should tell CubeCart to set the order's status to "Declined" when Authorize.net sends back a response code of 'Declined' (case 2).

The gateway.class.php file will need to be customized so that it will tell CubeCart to set the order's status to match that that of Authorize.net's response.

 

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
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...