fix: 字段检查

webht/payment
Lei OT 1 year ago
parent 8afa987676
commit 04eba4d8c6

@ -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;

@ -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);

Loading…
Cancel
Save