Merge branch 'feature/pay'

hotfix/远程访问多媒体中心
lyt 6 years ago
commit 13cbdb81b5

@ -100,9 +100,10 @@ class PaymentService extends CI_Controller {
// 填入提取到的订单号 // 填入提取到的订单号
$this->note_model->set_invoice($item->OPN_SN, $orderid_info->orderid . '_' . $orderid_info->ordertype); $this->note_model->set_invoice($item->OPN_SN, $orderid_info->orderid . '_' . $orderid_info->ordertype);
$send_email = true;
// APP自动出票的收款 跳过 // APP自动出票的收款 跳过
// todo: 检测APP收款是否存在
if ($orderid_info->ordertype === 'A' && $item->OPN_noticeType === 'pay') { if ($orderid_info->ordertype === 'A' && $item->OPN_noticeType === 'pay') {
$send_email = false;
// $this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'closed'); // $this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'closed');
// continue; // continue;
} }
@ -125,7 +126,7 @@ class PaymentService extends CI_Controller {
if ($advisor_info->order_type == 0) { if ($advisor_info->order_type == 0) {
/* 商务订单 */ /* 商务订单 */
// todo: 检测收/退款是否存在 // todo: 检测收/退款是否存在
if (substr($advisor_info->COLI_WebCode, 0, 6) == 'CHTAPP') { if (substr($advisor_info->COLI_WebCode, 0, 6) == 'CHTAPP' && strstr($advisor_info->COLI_WebCode, "-") !== '-biz') {
/* APP */ /* APP */
$this->account_model->add_account_info_forAPP( $this->account_model->add_account_info_forAPP(
$COLI_SN, $COLI_SN,
@ -226,7 +227,7 @@ class PaymentService extends CI_Controller {
} }
//添加邮件发送记录 //添加邮件发送记录
//给外联发送通知邮件 //给外联发送通知邮件
if ($handpick===false && $item->OPN_noticeSendStatus !== 'send' && substr($item->OPN_noticeSendStatus, 0, 5) !== 'send-') { if ($send_email===true && $handpick===false && $item->OPN_noticeSendStatus !== 'send' && substr($item->OPN_noticeSendStatus, 0, 5) !== 'send-') {
$fromName = !empty($item->OPN_payerName) ? $item->OPN_payerName : ''; $fromName = !empty($item->OPN_payerName) ? $item->OPN_payerName : '';
$fromEmail = !empty($item->OPN_payerEmail) ? $item->OPN_payerEmail : ''; $fromEmail = !empty($item->OPN_payerEmail) ? $item->OPN_payerEmail : '';
$toName = !empty($opi_firstname) ? $opi_firstname : ''; $toName = !empty($opi_firstname) ? $opi_firstname : '';
@ -236,7 +237,7 @@ class PaymentService extends CI_Controller {
$M_RelatedInfo = $item->OPN_SN; $M_RelatedInfo = $item->OPN_SN;
$M_AddTime = $item->OPN_completeTime; $M_AddTime = $item->OPN_completeTime;
$M_State = 0; $M_State = 0;
// $this->account_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'payment note', 'payment note'); $this->account_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'payment note', 'payment note');
//添加邮件发送记录 end //添加邮件发送记录 end
$this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'send'); $this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'send');
} }
@ -244,7 +245,7 @@ class PaymentService extends CI_Controller {
// todo:iPaylinks需要发收款, 退款发所有 // todo:iPaylinks需要发收款, 退款发所有
// 3. 更新是否发送财务 // 3. 更新是否发送财务
if($is_refund === true ) { if($is_refund === true ) {
$this->send_refund($item, $orderid_info, $advisor_info); $this->send_refund($send_email, $item, $orderid_info, $advisor_info);
} }
//显示处理记录 //显示处理记录
@ -257,10 +258,12 @@ class PaymentService extends CI_Controller {
// return $this->output->set_content_type('application/json')->set_output(json_encode($data)); // return $this->output->set_content_type('application/json')->set_output(json_encode($data));
} }
public function send_refund($item, $orderid_info, $advisor_info) public function send_refund($send_email, $item, $orderid_info, $advisor_info)
{ {
// 发送客人 // 发送客人
if ( $item->OPN_noticeSendStatus !== 'send' && substr($item->OPN_noticeSendStatus, 0, 5) !== 'send-' ) { if ($send_email===true
&& $item->OPN_noticeSendStatus !== 'send' && substr($item->OPN_noticeSendStatus, 0, 5) !== 'send-'
) {
// 客人邮件中的外联落款 // 客人邮件中的外联落款
// $web_code = 'cht'; // 默认cht // $web_code = 'cht'; // 默认cht
$web_lgc = 1; $web_lgc = 1;
@ -292,18 +295,18 @@ class PaymentService extends CI_Controller {
$c_M_RelatedInfo = $item->OPN_SN; $c_M_RelatedInfo = $item->OPN_SN;
$c_M_AddTime = $item->OPN_completeTime; $c_M_AddTime = $item->OPN_completeTime;
$c_M_State = 0; $c_M_State = 0;
// $this->account_model->save_automail( $this->account_model->save_automail(
// $c_fromName, $c_fromName,
// $c_fromEmail, $c_fromEmail,
// $c_toName, $c_toName,
// $c_toEmail, $c_toEmail,
// $c_subject, $c_subject,
// $c_body, $c_body,
// $c_M_RelatedInfo, $c_M_RelatedInfo,
// $c_M_State, $c_M_State,
// $c_M_AddTime, $c_M_AddTime,
// 'ChinaHighlights refund receipt', 'ChinaHighlights refund receipt',
// 'payment note'); 'payment note');
$this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'send-customer'); $this->note_model->update_send($item->OPN_SN, $item->OPN_transactionId, 'send-customer');
} }
// 更新是否需要发送财务 // 更新是否需要发送财务

@ -207,7 +207,7 @@
if ($item->OPN_accountStatus !== 'recorded') { if ($item->OPN_accountStatus !== 'recorded') {
$send_class = 'btn-danger'; $send_class = 'btn-danger';
} }
if ($item->OPN_noticeSendStatus !== 'send' ) { if ($item->OPN_noticeSendStatus !== 'send' || substr($item->OPN_noticeSendStatus, 0, 5) !== 'send-') {
$send_class = 'btn-danger'; $send_class = 'btn-danger';
} }
if ($item->OPN_noticeSendStatus === 'closed') { if ($item->OPN_noticeSendStatus === 'closed') {

Loading…
Cancel
Save