ScanPayQueryService.java 1023 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.tencent.service;
  2. import com.tencent.common.Configure;
  3. import com.tencent.protocol.pay_query_protocol.ScanPayQueryReqData;
  4. /**
  5. * User: rizenguo
  6. * Date: 2014/10/29
  7. * Time: 16:04
  8. */
  9. public class ScanPayQueryService extends BaseService{
  10. public ScanPayQueryService() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
  11. super(Configure.PAY_QUERY_API);
  12. }
  13. /**
  14. * 请求支付查询服务
  15. * @param scanPayQueryReqData 这个数据对象里面包含了API要求提交的各种数据字段
  16. * @return API返回的XML数据
  17. * @throws Exception
  18. */
  19. public String request(ScanPayQueryReqData scanPayQueryReqData) throws Exception {
  20. //--------------------------------------------------------------------
  21. //发送HTTPS的Post请求到API地址
  22. //--------------------------------------------------------------------
  23. String responseString = sendPost(scanPayQueryReqData);
  24. return responseString;
  25. }
  26. }