同步网前支付页面的代码;批量处理通知输出记录总数

hotfix/远程访问多媒体中心
lyt 9 years ago
parent 3b21e3a85f
commit 7959c035aa

@ -1,13 +1,11 @@
<?php
$config['version'] = "1.1";
$config['partnerId'] = "10000007562";
$config['partnerId'] = "10000004000";
$config['siteId'] = "www.chinahighlights.com";
$config['tradeType'] = "1001";
$config['borrowingMarked'] = "0";
$config['returnUrl'] = "https://www.chinahighlights.com/secureipay/load_return";
$config['noticeUrl'] = "http://www.mycht.cn/webht.php/apps/pay/ipaylinks_notice";
// $config['returnUrl'] = "http://202.103.68.79:88/guide-use.php/apps/pay/iPayLinksService/load_return";
// $config['noticeUrl'] = "http://202.103.68.79:88/guide-use.php/apps/pay/iPayLinksService/ipaylinks_notice";
$config['noticeUrl'] = "http://www.mycht.cn/webht.php/apps/pay/iPayLinksService/ipaylinks_notice";
$config['mcc'] = "5000";
$config['payType'] = "EDC";
$config['payMode'] = "10";
@ -15,16 +13,10 @@ $config['charset'] = "1";
$config['signType'] = "2";
$config['signMsg'] = "";
$config['gatewayUrl'] = "https://api.ipaylinks.com/webgate/crosspay.htm";
// test
// $config['gatewayUrl'] = "http://api.test.ipaylinks.com/webgate/crosspay.htm";
$config['dev_gatewayUrl'] = "http://api.test.ipaylinks.com/webgate/crosspay.htm";
$config['currencyCode'] = "USD";
$config['travDetailsSize'] = "0";
$config['pkey'] = "30819f300d06092a864886f70d010101050003818d0030818902818100c2446c6be39938f29e2150a8b929a5e44ee39b774775270a0c223e3cad717eaa15ab17fed5d0a04fc75e10d6c97644b10269a9cf842f47ca8d22e0d0c906c7314ae11dd73a64ab721b9a11aaa5588b4f039e1d1e9809fccdfb698ea72e14d86ba6731ebff1635f8901b0e04ffdd588be9b7d5fb549deaf391f6a71fced37dbd50203010001"; // 商户证书的公钥
$config['pkey'] = "30819f300d06092a864886f70d010101050003818d00308189028181008c903972be5509375edec0d6793d8d3eb533334d146069b5dfcdafd24e5c7d0a05d1774488ea257d504a18c9098d798c0f523f3ad722e3e9c32ae7fecd7e734b340b9c8ff805aa32d0a49cb6df9eca3bb6954d966f6148533a8d667aabb55b2762dcd06308c94d24d257dfdb2ad86b46702774c51e7627e5b707d52224ef794b0203010001"; // 商户证书的公钥
$config['queryUrl'] = "https://query.ipaylinks.com/webgate/orderQuery.htm";
// test
// $config['queryUrl'] = "http://api.test.ipaylinks.com/webgate/orderQuery.htm";
$config['dev_queryUrl'] = "http://api.test.ipaylinks.com/webgate/orderQuery.htm";
$config['query_mode'] = "1";
$config['query_type'] = "1";

