From 845ddde6a845b0c85b99432c76475177336a19df Mon Sep 17 00:00:00 2001 From: lyt Date: Thu, 23 May 2019 19:02:03 +0800 Subject: [PATCH] =?UTF-8?q?PayPal=20webhook=20=E4=B8=8D=E5=8F=91=E9=82=AE?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/paypal/controllers/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 1677ced4..dcd5aca3 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -963,7 +963,10 @@ class Index extends CI_Controller { //添加邮件发送记录 $webhook_memo = json_decode($item->pn_memo); - $is_webhook = substr($webhook_memo->id, 0, 2)==="WH" ? true : false; + $is_webhook = false; + if (isset($webhook_memo->id) && substr($webhook_memo->id, 0, 2)==="WH") { + $is_webhook = true; + } if ($item->pn_send !== 'send' && false===$is_webhook) { //给外联发送通知邮件 $fromName = !empty($item->pn_payer) ? $item->pn_payer : '';