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 @@ +