diff --git a/wx/V3/WxV3AppPayment.php b/wx/V3/WxV3AppPayment.php index 5f1f016..e2706af 100644 --- a/wx/V3/WxV3AppPayment.php +++ b/wx/V3/WxV3AppPayment.php @@ -20,7 +20,7 @@ class WxV3AppPayment extends SmallProgram * @return array * @throws */ - public function payment(string $orderNo, int $total, string $openId = NULL, string $payer_client_ip = '127.0.0.1'): array + public function payment(string $orderNo, int $total, ?string $openId = NULL, string $payer_client_ip = '127.0.0.1'): array { $body = $this->getInitCore($orderNo, $total); diff --git a/wx/V3/WxV3NativePayment.php b/wx/V3/WxV3NativePayment.php index 9e02e00..2850462 100644 --- a/wx/V3/WxV3NativePayment.php +++ b/wx/V3/WxV3NativePayment.php @@ -22,7 +22,7 @@ class WxV3NativePayment extends SmallProgram * @throws */ #[ArrayShape(['code_url' => "string"])] - public function payment(string $orderNo, int $total, string $openId = NULL, string $payer_client_ip = '127.0.0.1'): array + public function payment(string $orderNo, int $total, ?string $openId = NULL, string $payer_client_ip = '127.0.0.1'): array { $body = $this->getInitCore($orderNo, $total); diff --git a/wx/V3/WxV3Payment.php b/wx/V3/WxV3Payment.php index 0d51515..890ba8d 100644 --- a/wx/V3/WxV3Payment.php +++ b/wx/V3/WxV3Payment.php @@ -20,7 +20,7 @@ class WxV3Payment extends SmallProgram * @return array * @throws */ - public function payment(string $orderNo, int $total, string $openId = NULL, string $payer_client_ip = '127.0.0.1'): array + public function payment(string $orderNo, int $total, ?string $openId = NULL, string $payer_client_ip = '127.0.0.1'): array { $body = $this->getInitCore($orderNo, $total); $body['payer'] = ['openid' => $openId];