• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AlipayTradePayModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.alipay.api.domain.AlipayTradePayModel的典型用法代码示例。如果您正苦于以下问题:Java AlipayTradePayModel类的具体用法?Java AlipayTradePayModel怎么用?Java AlipayTradePayModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AlipayTradePayModel类属于com.alipay.api.domain包,在下文中一共展示了AlipayTradePayModel类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: micropay

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
@Override
public AlipayTradePayResponse micropay(String outTradeNo, String scene, String authCode, String subject, double amount, String spbillCreateIp) throws AlipayApiException {
	AlipayTradePayModel model = new AlipayTradePayModel();
	model.setOutTradeNo(outTradeNo);
	model.setScene(scene);
	model.setAuthCode(authCode);
	model.setSubject(subject);
	model.setTotalAmount(Double.toString(amount));
	System.err.println("authCode:" + authCode);
	System.err.println("totalAmount:" + amount);

	AlipayTradePayRequest request = new AlipayTradePayRequest();
	request.setBizModel(model);
	return alipayClient.execute(request);
	// if (response.isSuccess()) {
	// System.out.println("调用成功");
	// }
	// else {
	// System.out.println("调用失败");
	// }
	// return response.getCode() + ":" + response.getSubCode() + ":" + response.getSubMsg();
	// return AliPayApi.tradePay(model, notifyUrl);
}
 
开发者ID:tanhaichao,项目名称:leopard,代码行数:24,代码来源:AlipayClientImpl.java


示例2: tradePage

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
/**
 * 电脑网站支付(PC支付)
 * @param httpResponse
 * @param model
 * @param notifyUrl
 * @param returnUrl
 * @throws {AlipayApiException}
 * @throws IOException
 */
public static void tradePage(HttpServletResponse httpResponse, AlipayTradePayModel model, String notifyUrl, String returnUrl) throws AlipayApiException, IOException{
	AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
	request.setBizModel(model);
	request.setNotifyUrl(notifyUrl);
	request.setReturnUrl(returnUrl);
	String form  = AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient().pageExecute(request).getBody();//调用SDK生成表单
	httpResponse.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
	httpResponse.getWriter().write(form);//直接将完整的表单html输出到页面
    httpResponse.getWriter().flush();
    httpResponse.getWriter().close();
}
 
开发者ID:Javen205,项目名称:IJPay,代码行数:21,代码来源:AliPayApi.java


示例3: tradePayToResponse

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
public static AlipayTradePayResponse tradePayToResponse(AlipayTradePayModel model, String notifyUrl)
    throws AlipayApiException {
    AlipayTradePayRequest request = new AlipayTradePayRequest();
    request.setBizModel(model);// 填充业务参数
    request.setNotifyUrl(notifyUrl);
    return AliPayConfig.build().getAlipayClient().execute(request); // 通过AliPayConfig.build().getAlipayClient()调用API,获得对应的response类
}
 
开发者ID:iBase4J,项目名称:iBase4J-Common,代码行数:8,代码来源:AliPay.java


示例4: tradePage

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
/**
 * 电脑网站支付(PC支付)
 * 
 * @param httpResponse
 * @param model
 * @param notifyUrl
 * @param returnUrl
 * @throws AlipayApiException
 * @throws IOException
 */
public static void tradePage(HttpServletResponse httpResponse, AlipayTradePayModel model, String notifyUrl,
    String returnUrl) throws AlipayApiException, IOException {
    AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
    request.setBizModel(model);
    request.setNotifyUrl(notifyUrl);
    request.setReturnUrl(returnUrl);
    String form = AliPayConfig.build().getAlipayClient().pageExecute(request).getBody();// 调用SDK生成表单
    httpResponse.setContentType("text/html;charset=" + AliPayConfig.build().getCharset());
    httpResponse.getWriter().write(form);// 直接将完整的表单html输出到页面
    httpResponse.getWriter().flush();
    httpResponse.getWriter().close();
}
 
开发者ID:iBase4J,项目名称:iBase4J-Common,代码行数:23,代码来源:AliPay.java


