作者 lihan
1 个管道 的构建 通过 耗费 0 秒

赠送优惠券

... ... @@ -344,7 +344,11 @@ class OrderController extends HomeBaseController
public function notify()
{
$pay = new \Payment();
$pay->handleNotify();
$return = $pay->handleNotify();
if(!empty($return)) {
$order = new OrderModel;
$order->orderCallBack($return['attach'], $return['total_fee']);
}
}
}
\ No newline at end of file
... ...
... ... @@ -56,7 +56,7 @@ class OrderModel extends Model
$wallet = [
'user_id' => $orderInfo['user_id'],
'type' => 0,
'cost' => $orderInfo['order_amount'],
'cost' => $amount,
'create_time' => time()
];
if (Db::name('my_wallet')->insert($wallet)) {
... ... @@ -108,6 +108,10 @@ class OrderModel extends Model
}
if ($go == 'commit') {
Db::commit();
if($orderInfo['payment'] == 1) {
echo "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
exit();
}
return true;
} else {
Db::rollback();
... ...