diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php index 1c0f04a2..b0da3978 100644 --- a/webht/third_party/pay/controllers/iPayLinksService.php +++ b/webht/third_party/pay/controllers/iPayLinksService.php @@ -783,8 +783,10 @@ class IPayLinksService extends CI_Controller //APP订单处理,如标题China Train Booking-160617462 if ((strpos($note_invoice_string, 'China Train Booking') !== false) || (strpos($note_invoice_string, 'ChinaTrainBooking') !== false)) { $note_invoice_string = explode('-', $note_invoice_string); - if (isset($note_invoice_string[1])) { + if (isset($note_invoice_string[1]) && $note_invoice_string[1] !== "ChinaTrainBooking") { $note_invoice_string = trim($note_invoice_string[1]); + } elseif (isset($note_invoice_string[0]) && $note_invoice_string[0] !== "China Train Booking") { + $note_invoice_string = trim($note_invoice_string[0]); } return json_encode(array('orderid' => $note_invoice_string, 'ordertype' => 'A')); //APP订单,不需要处理交易记录和通知 } diff --git a/webht/third_party/pay/helpers/payment_helper.php b/webht/third_party/pay/helpers/payment_helper.php index 80dc5010..15339534 100644 --- a/webht/third_party/pay/helpers/payment_helper.php +++ b/webht/third_party/pay/helpers/payment_helper.php @@ -106,8 +106,10 @@ function analysis_orderid($note_invoice_string) { //APP订单处理,如标题China Train Booking-160617462 if ((strpos($note_invoice_string, 'China Train Booking') !== false) || (strpos($note_invoice_string, 'ChinaTrainBooking') !== false)) { $note_invoice_string = explode('-', $note_invoice_string); - if (isset($note_invoice_string[1])) { + if (isset($note_invoice_string[1]) && $note_invoice_string[1] !== "ChinaTrainBooking") { $note_invoice_string = trim($note_invoice_string[1]); + } elseif (isset($note_invoice_string[0]) && $note_invoice_string[0] !== "China Train Booking") { + $note_invoice_string = trim($note_invoice_string[0]); } return json_encode(array('orderid' => $note_invoice_string, 'ordertype' => 'A')); //APP订单,不需要处理交易记录和通知 } diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index f4ad53f5..d9601bc7 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -623,8 +623,10 @@ class Index extends CI_Controller { //APP订单处理,如标题China Train Booking-160617462 if ((strpos($note_invoice_string, 'China Train Booking') !== false) || (strpos($note_invoice_string, 'ChinaTrainBooking') !== false)) { $note_invoice_string = explode('-', $note_invoice_string); - if (isset($note_invoice_string[1])) { + if (isset($note_invoice_string[1]) && $note_invoice_string[1] !== "ChinaTrainBooking") { $note_invoice_string = trim($note_invoice_string[1]); + } elseif (isset($note_invoice_string[0]) && $note_invoice_string[0] !== "China Train Booking") { + $note_invoice_string = trim($note_invoice_string[0]); } return json_encode(array('orderid' => $note_invoice_string, 'ordertype' => 'A')); //APP订单,不需要处理交易记录和通知 } @@ -927,7 +929,6 @@ class Index extends CI_Controller { //根据订单号查找外联信息 $advisor_info = $this->Paypal_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype, $handpick); - //查不到订单信息 if (empty($advisor_info)) { $this->Note_model->update_send($item->pn_txn_id, 'sendfail');