perf: PayPal: 网站直接的收款记录处理, 使用临时表的订单号

webht/payment
Lei OT 2 years ago
parent 72cec5586a
commit 8fd2ffd1ed

@ -805,6 +805,11 @@ class Index extends CI_Controller {
$data['unsend_list'] = $this->Note_model->unsend(10);
}
// 处理失败 并 Completed
if (empty($data['unsend_list'])) {
$data['unsend_list'] = $this->Note_model->failnotec(20);
}
//没有未处理的数据再查找处理失败的数据
if (empty($data['unsend_list'])) {
$data['unsend_list'] = $this->Note_model->failnote(20);
@ -907,6 +912,19 @@ class Index extends CI_Controller {
//根据订单号查找外联信息
$advisor_info = $this->Paypal_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype, $handpick);
//根据订单号查找外联信息, 从临时表
$advisor_info_from_tmp = $this->Paypal_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->pn_txn_id, 'closeRecord', $item->pn_sn);
$this->Note_model->set_invoice($item->pn_txn_id, $advisor_info_from_tmp->COLI_ID . '_' . $orderid_info->ordertype);
continue;
}
// for trippest tourMaster 2018.05.28
if ($orderid_info->ordertype == 'TP') {
$this->trippest_note($orderid_info, $item);

@ -36,6 +36,14 @@ class Note_model extends CI_Model {
return $this->get_list();
}
public function failnotec($topnum = 2) {
$this->init();
$this->topnum = $topnum;
$this->pn_send = " AND (pn_send='sendfail' OR pn_send='') AND pn_payment_status='Completed' ";
//$this->orderby = ' ORDER BY pn.pn_sn ASC ';
return $this->get_list();
}
public function failnote($topnum = 2) {
$this->init();
$this->topnum = $topnum;

Loading…
Cancel
Save