|
|
|
@ -77,13 +77,21 @@ class InvoiceIssuance extends Base |
|
|
|
$param = $this->request->post(); |
|
|
|
|
|
|
|
validate(InvoiceIssuanceValidate::class)->scene('feePay')->check($param); |
|
|
|
$tax_number = $param['tax_number'] ?? ''; |
|
|
|
if (!empty($tax_number)) { |
|
|
|
$str = '0-9A-HJ-NPQRTUWXY'; |
|
|
|
$pattern = '/^[' . $str . ']{2}\d{6}[' . $str . ']{10}$/'; |
|
|
|
if (!preg_match($pattern, $tax_number)) { |
|
|
|
throw new \Exception('纳税人编号格式错误'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$res = InvoiceIssuanceService::validateFeePay( |
|
|
|
$param['pucode'], |
|
|
|
$param['expire_time'], |
|
|
|
$param['project_id'], |
|
|
|
$param['merge'], |
|
|
|
$param['tax_number'] |
|
|
|
$tax_number |
|
|
|
); |
|
|
|
|
|
|
|
return $this->buildSuccess($res); |
|
|
|
|