From 3dc01ebc43eb9161e6ec7531a910bf35cfafc2a5 Mon Sep 17 00:00:00 2001
From: Jimmy Liow <18777396951@163.com>
Date: Thu, 6 Apr 2023 14:31:13 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?=
=?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0=E8=AE=A2=E5=8D=95=E4=BF=A1=E6=81=AF?=
=?UTF-8?q?=E4=BD=BF=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../third_party/paypal/controllers/index.php | 36 +++++++++++++++++++
.../third_party/paypal/views/gai_setting.php | 2 ++
webht/third_party/paypal/views/note_list.php | 17 +++++++++
3 files changed, 55 insertions(+)
diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php
index 54666eb5..ced0d670 100644
--- a/webht/third_party/paypal/controllers/index.php
+++ b/webht/third_party/paypal/controllers/index.php
@@ -1572,6 +1572,42 @@ class Index extends CI_Controller {
}
echo json_encode($this->load->view('gai_setting', $data, true));
}
+
+ /** 测试收款记录的是否已录入到订单
+ * 测试找不到订单信息使用
+ */
+ public function test_gai_modal($pn_txn_id=null, $pn_id = null, $neworder=null)
+ {
+ $data = array();
+ $data['note'] = $this->Note_model->note($pn_txn_id, $pn_id);
+ $orderid_info = $this->analysis_orderid($data['note']->pn_invoice);
+ if (!empty($orderid_info)) {
+ $orderid_info = json_decode($orderid_info);
+ if ($orderid_info->ordertype === 'TP' || $orderid_info->ordertype === 'A') {
+ $orderid_info->ordertype = 'B';
+ }
+ if ($orderid_info->ordertype === 'T') {
+ $data['gai_info'] = $this->Paypal_model->get_money_t($pn_txn_id);
+ } elseif ($orderid_info->ordertype === 'B') {
+ $data['gai_info'] = $this->Paypal_model->get_money_b($pn_txn_id);
+ }
+ }
+ $data['old_order'] = $data['note']->pn_invoice;
+ $data['new_order'] = $neworder;
+ $data['order_info'] = null;
+ if ($neworder !== null) {
+ $neworder_id = $this->analysis_orderid($neworder);
+ $neworder_id = json_decode($neworder_id);
+ if ($neworder_id->ordertype === 'TP') {
+ $neworder_id->ordertype = 'B';
+ }
+ if ( ! empty($neworder_id)) {
+ $data['order_info'] = $this->Paypal_model->get_order($neworder_id->orderid, true, $neworder_id->ordertype);
+ }
+ }
+ echo json_encode($data);
+ }
+
public function gai_modal_save()
{
$data = array();
diff --git a/webht/third_party/paypal/views/gai_setting.php b/webht/third_party/paypal/views/gai_setting.php
index e11d0137..187b5f0a 100644
--- a/webht/third_party/paypal/views/gai_setting.php
+++ b/webht/third_party/paypal/views/gai_setting.php
@@ -19,6 +19,8 @@
+
订单详细内容:
diff --git a/webht/third_party/paypal/views/note_list.php b/webht/third_party/paypal/views/note_list.php
index 47b4c3a9..2fa72dc9 100644
--- a/webht/third_party/paypal/views/note_list.php
+++ b/webht/third_party/paypal/views/note_list.php
@@ -383,6 +383,23 @@ echo "