|
|
|
@ -72,18 +72,36 @@ class PaymentService extends CI_Controller {
|
|
|
|
|
$this->permission->is_admin(true);
|
|
|
|
|
$data = array();
|
|
|
|
|
$data['date'] = date('Y-m-d');
|
|
|
|
|
$data['method_code'] = '15016';
|
|
|
|
|
$data["method_name"] = $this->code_brandname['15016'];
|
|
|
|
|
$data['notelist'] = $this->note_model->sendfail_note(false);
|
|
|
|
|
array_walk($data["notelist"], 'PaymentService::set_brandname');
|
|
|
|
|
$this->load->view("payment_list",$data);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private $wxpay_app = array(
|
|
|
|
|
"wx749246dd935ca07b" => "APP",
|
|
|
|
|
"wx5d01021a6d515098" => "HLY", // "花梨鹰小程序", // 交行收款码
|
|
|
|
|
"wxd6c8dd69af5128cd" => "", // "NATIVE",
|
|
|
|
|
"wx7e605820faf98a05" => "Trippest-NATIVE",
|
|
|
|
|
"0" => "unknown",
|
|
|
|
|
);
|
|
|
|
|
public function set_brandname(&$ele)
|
|
|
|
|
{
|
|
|
|
|
$ele->brand_name = "none";
|
|
|
|
|
if ($this->code_brandname[$ele->OPN_accountMethod]) {
|
|
|
|
|
$ele->brand_name = $this->code_brandname[$ele->OPN_accountMethod];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$raw = json_decode($ele->OPN_rawContent);
|
|
|
|
|
$wx_app = isset($raw->app_id) ? $raw->app_id : '0';
|
|
|
|
|
$wx_app = $wx_app!=='0' ? $wx_app : (isset($raw->appid) ? $raw->appid : '0');
|
|
|
|
|
|
|
|
|
|
$ele->app_name = "";
|
|
|
|
|
if ($this->wxpay_app[$wx_app]) {
|
|
|
|
|
$ele->app_name = $this->wxpay_app[$wx_app];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// https://www.mycht.cn/webht.php/apps/pay/paymentservice/test_new_function?coli_sn=WY211210012
|
|
|
|
@ -158,6 +176,19 @@ class PaymentService extends CI_Controller {
|
|
|
|
|
$ssje = $old_ssje===NULL ? $ssje : $old_ssje;
|
|
|
|
|
$currencyCode = str_replace("CNY", "RMB", trim(mb_strtoupper($item->OPN_currency)));
|
|
|
|
|
$currencyCode = mb_strtoupper(trim($currencyCode));
|
|
|
|
|
|
|
|
|
|
//根据订单号查找外联信息, 从临时表
|
|
|
|
|
$advisor_info_from_tmp = $this->account_model->get_order($orderid_info->orderid, false, 'M', $handpick);
|
|
|
|
|
/**
|
|
|
|
|
* 传统订单, 网站支付
|
|
|
|
|
* @author LYT
|
|
|
|
|
*/
|
|
|
|
|
if (empty($advisor_info) && ! empty($advisor_info_from_tmp) && $orderid_info->ordertype == 'T') {
|
|
|
|
|
// $this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'closed');
|
|
|
|
|
$this->note_model->set_invoice($item->OPN_SN, $advisor_info_from_tmp->COLI_ID . '_' . $orderid_info->ordertype);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( empty($advisor_info)) {
|
|
|
|
|
// record fail
|
|
|
|
|
$this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'sendfail');
|
|
|
|
@ -273,6 +304,16 @@ class PaymentService extends CI_Controller {
|
|
|
|
|
$opi_email = 'contact@arachina.com';
|
|
|
|
|
$opi_firstname = 'contact@arachina.com';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 已经记录的再次遇到就忽略了
|
|
|
|
|
* @author LYT
|
|
|
|
|
*/
|
|
|
|
|
if (empty($opi_email) && $item->OPN_accountStatus === 'recorded') {
|
|
|
|
|
$this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'closed');
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//没有外联信息表示订单未分配
|
|
|
|
|
if (empty($opi_email) || empty($opi_firstname)) {
|
|
|
|
|
$this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'sendfail');
|
|
|
|
|