From 9cc0d82b78bf1e0f1be6c3700df7266107567ff3 Mon Sep 17 00:00:00 2001 From: hitsword Date: Mon, 20 May 2019 13:45:00 +0800 Subject: [PATCH] debug Signed-off-by: hitsword --- class-wc-huayi-score.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/class-wc-huayi-score.php b/class-wc-huayi-score.php index 54bda7b..ab844bb 100644 --- a/class-wc-huayi-score.php +++ b/class-wc-huayi-score.php @@ -129,11 +129,12 @@ class WC_Huayi_Score extends WC_Payment_Gateway { // $huayi_openid = get_user_meta( $order->get_user_id() , 'huayi_openid',true );//获取登录接口后的openid // $huayi_unionid = get_user_meta( $order->get_user_id() , 'huayi_unionid',true );//获取登录接口后的unionid + wc_add_notice( __('结算失败:', 'huayi_score') . 'test', 'error' ); + return;//debug; + if ( $huayi_uid > 0 ) { $huayiScoreSdk = new HuayiScoreSdk(array('apiurl'=>'1','token'=>'1')); $balanceResult = $huayiScoreSdk->getBalance($huayi_uid);//获取积分余额 TODO - wc_add_notice( __('结算失败:', 'huayi_score') . 'test', 'error' ); - return;//debug; if ($balanceResult >= $order->order_total ) {//积分够扣 $payResult = $huayiScoreSdk->pay($huayi_uid,$order->order_total,'订单号:'.$order_id);//执行扣款 TODO //支付成功