diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index eff1441b..36dde479 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1250,10 +1250,14 @@ class Index extends CI_Controller { $parent_note = $this->Note_model->note($parent_txn_id); if (empty($parent_note)) { $this->Note_model->update_send($item->pn_txn_id, 'sendfail'); - return false; + $orderid_info = $this->analysis_orderid($item->pn_invoice); + if ( ! $handpick) { + return false; + } + } else { + //订单号 + $orderid_info = $this->analysis_orderid($parent_note->pn_invoice); } - //订单号 - $orderid_info = $this->analysis_orderid($parent_note->pn_invoice); //找不到订单号,设置为发送失败标示 if (empty($orderid_info)) { @@ -1303,7 +1307,7 @@ class Index extends CI_Controller { $refund_amount = 0; if (isset($payment_memo->id) && substr($payment_memo->id, 0, 2)==="WH") { $is_webhook = true; - $refund_amount = $payment_memo->refund_from_received_amount; + $refund_amount = isset($payment_memo->refund_from_received_amount) ? $payment_memo->refund_from_received_amount : '-'.$payment_memo->resource->amount->value; // $payment_fee = $payment_memo->resource->refund_from_transaction_fee->value; $payment_fee = property_exists($payment_memo, 'mc_fee') ? $payment_memo->mc_fee : $payment_memo->resource->refund_from_transaction_fee->value; } else { @@ -1370,6 +1374,8 @@ class Index extends CI_Controller { $advisor_detail = $this->Paypal_model->get_advisor_detail($advisor_info->COLI_SN, $advisor_info->OPI_SN, $web_lgc); $item->advisor_detail = $advisor_detail; + $item->payment_date = isset($item->payment_date) ? $item->payment_date : $item->pn_payment_date; + //给外联发送通知邮件 $fromName = !empty($item->pn_payer) ? $item->pn_payer : ''; $fromEmail = !empty($item->pn_payer_email) ? $item->pn_payer_email : ''; diff --git a/webht/third_party/paypal/views/refund_buyer.php b/webht/third_party/paypal/views/refund_buyer.php index 002285d0..fbe5ea26 100644 --- a/webht/third_party/paypal/views/refund_buyer.php +++ b/webht/third_party/paypal/views/refund_buyer.php @@ -1,5 +1,5 @@ - Your Submission Was Successful! - China Highlights

Dear ,


China Highlights has refunded to your account today - . The transaction to appear on your account may take up to 2-weeks.


Please find below details of your refund transaction:


Transaction details

payment_date ?>

Payment status:


Payment details

Gross amount


Invoice ID


Contact information



+ Your Submission Was Successful! - China Highlights  

Dear ,


China Highlights has refunded to your account today - . The transaction to appear on your account may take up to 2-weeks.


Please find below details of your refund transaction:


Transaction details

payment_date) ? $raw->payment_date : $pn_payment_date ?>

Payment status:


Payment details

Gross amount


Invoice ID


Contact information



 Best Regards!
 
 fullname ?>, Travel Advisor