|
@@ -56,7 +56,7 @@ class OrderModel extends Model |
|
@@ -56,7 +56,7 @@ class OrderModel extends Model |
56
|
$wallet = [
|
56
|
$wallet = [
|
57
|
'user_id' => $orderInfo['user_id'],
|
57
|
'user_id' => $orderInfo['user_id'],
|
58
|
'type' => 0,
|
58
|
'type' => 0,
|
59
|
- 'cost' => $orderInfo['order_amount'],
|
59
|
+ 'cost' => $amount,
|
60
|
'create_time' => time()
|
60
|
'create_time' => time()
|
61
|
];
|
61
|
];
|
62
|
if (Db::name('my_wallet')->insert($wallet)) {
|
62
|
if (Db::name('my_wallet')->insert($wallet)) {
|
|
@@ -108,6 +108,10 @@ class OrderModel extends Model |
|
@@ -108,6 +108,10 @@ class OrderModel extends Model |
108
|
}
|
108
|
}
|
109
|
if ($go == 'commit') {
|
109
|
if ($go == 'commit') {
|
110
|
Db::commit();
|
110
|
Db::commit();
|
|
|
111
|
+ if($orderInfo['payment'] == 1) {
|
|
|
112
|
+ echo "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
|
|
|
113
|
+ exit();
|
|
|
114
|
+ }
|
111
|
return true;
|
115
|
return true;
|
112
|
} else {
|
116
|
} else {
|
113
|
Db::rollback();
|
117
|
Db::rollback();
|