| | |
| | | return ResultUtil.error("用户积分不足!"); |
| | | } |
| | | returnModel.setReturnId(returnId); |
| | | returnModel.setPaySuccess(true); |
| | | return ResultUtil.success(returnModel); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | returnModel.setReturnId(returnId); |
| | | returnModel.setPaySuccess(pointsMerchandise.getPayStatus() == 2); |
| | | return ResultUtil.success(returnModel); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | }).start(); |
| | | } |
| | | return alipay; |
| | | return appendPaySuccess(alipay); |
| | | } |
| | | |
| | | /** |
| | | * 支付宝、微信的成功响应仅表示已生成支付单,客户端仍需拉起第三方支付。 |
| | | */ |
| | | private ResultUtil appendPaySuccess(ResultUtil paymentResult) { |
| | | JSONObject data = paymentResult.getData() == null ? new JSONObject() |
| | | : JSON.parseObject(JSON.toJSONString(paymentResult.getData())); |
| | | if (data == null) { |
| | | data = new JSONObject(); |
| | | } |
| | | data.put("paySuccess", false); |
| | | return ResultUtil.getResult(paymentResult.getCode(), paymentResult.getMsg(), data); |
| | | } |
| | | |
| | | |
| | |
| | | // 平台门票 |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay(name, "", code, cash.toString(), |
| | | "/base/pointMer/exchangeGoodPaymentWeChatCallback", "APP", ""); |
| | | return weixinpay; |
| | | return appendPaySuccess(weixinpay); |
| | | } else { |
| | | String s2 = storeClient.getmerchantNumberByOperatorId(store1.getOperatorId()); |
| | | System.err.println("微信商户号" + s2); |
| | |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpayV3(s2, name, code, |
| | | "/base/pointMer/exchangeGoodPaymentWeChatCallback1", |
| | | cash.toString()); |
| | | return weixinpay; |
| | | return appendPaySuccess(weixinpay); |
| | | } |
| | | } |
| | | break; |
| | |
| | | // 平台课包 |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay(name, "", code, cash.toString(), |
| | | "/base/pointMer/exchangeGoodPaymentWeChatCallback", "APP", ""); |
| | | return weixinpay; |
| | | return appendPaySuccess(weixinpay); |
| | | } else { |
| | | String s2 = storeClient.getmerchantNumberByOperatorId(store.getOperatorId()); |
| | | System.err.println("微信商户号" + s2); |
| | |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpayV3(s2, name, code, |
| | | "/base/pointMer/exchangeGoodPaymentWeChatCallback1", |
| | | cash.toString()); |
| | | return weixinpay; |
| | | return appendPaySuccess(weixinpay); |
| | | } |
| | | case 3: |
| | | if (!integers.isEmpty()) { |
| | |
| | | // 平台门票 |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay(name, "", code, cash.toString(), |
| | | "/base/pointMer/exchangeGoodPaymentWeChatCallback", "APP", ""); |
| | | return weixinpay; |
| | | return appendPaySuccess(weixinpay); |
| | | } else { |
| | | String s2 = storeClient.getmerchantNumberByOperatorId(store1.getOperatorId()); |
| | | System.err.println("微信商户号" + s2); |
| | |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpayV3(s2, name, code, |
| | | "/base/pointMer/exchangeGoodPaymentWeChatCallback1", |
| | | cash.toString()); |
| | | return weixinpay; |
| | | return appendPaySuccess(weixinpay); |
| | | } |
| | | } else { |
| | | // 平台门票 |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay(name, "", code, cash.toString(), |
| | | "/base/pointMer/exchangeGoodPaymentWeChatCallback", "APP", ""); |
| | | return weixinpay; |
| | | return appendPaySuccess(weixinpay); |
| | | |
| | | } |
| | | } |