|
@@ -42,7 +42,7 @@ class Order extends Base
|
|
|
*/
|
|
|
public function createOrder()
|
|
|
{
|
|
|
- //$this->error('维护中......');
|
|
|
+ if(!checkAuth($this->uid)) $this->error('暂未开放');
|
|
|
if (redisSetNx('createOrder'.$this->uid,3)) {
|
|
|
$id = input('id');
|
|
|
$num = input('num',1);
|
|
@@ -67,8 +67,8 @@ class Order extends Base
|
|
|
if(!in_array($this->uid,$luck_draw)) $this->error('没有中签');
|
|
|
}
|
|
|
|
|
|
- /* $check_rank = getRanking($id,0);
|
|
|
- if($check_rank + $num > $coll_info['inventory']) $this->error('库存不足');*/
|
|
|
+ /* $check_rank = getRanking($id,0);
|
|
|
+ if($check_rank + $num > $coll_info['inventory']) $this->error('库存不足');*/
|
|
|
|
|
|
$inventory = getCollectionInventory($id);
|
|
|
if ($inventory<1) $this->error('已售罄');
|
|
@@ -167,7 +167,7 @@ class Order extends Base
|
|
|
* @return name:pay_price type:string default:-- desc:订单金额
|
|
|
* @return name:status type:int default:-- desc:类型0:待支付1:已支付
|
|
|
* @return name:cancel_time type:string default:-- desc:待支付自动取消时间
|
|
|
- * @return name:pay_type type:string default:-- desc:支付方式wx:微信zfb:支付宝
|
|
|
+ * @return name:pay_type type:string default:-- desc:支付方式wx:微信zfb:支付宝,ll:连连
|
|
|
* @return name:create_at type:string default:-- desc:创建时间
|
|
|
* @return name:pro_info@name type:string default:-- desc:藏品名称
|
|
|
* @return name:pro_info@cover type:string default:-- desc:藏品图片
|
|
@@ -303,9 +303,9 @@ class Order extends Base
|
|
|
if ($inventory < 0) $this->error('已售罄');
|
|
|
//if ($inventory < $order['num']) $this->error('库存不足');
|
|
|
|
|
|
- /* $coll_info = getCollectionInfoHash($order['c_id']);
|
|
|
- $check_rank = getRanking($order['c_id'],0);
|
|
|
- if( $check_rank + $order['num'] > $coll_info['inventory']) $this->error('库存不足');*/
|
|
|
+ /* $coll_info = getCollectionInfoHash($order['c_id']);
|
|
|
+ $check_rank = getRanking($order['c_id'],0);
|
|
|
+ if( $check_rank + $order['num'] > $coll_info['inventory']) $this->error('库存不足');*/
|
|
|
|
|
|
if ($order['status']!=0) $this->error('订单已支付或已取消');
|
|
|
$CancelTime = getCancelTime();
|
|
@@ -316,7 +316,6 @@ class Order extends Base
|
|
|
$body = '象链数藏购买藏品';
|
|
|
$com = true;
|
|
|
$retrun_data = [];
|
|
|
- // if($pay_type != 'wallet') $this->error('请选择余额方式支付');
|
|
|
if(!in_array($pay_type,['wallet','ll']) ) $this->error('请选择余额或连连方式支付');
|
|
|
switch ($pay_type){
|
|
|
case 'wx':
|
|
@@ -412,7 +411,7 @@ class Order extends Base
|
|
|
case 'll':
|
|
|
$notify_url = 'https://'.$_SERVER['HTTP_HOST'] . '/api/Pay/primaryMarketNotify';
|
|
|
$return_url ='https://'.$_SERVER['HTTP_HOST']."/h5/pages/mine/mine?id={$order['c_id']}&orderNo={$order_no}";//回调地址
|
|
|
- $risk_item= risk_item($user,'余额支付',$source == 1 ? 16 : 10);
|
|
|
+ $risk_item= risk_item($user,'订单支付',$source == 1 ? 16 : 10);
|
|
|
$res= LianLianPay::cashierPay($order_no,$total_fee,$this->uid,$notify_url,$return_url,'藏品支付',[[
|
|
|
'payee_id'=>OID_PARTNER,
|
|
|
'payee_type' => 'MERCHANT',
|