| | |
| | | package com.yeshi.buwan.util.user; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.yeshi.utils.alipay.AlipayH5PayUtil; |
| | | import org.yeshi.utils.entity.alipay.AlipayAppInfo; |
| | |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static String getVipChargeAlipayForm(String orderNo, BigDecimal money) { |
| | | public static String getVipChargeAlipayForm(String id, String orderNo, BigDecimal money) { |
| | | try { |
| | | String goodsTitle = "影视大全会员充值"; |
| | | String returnUrl = "http://vip.ysdq.yeshitv.com"; |
| | | String notifyUrl = "http://api.ysdq.yeshitv.com:8089/BuWan/alipay/pay"; |
| | | String returnUrl = "http://vip.ysdq.yeshitv.com/pay_success.html?id=" + id; |
| | | String notifyUrl = Constant.HOST+ "/BuWan/alipay/pay"; |
| | | AlipayAppInfo appInfo = getAlipayApp(); |
| | | String form = AlipayH5PayUtil.createOrderForm(appInfo, orderNo, money, goodsTitle, returnUrl, notifyUrl); |
| | | return form; |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static String createWXOrder(String ip, String orderNo, BigDecimal money, String title) throws Exception { |
| | | public static String createWXOrder(String id, String ip, String orderNo, BigDecimal money, String title) throws Exception { |
| | | WXPlaceOrderParams params = new WXPlaceOrderParams(); |
| | | params.setIp(ip); |
| | | params.setOrderNo(orderNo); |
| | | params.setNotifyUrl("http://api.ysdq.yeshitv.com:8089/BuWan/wx/pay/vip"); |
| | | params.setNotifyUrl( Constant.HOST+ "/BuWan/wx/pay/vip"); |
| | | params.setFee(money); |
| | | params.setBody(title); |
| | | params.setApp(getWXAPP()); |
| | | String payUrl = WXPayV3Util.createH5Order(params, "http://vip.ysdq.yeshitv.com/wx_result.html"); |
| | | String returnUrl = "http://vip.ysdq.yeshitv.com/pay_finish.html?id=" + id; |
| | | String payUrl = WXPayV3Util.createH5Order(params, returnUrl); |
| | | return payUrl; |
| | | } |
| | | |