com.alipay.api.domain.AlipayTradeQueryModel Java Examples

The following examples show how to use com.alipay.api.domain.AlipayTradeQueryModel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PayUtil.java    From NutzSite with Apache License 2.0 6 votes vote down vote up
/**
 * 查询
 *
 * @param out_trade_no 商户订单号,商户网站订单系统中唯一订单号,必填
 * @param trade_no     支付宝交易号
 */
public static void TradeQuery(String out_trade_no, String trade_no) {
    /**********************/
    // SDK 公共请求类,包含公共请求参数,以及封装了签名与验签,开发者无需关注签名与验签
    AlipayClient client = new DefaultAlipayClient(AlipayConfig.URL, AlipayConfig.APPID, AlipayConfig.RSA_PRIVATE_KEY, AlipayConfig.FORMAT, AlipayConfig.CHARSET, AlipayConfig.ALIPAY_PUBLIC_KEY, AlipayConfig.SIGNTYPE);
    AlipayTradeQueryRequest alipay_request = new AlipayTradeQueryRequest();

    AlipayTradeQueryModel model = new AlipayTradeQueryModel();
    model.setOutTradeNo(out_trade_no);
    model.setTradeNo(trade_no);
    alipay_request.setBizModel(model);

    AlipayTradeQueryResponse alipay_response = null;
    try {
        alipay_response = client.execute(alipay_request);
    } catch (AlipayApiException e) {
        e.printStackTrace();
    }
    System.out.println(alipay_response.getBody());
}
 
Example #2
Source File: PayQueryChain.java    From alipay with Apache License 2.0 4 votes vote down vote up
public PayQueryChain(AlipayClient alipayClient, AlipayTradeQueryModel alipayTradeQueryModel) {
    this.alipayClient = alipayClient;
    this.alipayTradeQueryModel = alipayTradeQueryModel;
}
 
Example #3
Source File: PayQueryParamChain.java    From alipay with Apache License 2.0 4 votes vote down vote up
public PayQueryParamChain(AlipayClient alipayClient, AlipayTradeQueryModel alipayTradeQueryModel) {
    this.alipayClient = alipayClient;
    this.alipayTradeQueryModel = alipayTradeQueryModel;
}
 
Example #4
Source File: AlipayServiceImpl.java    From fast-family-master with Apache License 2.0 4 votes vote down vote up
@Override
public AlipayTradeQueryResponse selectOrder(AlipayTradeQueryModel model) throws AlipayApiException {
    AlipayTradeQueryRequest request = new AlipayTradeQueryRequest();
    request.setBizModel(model);
    return alipayClient.execute(request);
}
 
Example #5
Source File: AlipayService.java    From fast-family-master with Apache License 2.0 2 votes vote down vote up
/**
 * 查询订单
 *
 * @param model
 * @return
 * @throws AlipayApiException
 */
AlipayTradeQueryResponse selectOrder(AlipayTradeQueryModel model) throws AlipayApiException;