|
|
@@ -20,15 +20,15 @@ class PaymentController extends Controller
|
|
20
|
20
|
}
|
|
21
|
21
|
$order_id = $request->input("order_id");
|
|
22
|
22
|
$order_type = $request->input("order_type");
|
|
23
|
|
- $price = $request->input("price");
|
|
|
23
|
+ $order = CommonController::getRecord($order_type, $order_id);
|
|
24
|
24
|
|
|
25
|
|
- if ($wechat_id && $order_id && $order_type && $price) {
|
|
|
25
|
+ if ($wechat_id && $order) {
|
|
26
|
26
|
$order_id = $order_type . "_" . $order_id;
|
|
27
|
27
|
$app = EasyWeChat::payment();
|
|
28
|
28
|
$result = $app->order->unify([
|
|
29
|
29
|
'body' => '玥子轩家政',
|
|
30
|
30
|
'out_trade_no' => $order_id,
|
|
31
|
|
- 'total_fee' => $price,
|
|
|
31
|
+ 'total_fee' => $order->price,
|
|
32
|
32
|
'trade_type' => 'JSAPI',
|
|
33
|
33
|
'openid' => $wechat_id,
|
|
34
|
34
|
]);
|