| xqd
@@ -47,8 +47,11 @@ class PayCallbackController extends Controller
|
|
|
Payment::where('id', $payment['id'])->update(['online_sn' => $message['transaction_id'], 'status' => 2, 'payment_time' => time()]);
|
|
|
$order = Order::select(['id', 'user_id', 'docter_id', 'product_type', 'payment_amount'])->where('id', $payment['order_id'])->first();
|
|
|
$order_status = 2;
|
|
|
- if ($order['product_type'] == 7) {
|
|
|
+ if (in_array($order['product_type'], [3,4,5,6])) {
|
|
|
$order_status = 3;
|
|
|
+ }
|
|
|
+ elseif ($order['product_type'] == 7) {
|
|
|
+ $order_status = 4;
|
|
|
//改变用户余额
|
|
|
User::changeBalance($order['user_id'], $order['payment_amount'], 2, $order['id'], '充值');
|
|
|
}
|