X14XA\shengli 9 hours ago
parent ef9b95c1cb
commit c0d973fe12
  1. 26
      src/factory/object/trade/UnifiedOrderRequest.php

@ -66,50 +66,50 @@ class UnifiedOrderRequest
throw new ParamsException('藏品交易市场类型不正确', 'object_info.marketType'); throw new ParamsException('藏品交易市场类型不正确', 'object_info.marketType');
} }
if($objectInfo->marketType == Constant::MARKET_MASTER) { if($objectInfo->marketType == Constant::MARKET_MASTER) {
if($this->data['user_name'] == null && $this->data['user_cust_id'] == null) { if((empty($this->data['user_name'])) && empty($this->data['user_cust_id'])) {
throw new ParamsException('付款人信息不能为空', 'user_name|user_cust_id'); throw new ParamsException('付款人信息不能为空', 'user_name|user_cust_id');
} }
//证件信息 //证件信息
if($this->data['user_cust_id'] == null) { if(empty($this->data['user_cust_id'])) {
if($this->data['id_card_type'] == null) { if(empty($this->data['id_card_type'])) {
throw new ParamsException('用户证件信息不能为空', 'id_card_type'); throw new ParamsException('用户证件信息不能为空', 'id_card_type');
} }
if($this->data['id_card'] == null) { if(empty($this->data['id_card'])) {
throw new ParamsException('用户证件号不能为空', 'id_card'); throw new ParamsException('用户证件号不能为空', 'id_card');
} }
} }
} else if($objectInfo->marketType == Constant::MARKET_SUB) { } else if($objectInfo->marketType == Constant::MARKET_SUB) {
if($this->data['user_cust_id'] == null) { if(empty($this->data['user_cust_id'])) {
throw new ParamsException('用户客户号不能为空', 'user_cust_id'); throw new ParamsException('用户客户号不能为空', 'user_cust_id');
} }
} }
if($this->data['user_name']) { if(!empty($this->data['user_name'])) {
$params['user_name'] = $this->data['user_name']; $params['user_name'] = $this->data['user_name'];
} }
if($this->data['user_cust_id'] != null) { if(!empty($this->data['user_cust_id'])) {
$params['user_cust_id'] = $this->data['user_cust_id']; $params['user_cust_id'] = $this->data['user_cust_id'];
} }
if($this->data['id_card_type'] == null) { if(!empty($this->data['id_card_type'])) {
$params['id_card_type'] = $this->data['id_card_type']; $params['id_card_type'] = $this->data['id_card_type'];
} }
if($this->data['id_card'] != null) { if(!empty($this->data['id_card'])) {
$params['id_card'] = $this->data['id_card']; $params['id_card'] = $this->data['id_card'];
} }
if(!empty($this->data['div_type'])) { if(!empty($this->data['div_type'])) {
$params['div_type'] = $this->data['div_type']; $params['div_type'] = $this->data['div_type'];
} }
if($this->data['div_details'] != null && empty($this->data['div_details'])) { if(!empty($this->data['div_details'])) {
//分账 //分账
$params['div_details'] = json_encode($this->data['div_details']); $params['div_details'] = json_encode($this->data['div_details']);
} }
if($this->data['trans_amt'] == null) { if(empty($this->data['trans_amt'])) {
throw new ParamsException('交易金额不能为空', 'trans_amt'); throw new ParamsException('交易金额不能为空', 'trans_amt');
} }
if($this->data['order_expire_time'] != null) { if(!empty($this->data['order_expire_time'])) {
$params['order_expire_time'] = $this->data['order_expire_time']; $params['order_expire_time'] = $this->data['order_expire_time'];
} }
if($this->data['ret_url'] != null) { if(!empty($this->data['ret_url'])) {
$params['ret_url'] = $this->data['ret_url']; $params['ret_url'] = $this->data['ret_url'];
} }
if(!empty($this->data['bg_ret_url'])) { if(!empty($this->data['bg_ret_url'])) {

Loading…
Cancel
Save