diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 9145ea2c..acafc99b 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -709,7 +709,7 @@ class Index extends CI_Controller { $pn_mc_gross = $post_data->resource->amount->value; $pn_mc_currency = $post_data->resource->amount->currency_code; $pn_payment_status = $post_data->resource->status; - $post_data->mc_fee = $post_data->resource->seller_receivable_breakdown->paypal_fee->value; + $post_data->mc_fee = isset($post_data->resource->seller_receivable_breakdown) ? $post_data->resource->seller_receivable_breakdown->paypal_fee->value : 0; $GAI_API->payee = $post_data->resource->payee; $GAI_API->res_links = $post_data->resource->links; @@ -1032,6 +1032,11 @@ class Index extends CI_Controller { $this->Note_model->update_send($item->pn_txn_id, 'closeRecord'); continue; } + // if (strtolower($item->pn_payment_status) == 'pending') { + // $find_completed = $this->Note_model->note_completed($pn_txn_id); + // // $this->Note_model->update_send($item->pn_txn_id, 'closeRecord'); + // continue; + // } //退款状态默认为已经处理,陆燕在退款前手动通知外联了,系统跳过处理 if (strtolower($item->pn_payment_status) == 'refunded' ) { diff --git a/webht/third_party/paypal/models/note_model.php b/webht/third_party/paypal/models/note_model.php index 55e02f49..71535096 100644 --- a/webht/third_party/paypal/models/note_model.php +++ b/webht/third_party/paypal/models/note_model.php @@ -113,6 +113,13 @@ class Note_model extends CI_Model { $this->orderby=" ORDER BY pn_payment_date, pn_payer desc "; return $this->get_list(); } + public function note_completed($pn_txn_id){ + $this->init(); + $this->topnum=1; + $this->pn_txn_id=" AND pn_payment_status='Completed' AND pn.pn_txn_id=".$this->HT->escape($pn_txn_id); + $this->orderby=" ORDER BY pn_payment_date, pn_payer desc "; + return $this->get_list(); + } public function search_note($pn_txn_id){ $this->init();