package com.neusoft.smart.pos.payment.persistent.ext.domain;

import lombok.Data;

import java.io.Serializable;

@Data
public class WeixinPayNotify implements Serializable {
    private String appid;           //公众账号ID wxd678efh567hg6787 微信支付分配的公众账号ID（企业号corpid即为此appId）
    private String bank_type;       //付款银行 CMC 银行类型，采用字符串类型的银行标识
    private String cash_fee;
    private String fee_type;
    private String is_subscribe;
    private String mch_id;          //商户号 1900000109 微信支付分配的商户号
    private String nonce_str;       //随机字符串 5K8264ILTKCH16CQ2502SI8ZNMTM67VS 随机字符串，不长于32位
    private String openid;          //用户标识 wxd930ea5d5a258f4f 用户在商户appid下的唯一标识
    private String out_trade_no;
    private String result_code;     //业务结果 SUCCESS/FAIL
    private String return_code;
    private String sign;            //签名 C380BEC2BFD727A4B6845133519F3AD6
    private String time_end;        //支付完成时间20141030133525 支付完成时间，格式为yyyyMMddHHmmss，如2009年12月25日9点10分10秒表示为20091225091010
    private String total_fee;       //订单金额 订单总金额，单位为分
    private String trade_type;      //交易类型 JSAPI、NATIVE、APP
    private String transaction_id;
    private String attach;
//    <xml>
//      <appid><![CDATA[wxb2c0d57c05a00d89]]></appid>
//      <bank_type><![CDATA[CFT]]></bank_type>
//      <cash_fee><![CDATA[1]]></cash_fee>
//      <fee_type><![CDATA[CNY]]></fee_type>
//      <is_subscribe><![CDATA[N]]></is_subscribe>
//      <mch_id><![CDATA[1239546002]]></mch_id>
//      <nonce_str><![CDATA[edfe33e044a14cd38a037a6b22ed03f8]]></nonce_str>
//      <openid><![CDATA[o1vlgs6OHHwZPh7CTdChsqKEOZvA]]></openid>
//      <out_trade_no><![CDATA[fe38c84d395045fab2ab04fd7ab5c168]]></out_trade_no>
//      <result_code><![CDATA[SUCCESS]]></result_code>
//      <return_code><![CDATA[SUCCESS]]></return_code>
//      <sign><![CDATA[7B15D30C539C1093AC33BCD798221222]]></sign>
//      <time_end><![CDATA[20180117105640]]></time_end>
//      <total_fee>1</total_fee>
//      <trade_type><![CDATA[NATIVE]]></trade_type>
//      <transaction_id><![CDATA[4200000073201801175622610445]]></transaction_id>
//    </xml>

//    public Map<String,String> getWeixinPayNotifyMap(){
//        Map<String,String> weixinPayNotifyMap = new HashMap<>();
//        weixinPayNotifyMap.put("appid",getAppid()==null?"":getAppid());
//        weixinPayNotifyMap.put("bank_type",getBank_type()==null?"":getBank_type());
//        weixinPayNotifyMap.put("cash_fee",getCash_fee()==null?"":getCash_fee());
//        weixinPayNotifyMap.put("fee_type",getFee_type()==null?"":getFee_type());
//        weixinPayNotifyMap.put("is_subscribe",getIs_subscribe()==null?"":getIs_subscribe());
//        weixinPayNotifyMap.put("mch_id",getMch_id()==null?"":getMch_id());
//        weixinPayNotifyMap.put("nonce_str",getNonce_str()==null?"":getNonce_str());
//        weixinPayNotifyMap.put("openid",getOpenid()==null?"":getOpenid());
//        weixinPayNotifyMap.put("out_trade_no",getOut_trade_no()==null?"":getOut_trade_no());
//        weixinPayNotifyMap.put("result_code",getResult_code()==null?"":getResult_code());
//        weixinPayNotifyMap.put("return_code",getReturn_code()==null?"":getReturn_code());
//        weixinPayNotifyMap.put("sign",getSign()==null?"":getSign());
//        weixinPayNotifyMap.put("time_end",getTime_end()==null?"":getTime_end());
//        weixinPayNotifyMap.put("total_fee",getTotal_fee()==null?"":getTotal_fee());
//        weixinPayNotifyMap.put("trade_type",getTrade_type()==null?"":getTrade_type());
//        weixinPayNotifyMap.put("transaction_id",getTransaction_id()==null?"":getTransaction_id());
//        return weixinPayNotifyMap;
//    }
}