示例5: tradePayToResponse

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
public static AlipayTradePayResponse tradePayToResponse(AlipayTradePayModel model, String notifyUrl)
		throws AlipayApiException {
	AlipayTradePayRequest request = new AlipayTradePayRequest();
	request.setBizModel(model);// 填充业务参数
	request.setNotifyUrl(notifyUrl);
	return AliPayConfig.build().getAlipayClient().execute(request); // 通过AliPayConfig.build().getAlipayClient()调用API,获得对应的response类
}
 
开发者ID:guokezheng,项目名称:automat,代码行数:8,代码来源:AliPay.java


示例6: tradePage

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
/**
 * 电脑网站支付(PC支付)
 * 
 * @param model
 * @param notifyUrl
 * @param returnUrl
 * @return
 * @throws AlipayApiException
 * @throws IOException
 */
public static void tradePage(HttpServletResponse httpResponse, AlipayTradePayModel model, String notifyUrl,
		String returnUrl) throws AlipayApiException, IOException {
	AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
	request.setBizModel(model);
	request.setNotifyUrl(notifyUrl);
	request.setReturnUrl(returnUrl);
	String form = AliPayConfig.build().getAlipayClient().pageExecute(request).getBody();// 调用SDK生成表单
	httpResponse.setContentType("text/html;charset=" + AliPayConfig.build().getCharset());
	httpResponse.getWriter().write(form);// 直接将完整的表单html输出到页面
	httpResponse.getWriter().flush();
	httpResponse.getWriter().close();
}
 
开发者ID:guokezheng,项目名称:automat,代码行数:23,代码来源:AliPay.java


示例7: tradePayToResponse

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
/**
 * 交易支付接口
 * 条形码支付、声波支付
 * @param model
 * @param notifyUrl
 * @return {AlipayTradePayResponse}
 * @throws {AlipayApiException}
 */
public static AlipayTradePayResponse tradePayToResponse(AlipayTradePayModel model, String notifyUrl) throws AlipayApiException{
	AlipayTradePayRequest request = new AlipayTradePayRequest();
	request.setBizModel(model);// 填充业务参数
	request.setNotifyUrl(notifyUrl);
	return AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient().execute(request); // 通过AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient()调用API,获得对应的response类
}
 
开发者ID:Javen205,项目名称:IJPay,代码行数:15,代码来源:AliPayApi.java


示例8: tradePay

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
/**
 * 条形码支付、声波支付
 * https://doc.open.alipay.com/docs/api.htm?spm=a219a.7629065.0.0.XVqALk&apiId=850&docType=4
 * @param model
 * @param notifyUrl
 * @return {String}
 * @throws {AlipayApiException}
 */
public static String tradePay(AlipayTradePayModel model, String notifyUrl) throws AlipayApiException {
	AlipayTradePayResponse response = tradePayToResponse(model,notifyUrl);
	return response.getBody();
}
 
开发者ID:Javen205,项目名称:IJPay,代码行数:13,代码来源:AliPayApi.java


示例9: tradePay

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
/**
 * 条形码支付、声波支付
 * 
 * @param notifyUrl
 * @throws AlipayApiException
 */
public static String tradePay(AlipayTradePayModel model, String notifyUrl) throws AlipayApiException {
    AlipayTradePayResponse response = tradePayToResponse(model, notifyUrl);
    return response.getBody();
}
 
开发者ID:iBase4J,项目名称:iBase4J-Common,代码行数:11,代码来源:AliPay.java


示例10: tradePay

import com.alipay.api.domain.AlipayTradePayModel; //导入依赖的package包/类
/**
 * 条形码支付、声波支付
 * https://doc.open.alipay.com/docs/api.htm?spm=a219a.7629065.0.0.XVqALk&apiId=850&docType=4
 * 
 * @param notifyUrl
 * @throws AlipayApiException
 */
public static String tradePay(AlipayTradePayModel model, String notifyUrl) throws AlipayApiException {
	AlipayTradePayResponse response = tradePayToResponse(model, notifyUrl);
	return response.getBody();
}
 
开发者ID:guokezheng,项目名称:automat,代码行数:12,代码来源:AliPay.java



注:本文中的com.alipay.api.domain.AlipayTradePayModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RollingBatchRestartRs类代码示例发布时间:2022-05-23
下一篇:
Java ListQBFModelNumber类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap