@@ -61,9 +61,12 @@ class PublicController
if (StoreOrder::be(['order_id|unique' => $orderKey, 'uid' => $uid, 'is_del' => 0]))
return app('json')->fail('订单已生成');
$order = StoreOrder::cacheKeyCreateOrder($uid, $orderKey, 0, 'weixin', false, 0, '系统后台订单', 0, 0, 0, 0, 0, $exchange_id, false, 1, 2, '', '', 0, 0, 1);
-// StoreOrder::paySuccess($order);
if ($order === false) return app('json')->fail(StoreOrder::getErrorInfo('订单生成失败'));
- else return app('json')->success('订单已生成');
+ else $res = StoreOrder::jsPayPrice($order['order_id'], $uid);
+ if ($res) {
+ return app('json')->success('支付成功');
+ }
+
} else {
return app('json')->fail('加入购物车失败');
}