using BasePaySdk.Request;
using BasePaySdk;
using JiaZhiQuan.Common.Config;
using Newtonsoft.Json;
using System.Collections.Generic;
using System;
using Wicture.DbRESTFul;
using NPOI.Util;

namespace JiaZhiQuan.Common.JuheAPI.HuiFu {
    public class HuiFuApiRefundQuery {
        public static BaseRequest InitReq(HuiFuCommonConfig huifuConf,
            HuiFuRefundQueryInfo info) {
            // 2.组装请求参数
            V2TradePaymentScanpayRefundqueryRequest request = new V2TradePaymentScanpayRefundqueryRequest();
            // 商户号
            request.setHuifuId(huifuConf.sys_id);
            // 退款请求日期
            request.setOrgReqDate(info.org_req_date);
            // 退款全局流水号退款请求流水号,退款全局流水号,终端订单号三选一不能都为空；
            request.setOrgHfSeqId("");
            // 退款请求流水号退款请求流水号,退款全局流水号,终端订单号三选一不能都为空；
            request.setOrgReqSeqId(info.org_req_seq_id);
            // 终端订单号退款请求流水号,退款全局流水号,终端订单号三选一不能都为空；
            // &lt;br/&gt;&lt;font color&#x3D;&quot;green&quot;&gt;示例值：16672670833524393&lt;/font&gt;
            request.setMerOrdId("");

            // 设置非必填字段
            Dictionary<string, object> extendInfoMap = getExtendInfos();
            request.setExtendInfo(extendInfoMap);
            return request;
        }
        /**
         * 非必填字段
         * @return
         */
        private static Dictionary<string, object> getExtendInfos() {
            // 设置非必填字段
            Dictionary<string, object> extendInfoMap = new Dictionary<string, object>();
            return extendInfoMap;
        }
    }
}
