feat: PayPal获取记录信息

feature/pay
lyt 6 years ago
parent eb3d97d6b8
commit 4bb504224e

@ -1262,13 +1262,13 @@ class Index extends CI_Controller {
} }
//获取note详情修改各项数据 //获取note详情修改各项数据
public function note_modal($pn_txn_id, $pn_invoice = false) { public function note_modal($pn_txn_id, $pn_id=false, $pn_invoice=false) {
$this->permission->is_admin(true); $this->permission->is_admin(true);
$data = array(); $data = array();
$data['pn_invoice'] = $pn_invoice;
if (!empty($pn_txn_id)) { if (!empty($pn_txn_id)) {
$data['note'] = $this->Note_model->note($pn_txn_id); $data['note'] = $this->Note_model->note($pn_txn_id, $pn_id);
if (!empty($data['note'])) { if (!empty($data['note'])) {
$data['pn_invoice'] = $data['note']->pn_invoice;
if (!empty($pn_invoice)) { if (!empty($pn_invoice)) {
$orderid_info = $this->analysis_orderid($pn_invoice); $orderid_info = $this->analysis_orderid($pn_invoice);
} else { } else {

@ -56,7 +56,7 @@ class Note_model extends CI_Model {
$this->init(); $this->init();
$this->topnum=1; $this->topnum=1;
$this->pn_txn_id=" AND pn.pn_txn_id=".$this->HT->escape($pn_txn_id); $this->pn_txn_id=" AND pn.pn_txn_id=".$this->HT->escape($pn_txn_id);
$this->pn_txn_id .= ($pn_sn===NULL) ? "" : " AND pn.pn_sn=".$this->HT->escape($pn_sn); $this->pn_txn_id .= !($pn_sn) ? "" : " AND pn.pn_sn=".$this->HT->escape($pn_sn);
$this->orderby=" ORDER BY pn_payment_date, pn_payer desc "; $this->orderby=" ORDER BY pn_payment_date, pn_payer desc ";
return $this->get_list(); return $this->get_list();
} }

@ -208,6 +208,7 @@ echo "<option value=\"$vf->TEL_SN@" . strstr($vf->TEL_transactionDate, " ", true
<?php <?php
$show_send = ''; $show_send = '';
$class_css = ''; $class_css = '';
$raw_content = json_decode($item->pn_memo);
$show_record = '查看录入状态'; $show_record = '查看录入状态';
if ($item->pn_send == 'send' || substr($item->pn_send, 0, 5) == "send-") { if ($item->pn_send == 'send' || substr($item->pn_send, 0, 5) == "send-") {
$show_send = 'send'; $show_send = 'send';
@ -218,9 +219,9 @@ echo "<option value=\"$vf->TEL_SN@" . strstr($vf->TEL_transactionDate, " ", true
$show_send = $item->pn_send; $show_send = $item->pn_send;
} else { } else {
$class_css = 'btn-danger'; $class_css = 'btn-danger';
$show_send = $item->pn_payment_status; $show_send = $item->pn_payment_status ? $item->pn_payment_status : $raw_content->txn_type;
} }
?><a href="javascript:void(0);" onclick="show_order_modal('<?php echo $item->pn_txn_id; ?>', '')" class="btn btn-sm <?php echo $class_css; ?>"><?php echo $show_send; ?></a> ?><a href="javascript:void(0);" onclick="show_order_modal('<?php echo $item->pn_txn_id; ?>', '<?php echo $item->pn_sn; ?>', '<?php echo $item->pn_invoice; ?>')" class="btn btn-sm <?php echo $class_css; ?>"><?php echo $show_send; ?></a>
<br class="hidden-xs"> <br class="hidden-xs">
<a href="javascript:void(0);" class="text_padding text-primary" style="padding: 10px;" <a href="javascript:void(0);" class="text_padding text-primary" style="padding: 10px;"
onclick="show_gai_modal('<?php echo $item->pn_txn_id; ?>','<?php echo $item->pn_sn; ?>')" onclick="show_gai_modal('<?php echo $item->pn_txn_id; ?>','<?php echo $item->pn_sn; ?>')"
@ -334,11 +335,11 @@ echo "<option value=\"$vf->TEL_SN@" . strstr($vf->TEL_transactionDate, " ", true
}); });
} }
function show_order_modal(pn_txn_id, pn_invoice) { function show_order_modal(pn_txn_id, pn_id, pn_invoice) {
$.ajax({ $.ajax({
type: "get", type: "get",
dataType: "json", dataType: "json",
url: '<?php echo site_url('apps/paypal/index/note_modal/'); ?>' + '/' + pn_txn_id + '/' + pn_invoice, url: '<?php echo site_url('apps/paypal/index/note_modal/'); ?>' + '/' + pn_txn_id + '/' + pn_id + '/' + pn_invoice,
success: function(data, textStatus) { success: function(data, textStatus) {
$('#modal_set_orderid_body').html(data); $('#modal_set_orderid_body').html(data);
$('#modal_set_orderid').modal('show'); $('#modal_set_orderid').modal('show');

@ -34,7 +34,7 @@
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" id="pn_invoice" name="pn_invoice" value="<?php echo!empty($pn_invoice) ? $pn_invoice : $note->pn_invoice; ?>"> <input type="text" class="form-control" id="pn_invoice" name="pn_invoice" value="<?php echo!empty($pn_invoice) ? $pn_invoice : $note->pn_invoice; ?>">
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-default" type="button" onclick="show_order_modal('<?php echo $note->pn_txn_id; ?>', $('#pn_invoice').val())" ><span class="glyphicon glyphicon-search"></span></button> <button class="btn btn-default" type="button" onclick="show_order_modal('<?php echo $note->pn_txn_id; ?>', 0, $('#pn_invoice').val())" ><span class="glyphicon glyphicon-search"></span></button>
</span> </span>
</div> </div>
<label class="text-danger">订单号形如: 160414408_B , B商务订单JJ160321052_T,T传统订单请务必加上后缀</label> <label class="text-danger">订单号形如: 160414408_B , B商务订单JJ160321052_T,T传统订单请务必加上后缀</label>

Loading…
Cancel
Save