@ -6,7 +6,6 @@ if (!defined('BASEPATH'))
class IPayLinksService extends CI_Controller
{
public $gatewayUrl;
public $dev_gatewayUrl;
public $pay_info_arr = array();
public $query_info_arr = array();
public $order_info_arr = array();
@ -30,7 +29,8 @@ class IPayLinksService extends CI_Controller
$this->notify_url = $this->config->item('noticeUrl');
$this->pay_info_arr['version'] = $this->query_info_arr['version'] = $this->config->item('version');
$this->pay_info_arr['partnerId'] = $this->query_info_arr['partnerId'] = $this->config->item('partnerId');
$this->pay_info_arr['partnerId'] = $this->query_info_arr['partnerId'] = "10000004000";
// $this->pay_info_arr['partnerId'] = $this->query_info_arr['partnerId'] = $this->config->item('partnerId');
$this->pay_info_arr['charset'] = $this->query_info_arr['charset'] = $this->config->item('charset');
$this->pay_info_arr['signType'] = $this->query_info_arr['signType'] = $this->config->item('signType');
@ -114,19 +114,11 @@ class IPayLinksService extends CI_Controller
$data['month_html'] .= "<option value='".($i)."'>".($i)."</option>";
}
$this->get_order_info();
$param_arr = $this->order_info_arr['goodsDesc'];
$data['description'] = $param_arr = str_replace("\n", "<br>", $this->order_info_arr['goodsDesc']) ;
bcscale(2);
$data['amount'] = strval(bcdiv($this->order_info_arr['orderAmount'], 100));
$data['currencyCode'] = $this->pay_info_arr['currencyCode'];
$data['orderId'] = $this->order_info_arr['orderId'];
if (strpos($param_arr, 'Tracking Code:') !== false) {
$tmp = explode("Tracking Code:", $this->order_info_arr['goodsDesc']);
$data["track_code"] = trim(explode("Travel Advisor:", $tmp[1])[0]);
$tmp = explode("Travel Advisor:", $tmp[1]);
$tmp = explode("Content:", $tmp[1]);
$data["advisor"] = trim($tmp[0]);
$data["content"] = trim($tmp[1]);
}
$this->load->view("iPayLinks_index",$data);
}
@ -299,6 +291,7 @@ class IPayLinksService extends CI_Controller
public function batch_send_note($pn_txn_id = false)
{
$data = array();
$int = 0;
//优先处理指定的交易号,用于修正交易号直接发送通知
if ( ! empty($pn_txn_id)) {
@ -432,11 +425,9 @@ class IPayLinksService extends CI_Controller
//给外联发送通知邮件
$fromName = 'iPayLinks';
$fromEmail = '';
// test
$toName = !empty($opi_firstname) ? $opi_firstname : '';
$toEmail = !empty($opi_email) ? $opi_email : '';
$subject = $orderid_info->orderid . '_' . $orderid_info->ordertype . ' / ' . $item->IPL_payAmount . $item->IPL_currencyCode . ' / ' . $fromName;
// todo
$body = $this->load->view('receipt_mail', $item, true);
$M_RelatedInfo = $item->IPL_sn;
$M_AddTime = $item->IPL_completeTime;
@ -445,7 +436,9 @@ class IPayLinksService extends CI_Controller
//添加邮件发送记录 end
$this->Note_model->update_send($item->IPL_dealId, 'send');
$int++;
}
echo "done. recorde count:".$int;
return;
}
@ -592,7 +585,8 @@ class IPayLinksService extends CI_Controller
{
ksort($request);
unset($request['signMsg']);
$request['pkey'] = $this->config->item('pkey');
$request['pkey'] = "30819f300d06092a864886f70d010101050003818d00308189028181008c903972be5509375edec0d6793d8d3eb533334d146069b5dfcdafd24e5c7d0a05d1774488ea257d504a18c9098d798c0f523f3ad722e3e9c32ae7fecd7e734b340b9c8ff805aa32d0a49cb6df9eca3bb6954d966f6148533a8d667aabb55b2762dcd06308c94d24d257dfdb2ad86b46702774c51e7627e5b707d52224ef794b0203010001";
// $request['pkey'] = $this->config->item('pkey');
$param_str = "";
foreach ($request as $sysParamKey => $sysParamValue) {
if ($sysParamKey == "details") {

@ -79,23 +79,24 @@
<div class="tourSelected pay_form">
<ul class="row">
<li><label class="col-md-12 col-xs-12 orderinfo_label">Tracking Code:</label><label class="col-md-12 col-xs-12">
<?php if($track_code) {echo $track_code;}else{echo $orderId;} ?>
</label></li>
<li><label class="col-md-12 col-xs-12 orderinfo_label">Travel Advisor:</label> <label class="col-md-12 col-xs-12">
<?php if($advisor) echo $advisor; ?>
<?php echo $orderId; ?>
</label></li>
<li>
<label class="col-md-12 col-xs-12 orderinfo_label">Total:</label>
<label class="col-md-12 col-xs-12"><span class="text-danger">
<?php if($amount) echo $amount; ?>
</span>
<?php if($currencyCode) echo $currencyCode; ?>
</label>
</li>
<li><label class="col-md-12 col-xs-12 orderinfo_label">Content:</label><label class="col-md-12 col-xs-12">
<?php if($content) echo $content; ?>
</label></li>
<li><label class="col-md-12 col-xs-12 orderinfo_label">Total:</label>
<label class="col-md-12 col-xs-12"><span class="text-danger">
<?php if($amount) echo $amount; ?>
</span>
<?php if($currencyCode) echo $currencyCode; ?>
</label></li>
<li><label class="col-md-12 col-xs-12 orderinfo_label">Beneficiary:</label>
<label class="col-md-12 col-xs-12">China Highlights International Travel Service Co., Ltd</label> </li>
<li><label class="col-md-12 col-xs-12 orderinfo_label">Description:</label>
</li>
<li>
<label class="col-md-24 col-xs-24">
<?php if($description) echo $description; ?>
</label>
</li>
</ul>
</div>
</div>

@ -58,7 +58,7 @@
<!-- left -->
<div class="col-md-4 col-xs-24">
<div class="row">
<form method="post" id="search_list" action="http://www.mycht.cn/webht.php/apps/pay/note_list/">
<form method="post" id="search_list" action="http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/note_list/">
<div class="input-group">
<input type="text" name="keywords" value="<?php echo isset($search_key) ? $search_key : ''; ?>" class="form-control" placeholder="订单号" style="height: 33px;-webkit-box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);box-shadow: inset 0 0px 0px rgba(0,0,0,0.075);border-bottom:1px solid #ddd;">
<span class="input-group-addon search-btn" onclick="$('#search_list').submit();"></span>
@ -68,11 +68,11 @@
</div>
<p class="btn-lg"></p>
<ul class="list-unstyled hidden-xs links">
<li><a class="text-primary" href="http://www.mycht.cn/webht.php/apps/pay/note_list">&gt;全部收款邮件</a></li>
<li><a class="text-primary" href="http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/note_list">&gt;全部收款邮件</a></li>
<li class="btn-sm"></li>
<li><a class="text-primary" href="http://www.mycht.cn/webht.php/apps/pay/note_faillist" >&gt;错误通知列表</a></li>
<li><a class="text-primary" href="http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/note_faillist" >&gt;错误通知列表</a></li>
<li class="btn-sm"></li>
<li><a class="text-primary" href="http://www.mycht.cn/webht.php/apps/pay/batch_send_note" target="_blank">&gt;手动处理通知</a></li>
<li><a class="text-primary" href="http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/batch_send_note" target="_blank">&gt;手动处理通知</a></li>
<li class="btn-sm"></li>
<li><a class="text-primary" href="http://share.chtcdn.com/info.php/sendmail/send_mail" target="_blank">&gt;发送邮件</a></li>
<li class="btn-lg"></li>
@ -105,7 +105,7 @@
<li class="col-sm-2 nopadding-L" style="overflow:hidden;word-break: break-all;height: 25px;"><?php echo ($key + 1); ?></li>
<li class="col-sm-7 nopadding-L" style="overflow:hidden;word-break: break-all;height: 25px;">
<a class="seen" target="_blank" href="http://www.mycht.cn/webht.php/apps/pay/receipt/<?php echo $item->IPL_dealId; ?>">
<a class="seen" target="_blank" href="http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/receipt/<?php echo $item->IPL_dealId; ?>">
<?php echo $item->IPL_orderId . ' / ' . $item->IPL_payAmount . $item->IPL_currencyCode; ?>
</a></li>
@ -176,7 +176,7 @@
defaultDate: '<?php echo $date; ?>',
dateFormat: 'yy-mm-dd',
onSelect: function(dateText) {
window.location.href = 'http://www.mycht.cn/webht.php/apps/pay/note_list/?date=' + dateText;
window.location.href = 'http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/note_list?date=' + dateText;
}
});
$(".ui-datepicker").css('width', '15.7em');
@ -186,7 +186,7 @@
$.ajax({
type: "get",
dataType: "json",
url: 'http://www.mycht.cn/webht.php/apps/pay/note_modal/' + pn_txn_id + '/' + pn_invoice,
url: 'http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/note_modal/' + pn_txn_id + '/' + pn_invoice,
success: function(data, textStatus) {
$('#modal_set_orderid_body').html(data);
$('#modal_set_orderid').modal('show');
@ -203,7 +203,7 @@
$.ajax({
type: "get",
dataType: "json",
url: 'http://www.mycht.cn/webht.php/apps/pay/close_note/' + pn_txn_id,
url: 'http://www.mycht.cn/webht.php/apps/pay/ipaylinksservice/close_note/' + pn_txn_id,
success: function(data, textStatus) {
alert(data);
},

@ -1,4 +1,4 @@
<form action="http://www.mycht.cn/webht.php/apps/pay/note_modal_save" method="post" id="form_modal_orderid" name="form_modal_orderid">
<form action="http://www.mycht.cn/webht.php/apps/pay/iPayLinksService/note_modal_save" method="post" id="form_modal_orderid" name="form_modal_orderid">
<dl class="dl-horizontal">
<dt>交易号</dt>

Loading…
Cancel
Save