|
|
@@ -39,10 +39,10 @@ class PublicController
|
|
|
public function test()
|
|
|
{
|
|
|
$uid = 168;
|
|
|
- $product_id = 13;
|
|
|
- $exchange_id = 4;
|
|
|
- $num = 20;
|
|
|
- $uni = '285296ff';
|
|
|
+ $product_id = 24;
|
|
|
+ $exchange_id = 15;
|
|
|
+ $num = 16;
|
|
|
+ $uni = '54141784';
|
|
|
$res = StoreCart::setCart($uid, $product_id, $num, $uni, 'product', 1, 0, 0, 0, 0, $exchange_id);
|
|
|
if ($res) {
|
|
|
$cartId = $res->id;
|
|
|
@@ -60,7 +60,7 @@ class PublicController
|
|
|
if (!$orderKey) return app('json')->fail('生成订单错误!');
|
|
|
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);
|
|
|
+ $order = StoreOrder::cacheKeyCreateOrder($uid, $orderKey, 0, 'weixin', false, 0, '系统后台订单', 0, 0, 0, 0, 0, $exchange_id, false, 1, 2, '', '', 0, 0, 1, 1);
|
|
|
if ($order === false) return app('json')->fail(StoreOrder::getErrorInfo('订单生成失败'));
|
|
|
else $res = StoreOrder::jsPayPrice($order['order_id'], $uid);
|
|
|
if ($res) {
|