Esempio n. 1
0
 public function finishTransaction($newStatus) {      
     $transaction = new Pap_Db_Transaction();
     $transaction->setOrderId($_POST['LMI_PAYMENT_NO']);
     $transaction->setData5($_POST['LMI_SYS_TRANS_NO']);
     try {
         $transaction->loadFromData(array(Pap_Db_Table_Transactions::ORDER_ID, Pap_Db_Table_Transactions::DATA5));
     } catch (Gpf_DbEngine_NoRowException $e) {
         $this->debug('No such transaction with order id: ' . $transaction->getOrderId() . ' and data5: ' . $transaction->getData5() . '. Changing status ended.');
         return;
     }
     $transaction->setStatus($newStatus);
     $transaction->update();
 }