RefundService.java 968 B

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