Exemplo n.º 1
0
                     if ($credit > 0) {
                         credit_add($r['username'], $credit);
                         credit_record($r['username'], $credit, 'system', $L['charge_reward'], $L['charge'] . $r['amount'] . $DT['money_unit']);
                     }
                 }
                 $show = $MOD['linkurl'] . 'charge.php';
                 if ($tradeid) {
                     $td = $db->get_one("SELECT * FROM {$DT_PRE}mall_order WHERE itemid={$tradeid}");
                     if ($td['status'] == 1 && $td['buyer'] == $_username && $td['amount'] + $td['fee'] == $_money + $r['amount']) {
                         $show = $MOD['linkurl'] . 'trade.php?action=update&step=pay&itemid=' . $tradeid;
                     } else {
                         $tradeid = 0;
                         set_cookie('tradeid', '0');
                     }
                 }
                 $resHandler->doShow($show);
             }
         }
         #echo "<br/>" . "即时到帐支付成功" . "<br/>";
     } else {
         //当做不成功处理
         #echo "<br/>" . "即时到帐支付失败" . "<br/>";
     }
 } elseif ("2" == $trade_mode) {
     if ("0" == $trade_state) {
         //------------------------------
         //处理业务开始
         //------------------------------
         //注意交易单不要重复处理
         //注意判断返回金额
         //------------------------------