|
|
|
@ -998,25 +998,10 @@ class Index extends CI_Controller {
|
|
|
|
|
$this->Note_model->set_invoice($paypal_msg->pn_txn_id, $ht_tp_order->COLI_ID . '_TP');
|
|
|
|
|
$ssje = $this->Paypal_model->get_ssje($paypal_msg->pn_mc_gross, '15002', mb_strtoupper($paypal_msg->pn_mc_currency));
|
|
|
|
|
$ht_memo = '交易号(自动录入):' . $paypal_msg->pn_txn_id;
|
|
|
|
|
$this->Paypal_model->add_account_info(
|
|
|
|
|
$ht_tp_order->COLI_SN,
|
|
|
|
|
$ht_tp_order->COLI_ID,
|
|
|
|
|
$paypal_msg->pn_mc_gross,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
mb_strtoupper($paypal_msg->pn_mc_currency),
|
|
|
|
|
$ssje,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
'',
|
|
|
|
|
$paypal_msg->pn_payer_email,
|
|
|
|
|
$paypal_msg->pn_txn_id,
|
|
|
|
|
$ht_memo
|
|
|
|
|
);
|
|
|
|
|
if (false == $this->Paypal_model->if_biz_gai_exists($paypal_msg->pn_txn_id) ) {
|
|
|
|
|
$this->Paypal_model->update_biz_coli_state($ht_tp_order->COLI_SN, 13);
|
|
|
|
|
$this->Paypal_model->insert_biz_order_log($ht_tp_order->COLI_SN, 'BS13');
|
|
|
|
|
$this->Paypal_model->update_paymanner($ht_tp_order->COLI_SN, '15002');
|
|
|
|
|
$this->Paypal_model->update_paymanner($ht_tp_order->COLI_SN, '15010');
|
|
|
|
|
|
|
|
|
|
$opi_firstname = "David";
|
|
|
|
|
$opi_email = "david@trippest.com";
|
|
|
|
@ -1031,6 +1016,21 @@ class Index extends CI_Controller {
|
|
|
|
|
$M_State = 0;
|
|
|
|
|
$this->Paypal_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'paypal note');
|
|
|
|
|
}
|
|
|
|
|
$this->Paypal_model->add_account_info(
|
|
|
|
|
$ht_tp_order->COLI_SN,
|
|
|
|
|
$ht_tp_order->COLI_ID,
|
|
|
|
|
$paypal_msg->pn_mc_gross,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
mb_strtoupper($paypal_msg->pn_mc_currency),
|
|
|
|
|
$ssje,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
$paypal_msg->pn_payment_date,
|
|
|
|
|
'',
|
|
|
|
|
$paypal_msg->pn_payer_email,
|
|
|
|
|
$paypal_msg->pn_txn_id,
|
|
|
|
|
$ht_memo
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->Note_model->update_send($paypal_msg->pn_txn_id, 'send');
|
|
|
|
|
}
|
|
|
|
@ -1341,6 +1341,9 @@ class Index extends CI_Controller {
|
|
|
|
|
$orderid_info = $this->analysis_orderid($data['note']->pn_invoice);
|
|
|
|
|
if (!empty($orderid_info)) {
|
|
|
|
|
$orderid_info = json_decode($orderid_info);
|
|
|
|
|
if ($orderid_info->ordertype === 'TP') {
|
|
|
|
|
$orderid_info->ordertype = 'B';
|
|
|
|
|
}
|
|
|
|
|
if ($orderid_info->ordertype === 'T') {
|
|
|
|
|
$data['gai_info'] = $this->Paypal_model->get_money_t($pn_txn_id);
|
|
|
|
|
if ( ! empty($data['gai_info'])) {
|
|
|
|
@ -1360,6 +1363,9 @@ class Index extends CI_Controller {
|
|
|
|
|
$orderid_info = $this->analysis_orderid($neworder);
|
|
|
|
|
if (!empty($orderid_info)) {
|
|
|
|
|
$orderid_info = json_decode($orderid_info);
|
|
|
|
|
if ($orderid_info->ordertype === 'TP') {
|
|
|
|
|
$orderid_info->ordertype = 'B';
|
|
|
|
|
}
|
|
|
|
|
$advisor_info = $this->Paypal_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype, TRUE);
|
|
|
|
|
if (!empty($advisor_info)) {
|
|
|
|
|
$this->Note_model->set_invoice($pn_txn_id, $neworder);
|
|
|
|
|