修复退款请求错误

develop
X14XA\shengli 5 days ago
parent db88a68114
commit 0ceeed78a5
  1. 7
      src/factory/object/trade/RefundRequest.php
  2. 2
      src/http/ErrCodeHelper.php

@ -44,15 +44,18 @@ class RefundRequest
if(empty($this->data['org_order_id'])) {
throw new ParamsException('原交易订单号不能为空', 'org_order_id');
}
$params['org_order_id'] = $this->data['org_order_id'];
if(!empty($params['trans_type'])) {
$params['trans_type'] = $this->data['trans_type'];
}
if(empty($this->data['trans_amt'])) {
throw new ParamsException('退款金额不能为空', 'trans_amt');
}
if(!empty($params['div_details'])) {
$params['div_details'] = json_encode($this->data['div_details'], JSON_UNESCAPED_UNICODE);
$params['trans_amt'] = $this->data['trans_amt'];
if(empty($this->data['div_details'])) {
throw new ParamsException('退款明细不能为空', 'div_details');
}
$params['div_details'] = json_encode($this->data['div_details'], JSON_UNESCAPED_UNICODE);
if(!empty($this->data['remark'])) {
$params['remark'] = $this->data['remark'];
}

@ -76,7 +76,7 @@ class ErrCodeHelper
// if(isset($err[$code])) {
// throw new BizException($err[$code] . ' ' . $code . ' ' . $desc, $code);
// }
if($code != 'C00000') {
if(!in_array($code, ['C00000', 'C00001', 'C00002'])) {
throw new BizException($desc . ' ' . $code, $code);
}
}

Loading…
Cancel
Save