DownloadBill.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Web;
  4. namespace LYFZ.WxPayAPI
  5. {
  6. public class DownloadBill
  7. {
  8. /***
  9. * 下载对账单完整业务流程逻辑
  10. * @param bill_date 下载对账单的日期(格式:20140603,一次只能下载一天的对账单)
  11. * @param bill_type 账单类型
  12. * ALL,返回当日所有订单信息,默认值
  13. * SUCCESS,返回当日成功支付的订单
  14. * REFUND,返回当日退款订单
  15. * REVOKED,已撤销的订单
  16. * @return 对账单结果(xml格式)
  17. */
  18. public static string Run(string bill_date, string bill_type)
  19. {
  20. Log.Info("DownloadBill", "DownloadBill is processing...");
  21. WxPayData data = new WxPayData();
  22. data.SetValue("bill_date", bill_date);//账单日期
  23. data.SetValue("bill_type", bill_type);//账单类型
  24. WxPayData result = WxPayApi.DownloadBill(data);//提交下载对账单请求给API,接收返回结果
  25. Log.Info("DownloadBill", "DownloadBill process complete, result : " + result.ToXml());
  26. return result.ToPrintStr();
  27. }
  28. }
  29. }