|
|
|
@ -570,6 +570,7 @@ class Index extends CI_Controller {
|
|
|
|
|
//存储paypal发送的消息
|
|
|
|
|
public function paypal_note() {
|
|
|
|
|
$pn_txn_id = $this->input->post('txn_id');
|
|
|
|
|
log_message('error','paypal-note: ' . $pn_txn_id);
|
|
|
|
|
|
|
|
|
|
$pn_invoice = $this->input->post('invoice');
|
|
|
|
|
empty($pn_invoice) ? $pn_invoice = $this->input->post('transaction_subject') : false;
|
|
|
|
@ -602,10 +603,12 @@ class Index extends CI_Controller {
|
|
|
|
|
//把PDT时间转成GMT时间
|
|
|
|
|
$pn_payment_date = gmdate('Y-m-d H:i:s', strtotime($pn_payment_date));
|
|
|
|
|
$this->Note_model->save_paypal_note($pn_txn_id, $pn_invoice, $pn_custom, $pn_mc_gross, $pn_item_name, $pn_item_number, $pn_mc_currency, $pn_payment_status, $pn_payer, $pn_payer_email, $pn_payment_date, $pn_memo);
|
|
|
|
|
log_message('error','paypal-note-succeed ' . $pn_txn_id . ' # ' . $pn_invoice);
|
|
|
|
|
echo 'ok';
|
|
|
|
|
} else {
|
|
|
|
|
echo 'no';
|
|
|
|
|
}
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//解析出订单号
|
|
|
|
|