Compare commits

...

3 Commits

@ -778,11 +778,11 @@ class AlipayTradeService extends CI_Controller
$this->Alipay_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'Alipay note');
// 通知客人, 客人邮箱
$customer_detail = $this->Alipay_model->get_customer_detail($advisor_info->COLI_SN, $orderid_info->ordertype);
$c_fromName = $advisor_detail->fullname;
$c_fromName = $advisor_detail->fullname ? $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_toEmail = isset($customer_detail->email) ? $customer_detail->email : '';
$c_subject = $currencyCode . " " . str_replace('-', '', $item->ALI_orderAmount) . " Refunded to your account, booking number " . $item->ALI_orderId;
// 修改一些字段名, 为了和iPaylinks等用同一个邮件模板
$item->payer = $customer_detail->fullname;
@ -816,7 +816,7 @@ class AlipayTradeService extends CI_Controller
// 更新是否需要发送财务
$refund_finance_day = 20;
$now_day = date('d');
$late_entry_date_set = $now_day<$refund_finance_day ? date('Y-m-01', strtotime("-1 month")) : date('Y-m-01');
$late_entry_date_set = $now_day < $refund_finance_day ? date('Y-m-01', strtotime("-1 month")) : date('Y-m-01');
if ($this->payment_model->if_finance_done($advisor_info->COLI_GRI_SN, $late_entry_date_set) === true) {
$this->Alipay_note_model->update_send($item->ALI_dealId, 'send-to-finance');
}

@ -445,6 +445,7 @@ class PaymentService extends CI_Controller {
$paypal_order = isset($memo->resource->supplementary_data) ?$memo->resource->supplementary_data->related_ids->order_id : (isset($memo->resource->application_context) ? $memo->resource->application_context->related_qualifiers[0]->id : '');
}
$paypal_account = $item->OPN_fundSource ? $item->OPN_fundSource : 'cht';
$paypal_account = 'Highlights' ? 'htravel' : $paypal_account;
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($paypal_order, 1));
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($paypal_account, 1));
// log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($item->OPN_noticeType, 1));

@ -642,6 +642,7 @@ class Index extends CI_Controller {
}
log_message('error',"paypal_webhook" . var_export($raw_post, 1));
$post_data = json_decode($raw_post);
log_message('error','paypal_webhook: ' . $post_data->event_type);
if (
strpos($post_data->event_type, 'COMPLETED') === false
&& strpos($post_data->event_type, 'REFUNDED') === false

Loading…
Cancel
Save