cancel
Showing results for 
Search instead for 
Did you mean: 

Order Status not statying "Pending_Payment"

Order Status not statying "Pending_Payment"

When using a credit card processor that has certain down time, we need the ability to keep the order, but set as "pending_payment".  When I use the following code (i created new status after the built in pending_payment did not work) the order gets set as pending/awaigint then when the payment modules complets and exits, the order goes to "Processing".  That is fine under normal circumstances, but when it is during the processor down time we need it to become awaiting so we can manually contact/process the payment

 

               $an_save = array (
     "account_number"  => $this->_CCEncrypt($payment->getCcNumber()),
     "expiration_month"  => sprintf("%02d", $payment->getCcExpMonth()),
     "expiration_year"  => $payment->getCcExpYear(),
               
               );
    $payment->setAdditionalInformation(serialize($an_save))->save();

                         $order->setState('awaiting_payment', true, 'Processor down, process manually.', false)->save();
                  // $order->setStatus($orderStatus);
    $order->save();