| | |
| | | package com.yeshi.buwan.util.user; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.yeshi.buwan.domain.vip.OrderType; |
| | | import com.yeshi.buwan.util.Constant; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.yeshi.utils.alipay.AlipayH5PayUtil; |
| | |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static String getVipChargeAlipayForm(String id, String orderNo, BigDecimal money) { |
| | | public static String getVipChargeAlipayForm(String id, OrderType orderType, String orderNo, BigDecimal money) { |
| | | try { |
| | | String goodsTitle = "影视大全会员充值"; |
| | | String returnUrl = "http://vip.ysdq.yeshitv.com/pay_success.html?id=" + id; |
| | | String notifyUrl = Constant.HOST+ "/BuWan/alipay/pay"; |
| | | if (orderType == OrderType.video) { |
| | | goodsTitle = "影视大全单片购买"; |
| | | } |
| | | String returnUrl = getPaySuccessUrl(id); |
| | | String notifyUrl = Constant.HOST + "/BuWan/alipay/pay"; |
| | | AlipayAppInfo appInfo = getAlipayApp(); |
| | | String form = AlipayH5PayUtil.createOrderForm(appInfo, orderNo, money, goodsTitle, returnUrl, notifyUrl); |
| | | return form; |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static String getPaySuccessUrl(String id) { |
| | | return "http://vip.ysdq.yeshitv.com/pay_success.html?id=" + id; |
| | | } |
| | | |
| | | |
| | |
| | | WXPlaceOrderParams params = new WXPlaceOrderParams(); |
| | | params.setIp(ip); |
| | | params.setOrderNo(orderNo); |
| | | params.setNotifyUrl( Constant.HOST+ "/BuWan/wx/pay/vip"); |
| | | params.setNotifyUrl(Constant.HOST + "/BuWan/wx/pay/vip"); |
| | | params.setFee(money); |
| | | params.setBody(title); |
| | | params.setApp(getWXAPP()); |