Ejemplo n.º 1
0
 } elseif (!empty($transaction['gateway']) && 'completed' == $action) {
     $gate = $transaction['gateway'];
     if (isset($gateways[$gate])) {
         $temp_transaction = $transaction;
         $transaction = array();
         // include post form send files
         $paymentGatewayHandler = IA_PLUGINS . $gate . IA_DS . 'includes' . IA_DS . 'post-processing' . iaSystem::EXECUTABLE_FILE_EXT;
         if (file_exists($paymentGatewayHandler)) {
             // set to true if custom transaction handling needed
             $replaceHandler = false;
             $iaCore->startHook('phpPayBeforeIncludePostGate', array('gateway' => $gate));
             include $paymentGatewayHandler;
             $iaCore->startHook('phpPayAfterIncludePostGate', array('gateway' => $gate));
             // print transaction information
             if (INTELLI_DEBUG) {
                 iaDebug::log('Processed transaction information', $transaction);
             }
             // use default processing handler
             if (false === $replaceHandler) {
                 if (!$transaction) {
                     return iaView::errorPage(iaView::ERROR_FORBIDDEN, $messages);
                 }
                 if (in_array($transaction['status'], array(iaTransaction::PASSED, iaTransaction::PENDING))) {
                     // update transaction record
                     $iaTransaction->update($transaction, $transaction['id']);
                     // process item specific post-processing actions
                     if (iaTransaction::PASSED == $transaction['status']) {
                         $iaPlan->setPaid($transaction);
                     }
                     // disable debug display
                     $iaView->set('nodebug', true);