|
|
|
@ -785,21 +785,21 @@ class Index extends CI_Controller {
|
|
|
|
|
&& $orderid_info->ordertype == 'A' && strpos($get_order_no, 'China Train Booking') !== false) {
|
|
|
|
|
// APP 组的China Train Booking-开头的订单号
|
|
|
|
|
// 发送邮件提醒外联核对收款金额, 不写入收款记录
|
|
|
|
|
$this->process_notify_APP($item, $orderid_info);
|
|
|
|
|
continue;
|
|
|
|
|
$if_empty_gai = $this->process_notify_APP($item, $orderid_info);
|
|
|
|
|
if($if_empty_gai !== true) { continue }; // 收款记录为空, 需要补录
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//检测是否是APP订单,默认不处理
|
|
|
|
|
// && $item->pn_payment_status !== 'Refunded'
|
|
|
|
|
if (
|
|
|
|
|
( (strpos($item->pn_memo, 'China Train Booking') !== false)
|
|
|
|
|
|| (strpos($item->pn_memo, 'ChinaTrainBooking') !== false)
|
|
|
|
|
)
|
|
|
|
|
&& empty($pn_txn_id)
|
|
|
|
|
) { //APP自动出票的订单不需要处理
|
|
|
|
|
$this->Note_model->update_send($item->pn_txn_id, 'send');
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// if (
|
|
|
|
|
// ( (strpos($item->pn_memo, 'China Train Booking') !== false)
|
|
|
|
|
// || (strpos($item->pn_memo, 'ChinaTrainBooking') !== false)
|
|
|
|
|
// )
|
|
|
|
|
// && empty($pn_txn_id)
|
|
|
|
|
// ) { //APP自动出票的订单不需要处理
|
|
|
|
|
// $this->Note_model->update_send($item->pn_txn_id, 'send');
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//根据订单号查找外联信息
|
|
|
|
|
$advisor_info = $this->Paypal_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype, $handpick);
|
|
|
|
@ -820,10 +820,10 @@ class Index extends CI_Controller {
|
|
|
|
|
$this->Note_model->set_invoice($item->pn_txn_id, $orderid_info->orderid . '_' . $orderid_info->ordertype);
|
|
|
|
|
|
|
|
|
|
//检测是否是APP订单,默认不处理
|
|
|
|
|
if ($orderid_info->ordertype == 'A' ) { //APP自动出票的订单不需要处理
|
|
|
|
|
$this->Note_model->update_send($item->pn_txn_id, 'send');
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
// if ($orderid_info->ordertype == 'A' ) { //APP自动出票的订单不需要处理
|
|
|
|
|
// $this->Note_model->update_send($item->pn_txn_id, 'send');
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//添加支付信息入库
|
|
|
|
|
//没有分配订单之前先添加付款记录,这个过程可能会执行多次,必须在添加记录前查找是否有数据
|
|
|
|
@ -1485,8 +1485,9 @@ class Index extends CI_Controller {
|
|
|
|
|
$this->Note_model->update_send($item->pn_txn_id, 'sendfail');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
$order_gai_list = $this->Paypal_model->get_money_list($orderid_info->orderid, $item->pn_mc_gross, $item->pn_mc_currency);
|
|
|
|
|
//添加邮件发送记录
|
|
|
|
|
if ($item->pn_send !== 'send') {
|
|
|
|
|
if ($item->pn_send !== 'send' && empty($order_gai_list)) {
|
|
|
|
|
//给外联发送通知邮件
|
|
|
|
|
$fromName = !empty($item->pn_payer) ? $item->pn_payer : '';
|
|
|
|
|
$fromEmail = !empty($item->pn_payer_email) ? $item->pn_payer_email : '';
|
|
|
|
@ -1502,7 +1503,8 @@ class Index extends CI_Controller {
|
|
|
|
|
//添加邮件发送记录 end
|
|
|
|
|
$this->Note_model->update_send($item->pn_txn_id, 'send');
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
$order_gai = $this->Paypal_model->get_money_list($orderid_info->orderid);
|
|
|
|
|
return empty($order_gai);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|