diff --git a/webht/config/config.php b/webht/config/config.php
index 31b9d963..38dc5444 100644
--- a/webht/config/config.php
+++ b/webht/config/config.php
@@ -376,5 +376,6 @@ $config['site'] = array(
'gl' => array('site_code' => 'gl', 'site_id' => 90, 'site_lgc' => '1', 'site_url' => 'https://www.guilinchina.net'),
'mbj' => array('site_code' => 'mbj', 'site_id' => 98, 'site_lgc' => '1', 'site_url' => 'https://www.mybeijingchina.com'),
'ct' => array('site_code' => 'ct', 'site_id' => 1000, 'site_lgc' => '104', 'site_url' => 'https://www.chinatravel.com'),
- 'dct' => array('site_code' => 'dct', 'site_id' => 99, 'site_lgc' => '1', 'site_url' => 'https://www.diychinatours.com')
+ 'dct' => array('site_code' => 'dct', 'site_id' => 99, 'site_lgc' => '1', 'site_url' => 'https://www.diychinatours.com'),
+ 'trippest' => array('site_code' => 'trippest', 'site_id' => 0, 'site_lgc' => '1', 'site_url' => 'https://www.trippest.com')
);
diff --git a/webht/third_party/pay/controllers/AlipayTradeService.php b/webht/third_party/pay/controllers/AlipayTradeService.php
index 47db682f..cf9dce05 100644
--- a/webht/third_party/pay/controllers/AlipayTradeService.php
+++ b/webht/third_party/pay/controllers/AlipayTradeService.php
@@ -549,6 +549,7 @@ class AlipayTradeService extends CI_Controller
$this->AlipayTradeQueryContentBuilder->setOutTradeNo($orderId);
}
$response = $this->Query($this->AlipayTradeQueryContentBuilder);
+ // return $this->output->set_content_type('application/json')->set_output(json_encode($response));
return $response;
}
diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php
index c953e061..65fb8869 100644
--- a/webht/third_party/pay/controllers/iPayLinksService.php
+++ b/webht/third_party/pay/controllers/iPayLinksService.php
@@ -276,7 +276,7 @@ class IPayLinksService extends CI_Controller
return;
}
- public function query_pay($orderid=NULL)
+ public function query_pay($orderid=NULL, $output=true)
{
$this->query_info_arr["queryOrderId"] = $this->create_guid();
$this->query_info_arr["orderId"] = $orderid;
@@ -286,8 +286,10 @@ class IPayLinksService extends CI_Controller
$this->query_info_arr["signMsg"] = $this->generate_sign($this->query_info_arr);
$resp = $this->curl($this->queryUrl,$this->query_info_arr);
$resp_obj = simplexml_load_string($resp);
- $this->output->set_content_type('application/json')->set_output(json_encode(simplexml_load_string($resp)));
- return;
+ if ($output !== true) {
+ return $resp_obj->details;
+ }
+ return $this->output->set_content_type('application/json')->set_output(json_encode(simplexml_load_string($resp)));
}
public function query_refund($refund_order_id)
{
@@ -364,14 +366,14 @@ class IPayLinksService extends CI_Controller
* @date 2017-08-29
* @param string $orderid 订单号
*/
- public function batch_send_note($pn_txn_id = false, $old_ssje=NULL)
+ public function batch_send_note($pn_txn_id = false, $old_ssje=NULL, $pn_id=NULL)
{
$data = array();
$int = 0;
//优先处理指定的交易号,用于修正交易号直接发送通知
if ( ! empty($pn_txn_id)) {
- $data['unsend_list'] = array($this->Note_model->note($pn_txn_id));
+ $data['unsend_list'] = array($this->Note_model->note($pn_txn_id, $pn_id));
}
// 待处理的
if (empty($data['unsend_list'])) {
@@ -446,14 +448,14 @@ class IPayLinksService extends CI_Controller
$ht_memo = '交易号(自动录入):' . $item->IPL_dealId;
$GAI_COLI_SN = isset($advisor_info->COLI_SN) ? $advisor_info->COLI_SN : 0;
//CHTAPP订单添加记录前判断是否有记录,以前的APP版本没有交易号,只能拿金额来判断
- if (substr($advisor_info->COLI_WebCode, 0, 6) == 'CHTAPP') {
+ if (substr($advisor_info->COLI_WebCode, 0, 6) == 'CHTAPP' && strstr($advisor_info->COLI_WebCode, "-") != '-biz') {
//只判断前6位字符,CHTAPP-fr CHTAPP-jp等各语种都属于APP订单
$this->IPayLinks_model->add_account_info_forAPP(
$GAI_COLI_SN,
$advisor_info->COLI_ID,
$item->IPL_orderAmount,
$item->IPL_completeTime,
- mb_strtoupper($item->currencyCode),
+ $currencyCode,
$ssje,
$item->IPL_completeTime,
$item->IPL_completeTime,
@@ -573,6 +575,197 @@ class IPayLinksService extends CI_Controller
return;
}
+ /*!
+ * 退款处理
+ * @date 2019-05-08
+ * * TODO APP组的退款没有原始订单
+ */
+ public function send_refund($item, $old_ssje=NULL)
+ {
+ if ($item->IPL_stateCode != 2) {
+ return false;
+ }
+ // 原始收款订单
+ $raw_memo = json_decode($item->IPL_memo);
+ $parent_order = $raw_memo->orderId;
+ // 查询原始收款的交易号
+ $parent_payment = $this->query_pay($parent_order, false);
+ if (empty($parent_payment)) {
+ $this->Note_model->update_send($item->IPL_dealId, 'sendfail');
+ return false;
+ }
+ $parent_payment = $parent_payment->detail;
+ $parent_dealId = $parent_payment->dealId;
+ $parent_note = $this->Note_model->note($parent_dealId);
+ // APP 组的退款查不到原始收款记录
+ if (empty($parent_note) && true === $this->IPayLinks_model->if_APP_order($parent_order) ) {
+ $parent_note = $parent_payment;
+ // 补充字段
+ $parent_note->IPL_orderId = $parent_order . '_B';
+ $parent_note->IPL_currencyCode = $parent_payment->currencyCode;
+ $parent_note->IPL_payerName = strval("''");
+ $parent_note->IPL_payerEmail = strval("''");
+ }
+ //订单号
+ $orderid_info = $this->analysis_orderid($parent_note->IPL_orderId);
+ $orderid_info = json_decode($orderid_info);
+ //根据订单号查找外联信息
+ $advisor_info = $this->IPayLinks_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype);
+ //查不到订单信息
+ if (empty($advisor_info)) {
+ $this->Note_model->update_send($item->IPL_dealId, 'sendfail');
+ return false;
+ }
+ //更新正确的订单信息到记录中,以这个为主
+ $this->Note_model->set_invoice($item->IPL_dealId, $orderid_info->orderid . '_' . $orderid_info->ordertype);
+
+ //添加支付信息入库
+ //没有分配订单之前先添加付款记录,这个过程可能会执行多次,必须在添加记录前查找是否有数据
+ if (!empty($orderid_info)) {
+ $currencyCode = str_replace("CNY", "RMB", trim(mb_strtoupper($parent_note->IPL_currencyCode)));
+ $currencyCode = mb_strtoupper(trim($currencyCode));
+ $ssje = $this->IPayLinks_model->get_ssje($item->IPL_orderAmount, $currencyCode, '15018');
+ $ssje = $old_ssje===NULL ? $ssje : $old_ssje;
+ //更新还没有填的客邮和交易号de收款记录(商务订单)
+ if (isset($advisor_info->order_type) && $advisor_info->order_type == 0) {
+ $ht_memo = '(自动录入)退款号:' . $item->IPL_dealId . "\n. ";
+ $ht_memo .= '原收款号:' . $parent_dealId;
+ $GAI_COLI_SN = isset($advisor_info->COLI_SN) ? $advisor_info->COLI_SN : 0;
+ //CHTAPP订单添加记录前判断是否有记录,以前的APP版本没有交易号,只能拿金额来判断
+ if (substr($advisor_info->COLI_WebCode, 0, 6) == 'CHTAPP' && strstr($advisor_info->COLI_WebCode, "-") != '-biz') {//只判断前6位字符,CHTAPP-fr CHTAPP-jp等各语种都属于APP订单
+ $this->IPayLinks_model->add_account_info_forAPP(
+ $GAI_COLI_SN,
+ $advisor_info->COLI_ID,
+ $item->IPL_orderAmount,
+ $item->IPL_completeTime,
+ $currencyCode,
+ $ssje,
+ $item->IPL_completeTime,
+ $item->IPL_completeTime,
+ $item->IPL_acquiringTime,
+ $parent_note->IPL_payerName,
+ $parent_note->IPL_payerEmail,
+ $item->IPL_dealId,
+ $ht_memo);
+ $this->IPayLinks_model->insert_biz_order_log($GAI_COLI_SN, 'Refunded');
+ } else {
+ if (false == $this->IPayLinks_model->if_biz_gai_exists($item->IPL_dealId) ) {
+ $this->IPayLinks_model->insert_biz_order_log($GAI_COLI_SN, 'Refunded');
+ }
+ $this->IPayLinks_model->add_account_info(
+ $GAI_COLI_SN,
+ $advisor_info->COLI_ID,
+ $item->IPL_orderAmount,
+ $item->IPL_completeTime,
+ $currencyCode,
+ $ssje,
+ $item->IPL_completeTime,
+ $item->IPL_completeTime,
+ $item->IPL_acquiringTime,
+ $parent_note->IPL_payerName,
+ $parent_note->IPL_payerEmail,
+ $item->IPL_dealId,
+ $ht_memo);
+ }
+ }
+ //更新还没有填的客邮和交易号的收款记录(传统订单)
+ elseif (isset($advisor_info->order_type) && $advisor_info->order_type == 1) {
+ $ht_memo = '(自动)退款号:' . $item->IPL_dealId . "\n. ";
+ $ht_memo .= '原交易号:' . $parent_dealId;
+ $GAI_COLI_SN = isset($advisor_info->COLI_SN) ? $advisor_info->COLI_SN : 0;
+ $gai_sn = $this->IPayLinks_model->add_tour_account_info(
+ $GAI_COLI_SN,
+ $item->IPL_orderAmount,
+ $item->IPL_completeTime,
+ $currencyCode,
+ $ssje,
+ $item->IPL_completeTime,
+ $item->IPL_completeTime,
+ $item->IPL_acquiringTime,
+ $parent_note->IPL_payerName,
+ $parent_note->IPL_payerEmail,
+ $item->IPL_dealId,
+ $ht_memo);
+ //添加汉特的订单提醒
+ $this->IPayLinks_model->update_coli_introduction($GAI_COLI_SN, '已退款 ' . mb_strtoupper($currencyCode) . $item->IPL_orderAmount);
+ }
+ }
+
+ $opi_email = !empty($advisor_info->OPI_Email) ? $advisor_info->OPI_Email : ''; //lussie@chinahighlights.net
+ $opi_firstname = !empty($advisor_info->OPI_FirstName) ? $advisor_info->OPI_FirstName : !empty($advisor_info->OPI_Name) ? $advisor_info->OPI_Name : ''; //lussie
+
+ //没有外联信息表示订单未分配
+ if (empty($opi_email) || empty($opi_firstname)) {
+ $this->Note_model->update_send($item->IPL_dealId, 'sendfail');
+ return false;
+ }
+
+ //添加邮件发送记录
+ // if (true) { // test
+ if ($item->IPL_sent !== 'send' && substr($item->IPL_sent, 0, 5) !== 'send-') {
+ // 客人邮件中的外联落款
+ // $web_code = 'cht'; // 默认cht
+ $web_lgc = 1;
+ $web_code = strtolower($advisor_info->COLI_WebCode);
+ $site_info = $this->config->item('site');
+ if (isset($site_info[$web_code])) {
+ $site_info = $site_info[$web_code];
+ $item->site = $site_info['site_url'];
+ $web_lgc = $site_info['site_lgc'];
+ }
+ $advisor_detail = $this->IPayLinks_model->get_advisor_detail($advisor_info->COLI_SN, $advisor_info->OPI_SN, $web_lgc);
+ $item->advisor_detail = $advisor_detail;
+
+ //给外联发送通知邮件
+ $fromName = !empty($parent_note->IPL_payerName) ? $parent_note->IPL_payerName : '';
+ $fromEmail = !empty($parent_note->IPL_payerEmail) ? $parent_note->IPL_payerEmail : '';
+ $toName = !empty($opi_firstname) ? $opi_firstname : '';
+ $toEmail = !empty($opi_email) ? $opi_email : '';
+ $subject = $orderid_info->orderid . '_' . $orderid_info->ordertype . ' / ' . $item->IPL_orderAmount . $currencyCode . ' / ' . $fromName;
+ $body = $this->load->view('receipt_mail', $item, true);
+ $M_RelatedInfo = $item->IPL_sn;
+ $M_AddTime = $item->IPL_completeTime;
+ $M_State = 0;
+ $this->IPayLinks_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'iPayLinks note');
+ // 通知客人, 客人邮箱
+ $customer_detail = $this->IPayLinks_model->get_customer_detail($advisor_info->COLI_SN, $orderid_info->ordertype);
+ $c_fromName = $advisor_detail->fullname;
+ $opi_email_list = explode(";", $advisor_detail->email); // 解析外联的邮件
+ $c_fromEmail = trim($opi_email_list[0]);
+ $c_toName = $customer_detail->fullname;
+ $c_toEmail = $customer_detail->email;
+ $c_subject = $currencyCode . " " . str_replace('-', '', $item->IPL_orderAmount) . " Refunded to your account, booking number " . $item->IPL_orderId;
+ // 修改一些字段名, 为了和Alipay等用同一个邮件模板
+ $item->payer = $customer_detail->fullname;
+ $item->payer_email = $customer_detail->email;
+ $item->total_amount = $item->IPL_orderAmount;
+ $item->payment_date = $item->IPL_completeTime;
+ $item->payment_status = "Refunfed";
+ $item->currency = $currencyCode;
+ $item->invoice = $item->IPL_orderId;
+ $c_body = $this->load->view('refund_buyer', $item, true);
+ $c_M_RelatedInfo = $item->IPL_sn;
+ $c_M_AddTime = $item->IPL_completeTime;
+ $c_M_State = 0;
+ $this->IPayLinks_model->save_automail(
+ $c_fromName,
+ $c_fromEmail,
+ $c_toName,
+ $c_toEmail,
+ $c_subject,
+ $c_body,
+ $c_M_RelatedInfo,
+ $c_M_State,
+ $c_M_AddTime,
+ 'iPayLinks refund receipt');
+ $this->Note_model->update_send($item->IPL_dealId, 'send-customer');
+ }
+ //添加邮件发送记录 end
+ // TODO 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录
+
+ return ;
+ }
+
//解析出订单号
public function analysis_orderid($note_invoice_string) {
$data = array();
@@ -990,6 +1183,12 @@ class IPayLinksService extends CI_Controller
$data['note'] = $this->Note_model->note($pn_txn_id, $pn_id);
$orderid_info = $this->analysis_orderid($data['note']->IPL_orderId);
+ if (empty($orderid_info) && $data['note']->IPL_payType == 'refund'
+ && true === $this->IPayLinks_model->if_APP_order($data['note']->IPL_orderId)
+ ) {
+ // APP 组的退款订单是没有后缀的
+ $orderid_info = $this->analysis_orderid($data['note']->IPL_orderId . '_B');
+ }
if (!empty($orderid_info)) {
$orderid_info = json_decode($orderid_info);
if ($orderid_info->ordertype === 'T') {
@@ -1014,7 +1213,7 @@ class IPayLinksService extends CI_Controller
$advisor_info = $this->IPayLinks_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype);
if (!empty($advisor_info)) {
$this->Note_model->set_invoice($pn_txn_id, $neworder);
- $this->batch_send_note($pn_txn_id, $old_ssje);
+ $this->batch_send_note($pn_txn_id, $old_ssje, $pn_id);
echo json_encode('修改成功!');
return true;
}
diff --git a/webht/third_party/pay/models/IPayLinks_model.php b/webht/third_party/pay/models/IPayLinks_model.php
index 1ba2db80..80a6af77 100644
--- a/webht/third_party/pay/models/IPayLinks_model.php
+++ b/webht/third_party/pay/models/IPayLinks_model.php
@@ -18,7 +18,7 @@ class IPayLinks_model extends CI_Model {
$fieldsql = $orderinfo == false ? '' : " ,* ";
//先查商务订单B,APP订单A、再查传统订单T
if ($ordertype == 'B' || $ordertype == 'A') {
- $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode, COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo
+ $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode, COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo
LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN
where COLI_ID =?";
$query = $this->HT->query($sql, array($COLI_ID));
@@ -26,7 +26,7 @@ class IPayLinks_model extends CI_Model {
}
//后查传统订单的原因是因为传统订单的订单号去掉外联名字首字母后可能会和商务订单的重合。
if (empty($result) && ($ordertype == 'T')) {
- $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo
+ $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo
LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN
where COLI_ID like '%$COLI_ID'";
$query = $this->HT->query($sql);
@@ -36,7 +36,7 @@ class IPayLinks_model extends CI_Model {
//查传统订单add_code,网前实时支付会先生成一个临时订单号存在add_code里,如订单45103248
if (empty($result) && ($ordertype == 'M')) {
- $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo
+ $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo
LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN
where COLI_AddCode =? ";
$query = $this->HT->query($sql, array($COLI_ID));
@@ -44,7 +44,7 @@ class IPayLinks_model extends CI_Model {
}
if (empty($result) && ($ordertype == 'M')) {
- $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli
+ $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli
LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN
where
EXISTS (
@@ -60,7 +60,7 @@ class IPayLinks_model extends CI_Model {
//订单号查询不到尝试使用团号查询
if (empty($result) && $ordertype == 'B') {
- $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo
+ $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo
LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN
where COLI_GroupCode like '%-$COLI_ID%'";
$query = $this->HT->query($sql);
@@ -174,7 +174,7 @@ class IPayLinks_model extends CI_Model {
,GAI_Memo
,GAI_State
,DeleteFlag
- ) VALUES (?,?,15018,?,?,?,?,?,?,?,?,?,?,?,0,0)";
+ ) VALUES (?,?,15018,?,?,?,?,?,?,?,N?,N?,?,?,0,0)";
$query = $this->HT->query($sql, array($GAI_AccreditNo, $GAI_COLI_SN, $GAI_COLI_ID, $GAI_SQJE, $GAI_SQDate, $GAI_SQJECurrency, $GAI_SSJE, $GAI_SSDate, $GAI_AccountDate, $GAI_SubmitDate, $GAI_CusName, $GAI_CusEmail, $GAI_AccreditNo, $GAI_Memo));
$insertid = $this->HT->last_id('BIZ_GroupAccountInfo');
return $query;
@@ -207,7 +207,7 @@ class IPayLinks_model extends CI_Model {
,GAI_Memo
,GAI_State
,DeleteFlag
- ) VALUES (?,?,15018,?,?,?,?,?,?,?,?,?,?,?,0,0)";
+ ) VALUES (?,?,15018,?,?,?,?,?,?,?,N?,N?,?,?,0,0)";
$query = $this->HT->query($sql, array($GAI_AccreditNo, $GAI_COLI_SN, $GAI_COLI_ID, $GAI_SQJE, $GAI_SQDate, $GAI_SQJECurrency, $GAI_SSJE, $GAI_SSDate, $GAI_AccountDate, $GAI_SubmitDate, $GAI_CusName, $GAI_CusEmail, $GAI_AccreditNo, $GAI_Memo));
$insertid = $this->HT->last_id('BIZ_GroupAccountInfo');
return $query;
@@ -405,4 +405,58 @@ class IPayLinks_model extends CI_Model {
);
return $this->HT->insert("BIZ_OrderOperationLog", $db_column);
}
+
+ public function get_advisor_detail($COLI_SN, $OPI_SN, $lgc=1)
+ {
+ $advisor_signature = $this->get_advisor_signature($COLI_SN);
+ if (empty($advisor_signature)) {
+ $sql = "SELECT OPI_SN, '+86-'+OPI_MoveTelephone mobile,'+86-773-'+OPI_Telephone tel,OPI_Email email,OPI2_Name fullname,OPI2_FirstName,OPI2_LastName
+ FROM [Tourmanager].[dbo].[V_Operator_Info]
+ where OPI_SN=? and LGC_LGC=? ";
+ $advisor_signature = $this->HT->query($sql, array($OPI_SN, $lgc))->row();
+ }
+ return $advisor_signature;
+ }
+ public function get_advisor_signature($COLI_SN)
+ {
+ $sql = "SELECT top 1 dbo.agenter_user.Name fullname, dbo.agenter_user.tel,
+ dbo.agenter_user.Email email, dbo.agenter_user.mobile, OPI_DEI_SN, COLI_OPI_ID
+ FROM dbo.BIZ_ConfirmLineInfo
+ INNER JOIN dbo.agenter_user ON dbo.BIZ_ConfirmLineInfo.COLI_OPI_ID = dbo.agenter_user.AU_OPI_SN
+ AND
+ (dbo.BIZ_ConfirmLineInfo.COLI_WebCode = dbo.agenter_user.agenter
+ OR (COLI_WebCode in ('EXPCH','MESENLLA','traba','wayaway','guias') and agenter='VAC')
+ )
+ LEFT JOIN OperatorInfo on COLI_OPI_ID = OPI_SN
+ WHERE (dbo.BIZ_ConfirmLineInfo.COLI_SN = ?)";
+ return $this->HT->query($sql, array($COLI_SN))->row();
+ }
+
+ public function get_customer_detail($COLI_SN, $ordertype)
+ {
+ if ($ordertype === 'T') {
+ $sql = "SELECT mei.MEI_FirstName+' '+isnull(mei.MEI_MiddleName,'')+' '+isnull(mei.MEI_LastName,'') fullname,
+ mei.MEI_MailList email
+ FROM MEmberInfo mei
+ INNER JOIN CUstomerList cul on mei.MEI_SN=cul.CUL_CUI_SN and cul.CUL_IsLinkMan=1
+ WHERE CUL_COLI_SN=? ";
+ return $this->HT->query($sql, $COLI_SN)->row();
+ } else {
+ $sql = "SELECT GUT_FirstName+' '+GUT_LastName fullname,GUT_Email email from BIZ_GUEST g
+ INNER JOIN BIZ_ConfirmLineInfo coli on coli.COLI_GUT_SN=g.GUT_SN
+ WHERE COLI_SN=? ";
+ return $this->HT->query($sql, $COLI_SN)->row();
+ }
+ }
+
+ public function if_APP_order($order_id)
+ {
+ $sql = "SELECT top 1 1
+ from BIZ_ConfirmLineInfo coli
+ where COLI_ID=?
+ and exists (
+ select 1 from OperatorInfo where OPI_SN=COLI_OPI_ID and OPI_DEI_SN=16
+ )";
+ return $this->HT->query($sql, array($order_id))->num_rows() > 0;
+ }
}
diff --git a/webht/third_party/pay/views/alipay_receipt_mail.php b/webht/third_party/pay/views/alipay_receipt_mail.php
index a2590081..76f30880 100644
--- a/webht/third_party/pay/views/alipay_receipt_mail.php
+++ b/webht/third_party/pay/views/alipay_receipt_mail.php
@@ -1 +1 @@
-
| Transaction ID: | Hello Guilin China International Travel Service Co.,Ltd, You received a payment of Thanks for using iPayLinks.You can now ship any items.To see all the transaction details,log in to your iPayLinks account. It may take a few moments for this transaction to appear in your account. Seller Protection- | | |
+ | Transaction ID: | Hello Guilin China International Travel Service Co.,Ltd, You received a payment of Thanks for using Alipay.You can now ship any items.To see all the transaction details,log in to your Alipay account. It may take a few moments for this transaction to appear in your account. Seller Protection- | | |
diff --git a/webht/third_party/pay/views/iPayLinks_list2.php b/webht/third_party/pay/views/iPayLinks_list2.php
index 0a981772..97134d4d 100644
--- a/webht/third_party/pay/views/iPayLinks_list2.php
+++ b/webht/third_party/pay/views/iPayLinks_list2.php
@@ -75,7 +75,7 @@