本文整理汇总了Java中com.alipay.api.request.AlipayTradeWapPayRequest类的典型用法代码示例。如果您正苦于以下问题:Java AlipayTradeWapPayRequest类的具体用法?Java AlipayTradeWapPayRequest怎么用?Java AlipayTradeWapPayRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AlipayTradeWapPayRequest类属于com.alipay.api.request包,在下文中一共展示了AlipayTradeWapPayRequest类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAlipayWapPayInfo
import com.alipay.api.request.AlipayTradeWapPayRequest; //导入依赖的package包/类
private AlipayPrepayInfo getAlipayWapPayInfo(String tradeNo, String amount, String timeout, String productName, String productDesc, PaymentAccountInfoInterface accountInfo)
throws Exception {
AlipayTradeWapPayRequest alipayRequest = new AlipayTradeWapPayRequest();
alipayRequest.setReturnUrl(accountInfo.getAliReturnUrl());
alipayRequest.setNotifyUrl(accountInfo.getAliNotifyUrl());
alipayRequest.setBizContent("{" +
"\"out_trade_no\":\"" + tradeNo + "\"," +
"\"total_amount\":" + amount + "," +
"\"seller_id\":\"" + accountInfo.getAliPartnerId() + "\"," +
"\"subject\":\"" + productName + "\"," +
"\"body\":\"" + productDesc + "\"," +
"\"timeout_express\":\"" + timeout + "\"," +
"\"product_code\":\"QUICK_WAP_PAY\"" +
"}");
String form = getAlipayClient(accountInfo).pageExecute(alipayRequest).getBody();
return new AlipayPrepayInfo(form, null);
}
示例2: wapPayToString
import com.alipay.api.request.AlipayTradeWapPayRequest; //导入依赖的package包/类
public static String wapPayToString(HttpServletResponse response, AlipayTradeWapPayModel model, String returnUrl,
String notifyUrl) throws AlipayApiException, IOException {
AlipayTradeWapPayRequest alipayRequest = new AlipayTradeWapPayRequest();// 创建API对应的request
alipayRequest.setReturnUrl(returnUrl);
alipayRequest.setNotifyUrl(notifyUrl);// 在公共参数中设置回跳和通知地址
alipayRequest.setBizModel(model);// 填充业务参数
return AliPayConfig.build().getAlipayClient().pageExecute(alipayRequest).getBody(); // 调用SDK生成表单
}
示例3: wapPayToString
import com.alipay.api.request.AlipayTradeWapPayRequest; //导入依赖的package包/类
public static String wapPayToString(HttpServletResponse response, AlipayTradeWapPayModel model, String returnUrl,
String notifyUrl) throws AlipayApiException, IOException {
AlipayTradeWapPayRequest alipayRequest = new AlipayTradeWapPayRequest();// 创建API对应的request
alipayRequest.setReturnUrl(returnUrl);
alipayRequest.setNotifyUrl(notifyUrl);// 在公共参数中设置回跳和通知地址
alipayRequest.setBizModel(model);// 填充业务参数
return AliPayConfig.build().getAlipayClient().pageExecute(alipayRequest).getBody(); // 调用SDK生成表单
}
示例4: quickWapPay
import com.alipay.api.request.AlipayTradeWapPayRequest; //导入依赖的package包/类
@Override
public String quickWapPay(String key, String user, String subject, int amount, String billNo, String notice, String returnUrl) {
AlipayModel alipay = alipayDao.findByKey(key);
String content = getBizContent(alipay.getAppId(), user, subject, amount, billNo, notice, "QUICK_WAP_PAY");
if (content == null)
return null;
AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
request.setBizContent(content);
return prepay(alipay, returnUrl, request);
}
示例5: createWapOrder
import com.alipay.api.request.AlipayTradeWapPayRequest; //导入依赖的package包/类
public String createWapOrder(AlipayTradeOrder order){
String result = "";
AlipayTradeWapPayRequest alipayRequest = new AlipayTradeWapPayRequest();//创建API对应的request
alipayRequest.setReturnUrl(config.RETURN_URL);
alipayRequest.setNotifyUrl(config.NOTIFY_URL);
alipayRequest.setBizContent(BeanUtil.object2json(order));//填充业务参数
try {
result = client.pageExecute(alipayRequest).getBody(); //调用SDK生成表单
} catch (AlipayApiException e) {
e.printStackTrace();
}
return result;
}
示例6: wapPayStr
import com.alipay.api.request.AlipayTradeWapPayRequest; //导入依赖的package包/类
/**
* WAP支付
* @param response
* @param model
* @param returnUrl
* @param notifyUrl
* @return {String}
* @throws {AlipayApiException}
* @throws IOException
*/
public static String wapPayStr(HttpServletResponse response,AlipayTradeWapPayModel model,String returnUrl,String notifyUrl) throws AlipayApiException, IOException {
AlipayTradeWapPayRequest alipayRequest = new AlipayTradeWapPayRequest();// 创建API对应的request
alipayRequest.setReturnUrl(returnUrl);
alipayRequest.setNotifyUrl(notifyUrl);// 在公共参数中设置回跳和通知地址
alipayRequest.setBizModel(model);// 填充业务参数
return AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient().pageExecute(alipayRequest).getBody(); // 调用SDK生成表单
}