From 17bad59d04cbaa5ef72e002d6b02c72b13befdab Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 17 Dec 2020 00:00:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E8=B0=83=E6=95=B4=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=AE=9D=E8=AF=81=E4=B9=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/data/service/payment/AlipayPaymentService.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/data/service/payment/AlipayPaymentService.php b/app/data/service/payment/AlipayPaymentService.php index 530ee35f5..71b4c0a74 100644 --- a/app/data/service/payment/AlipayPaymentService.php +++ b/app/data/service/payment/AlipayPaymentService.php @@ -54,11 +54,7 @@ class AlipayPaymentService extends PaymentService */ private function _trimCertHeader(string $content): string { - $search = [ - '-----BEGIN PUBLIC KEY-----', '-----END PUBLIC KEY-----', - '-----BEGIN RSA PRIVATE KEY-----', '-----END RSA PRIVATE KEY-----', - ]; - return preg_replace('/\s+/', '', str_replace(trim($content), $search, '')); + return preg_replace(['/\s+/', '/-{5}.*?-{5}/'], '', $content); } /**