private AlipayTradeQueryResponse sendTradeQuery(string outTradeNo) { try { AliPayTradeQueryDTO build = new AliPayTradeQueryDTO(); build.out_trade_no = outTradeNo; AlipayTradeQueryRequest payRequest = new AlipayTradeQueryRequest(); payRequest.BizContent = build.BuildJson(); AlipayTradeQueryResponse payResponse = Execute(payRequest); return(payResponse); } catch { return(null); } }
public OrderQueryResult OrderQuery(OrderQueryDTO dto) { OrderQueryResult result = new OrderQueryResult(); try { AliPayTradeQueryDTO queryDto = new AliPayTradeQueryDTO(); queryDto.trade_no = dto.OnlineTradeNo; queryDto.out_trade_no = dto.OutTradeNo; AlipayTradeQueryRequest payRequest = new AlipayTradeQueryRequest(); payRequest.BizContent = queryDto.BuildJson(); AlipayTradeQueryResponse response = Execute(payRequest); result.SetAlipayResult(response); return(result); } catch (Exception e) { throw new F2FPayException(e.Message); } }