parent
8f43e9e5c0
commit
9cc0d82b78
|
|
@ -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
|
||||
//支付成功
|
||||
|
|
|
|||
Loading…
Reference in New Issue