diff --git a/webht/third_party/pay/controllers/WxpayService.php b/webht/third_party/pay/controllers/WxpayService.php index 2f018387..d65b8fb1 100644 --- a/webht/third_party/pay/controllers/WxpayService.php +++ b/webht/third_party/pay/controllers/WxpayService.php @@ -54,7 +54,7 @@ class WxpayService extends CI_Controller { $save_column['OPN_orderId'] = $xml_arr['out_trade_no']; $save_column['OPN_rawOrderId'] = $xml_arr['out_trade_no']; $save_column['OPN_invoiceId'] = $xml_arr['out_trade_no']; - $save_column['OPN_subject'] = $xml_arr['attach']; + $save_column['OPN_subject'] = $xml_arr['attach'] ? $xml_arr['attach'] : $xml_arr['out_trade_no']; $save_column['OPN_currency'] = $xml_arr['fee_type']; $save_column['OPN_orderAmount'] = $xml_arr['total_fee']; $save_column['OPN_payAmount'] = $xml_arr['total_fee']; @@ -65,7 +65,7 @@ class WxpayService extends CI_Controller { $save_column['OPN_errMsg'] = isset($xml_arr['err_code_des']) ? $xml_arr['err_code_des'] : NULL; $save_column['OPN_acquiringTime'] = date('Y-m-d H:i:s',strtotime($xml_arr['time_end'])); $save_column['OPN_completeTime'] = date('Y-m-d H:i:s',strtotime($xml_arr['time_end'])); - $save_column['OPN_remark'] = $xml_arr['attach']; + $save_column['OPN_remark'] = $xml_arr['attach'] ? $xml_arr['attach'] : $xml_arr['out_trade_no']; $save_column['OPN_payerLogId'] = $xml_arr['openid']; $save_column['OPN_payerStatus'] = $xml_arr['is_subscribe']==='Y' ? "subscribed" : NULL; $save_column['OPN_fundSource'] = $site; diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 189675f4..d2d89fd8 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -882,7 +882,7 @@ class Index extends CI_Controller { $is_webhook = true; $payment_fee = property_exists($webhook_memo, 'mc_fee') ? $webhook_memo->mc_fee : $webhook_memo->resource->transaction_fee->value; } else { - $payment_fee = $webhook_memo->mc_fee; + $payment_fee = property_exists($webhook_memo, 'mc_fee') ? $webhook_memo->mc_fee : 0; } if (empty($pn_txn_id) && true === $is_webhook) { $this->Note_model->update_send($item->pn_txn_id, 'send-wh', $item->pn_sn);