From 3e83da8add2a434eaf2e933362b9a7818edb2722 Mon Sep 17 00:00:00 2001 From: hitsword Date: Mon, 20 May 2019 18:17:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hitsword --- class-wc-huayi-score.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/class-wc-huayi-score.php b/class-wc-huayi-score.php index 22d2c70..29d9e5c 100644 --- a/class-wc-huayi-score.php +++ b/class-wc-huayi-score.php @@ -143,14 +143,14 @@ class WC_Huayi_Score extends WC_Payment_Gateway { } if ($balanceResult['data']['score'] >= $order->order_total ) {//积分够扣 - $payResult = $huayiScoreSdk->pay($huayi_uid,$order->order_total,'订单号:'.$order_id);//执行扣款 + $payResult = $huayiScoreSdk->pay($huayi_uid,$order->order_total,get_bloginfo('name').'订单号:'.$order_id);//执行扣款 if (!$payResult) { wc_add_notice( __('结算失败:', 'huayi_score') . $huayiScoreSdk->getError(), 'error' ); return; } //支付成功 - if ( $payResult['data']['pay_status'] == 'success' ) {//TODO TEST + if ( $payResult['data']['pay_status'] == 'success' ) { //更新订单状态 //$order->update_status( 'on-hold', __( '等待积分支付', 'huayi_score' ) );//需要支付回调的接口才需要 @@ -197,7 +197,7 @@ class WC_Huayi_Score extends WC_Payment_Gateway { if ( $huayi_uid > 0 ) { $huayiScoreSdk = new HuayiScoreSdk(array('apiurl'=>$this->apiurl,'token'=>$this->token)); - $result = $huayiScoreSdk->refund($huayi_uid,$amount,'退款订单号:'.$order_id.'.退款原因:'.$reason);//执行退款 + $result = $huayiScoreSdk->refund($huayi_uid,$amount,get_bloginfo('name').'退款订单号:'.$order_id.'.退款原因:'.$reason);//执行退款 if ( $result['data']['refund_status'] == 'success' ) {//TODO TEST $order->add_order_note( sprintf( __( '退款时间: %s - 退款会员ID: %s', 'huayi_score' ), date("Y-m-d H:i:s"),$result['uid'] ) );