perf: PayPal DECLINED 保留记录, 自动忽略

webht/payment
Lei OT 10 months ago
parent 9107425120
commit cfa8070b3b

@ -1020,12 +1020,18 @@ class Index extends CI_Controller {
} else { } else {
$payment_fee = property_exists($webhook_memo, 'mc_fee') ? $webhook_memo->mc_fee : 0; $payment_fee = property_exists($webhook_memo, 'mc_fee') ? $webhook_memo->mc_fee : 0;
} }
if (empty($pn_txn_id) && true === $is_webhook) { if (empty($pn_txn_id) && true === $is_webhook && strtolower($item->pn_payment_status) == 'completed') {
$this->handle_webhook($item); $this->handle_webhook($item);
// $this->Note_model->update_send($item->pn_txn_id, 'send-wh', $item->pn_sn); // $this->Note_model->update_send($item->pn_txn_id, 'send-wh', $item->pn_sn);
continue; continue;
} }
$if48Hour = (time() - strtotime($item->pn_datetime)) >= 48*3600 ? true : false;
if (strtolower($item->pn_payment_status) == 'declined' && $if48Hour) {
$this->Note_model->update_send($item->pn_txn_id, 'closeRecord');
continue;
}
//退款状态默认为已经处理,陆燕在退款前手动通知外联了,系统跳过处理 //退款状态默认为已经处理,陆燕在退款前手动通知外联了,系统跳过处理
if (strtolower($item->pn_payment_status) == 'refunded' ) { if (strtolower($item->pn_payment_status) == 'refunded' ) {
$this->send_refund($item, $handpick, $old_ssje); $this->send_refund($item, $handpick, $old_ssje);

Loading…
Cancel
Save