本文整理汇总了Java中com.alipay.api.response.AlipayTradePayResponse类的典型用法代码示例。如果您正苦于以下问题:Java AlipayTradePayResponse类的具体用法?Java AlipayTradePayResponse怎么用?Java AlipayTradePayResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AlipayTradePayResponse类属于com.alipay.api.response包,在下文中一共展示了AlipayTradePayResponse类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: micropay
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的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: tradePayToResponse
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的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
示例3: tradePayToResponse
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的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
示例4: micropayForStatus
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的package包/类
@Override
public AlipayMicropayStatus micropayForStatus(String outTradeNo, String scene, String authCode, String subject, double totalAmount, String spbillCreateIp) throws AlipayApiException {
AlipayTradePayResponse response = this.micropay(outTradeNo, scene, authCode, subject, totalAmount, spbillCreateIp);
String code = response.getCode();
// https://docs.open.alipay.com/194/105170/
if ("10000".equals(code)) {
return AlipayMicropayStatus.SUCCESS;
}
else if ("40004".equals(code)) {
return AlipayMicropayStatus.TRADE_ERROR;
}
else if ("10003".equals(code)) {// 等待用户付款
return AlipayMicropayStatus.SUCCESS;
}
else if ("20000".equals(code)) {
return AlipayMicropayStatus.TRADE_ERROR;
}
else {
return AlipayMicropayStatus.TRADE_ERROR;
}
// if (response.isSuccess()) {
// return AlipayMicropayStatus.SUCCESS;
// }
// else {
// return AlipayMicropayStatus.TRADE_ERROR;
// }
}
开发者ID:tanhaichao,项目名称:leopard,代码行数:30,代码来源:AlipayClientImpl.java
示例5: getResponseClass
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的package包/类
public Class<AlipayTradePayResponse> getResponseClass() {
return AlipayTradePayResponse.class;
}
开发者ID:wendal,项目名称:alipay-sdk,代码行数:4,代码来源:AlipayTradePayRequest.java
示例6: tradePayToResponse
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的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
示例7: tradePay
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的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
示例8: tradePay
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的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
示例9: tradePay
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的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
示例10: micropay
import com.alipay.api.response.AlipayTradePayResponse; //导入依赖的package包/类
AlipayTradePayResponse micropay(String outTradeNo, String scene, String authCode, String subject, double amount, String spbillCreateIp) throws AlipayApiException;
开发者ID:tanhaichao,项目名称:leopard,代码行数:2,代码来源:AlipayClient.java
注:本文中的com.alipay.api.response.AlipayTradePayResponse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论