All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.ipokerface.weixin.proxy.merchant.MerchantTradeResult Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package cn.ipokerface.weixin.proxy.merchant;

import com.alibaba.fastjson.annotation.JSONField;

import javax.xml.bind.annotation.XmlElement;

/**
 * Created by       PokerFace
 * Create Date      2019-12-28.
 * Email:           [email protected]
 * Version          1.0.0
 * 

* Description: */ public class MerchantTradeResult extends MerchantResult { private static final long serialVersionUID = 4205906286092873877L; /** * 微信支付订单号 */ @XmlElement(name = "transaction_id") @JSONField(name = "transaction_id") private String transactionId; /** * 商户订单号 */ @XmlElement(name = "out_trade_no") @JSONField(name = "out_trade_no") private String outTradeNo; /** * 订单总金额,单位为分 */ @XmlElement(name = "total_fee") @JSONField(name = "total_fee") private Integer totalFee; /** * 应结订单金额,单位为分:应结订单金额=订单金额-非充值代金券金额,应结订单金额<=订单金额。 */ @XmlElement(name = "settlement_total_fee") @JSONField(name = "settlement_total_fee") private Integer settlementTotalFee; /** * 货币类型,符合 ISO 4217 标准的三位字母代码,默认人民币:CNY * * */ @XmlElement(name = "fee_type") @JSONField(name = "fee_type") private String feeType; /** * 现金支付金额 */ @XmlElement(name = "cash_fee") @JSONField(name = "cash_fee") private Integer cashFee; public Integer getCashFee() { return cashFee; } /** * 调用接口获取单位为分,get方法转换为元方便使用 * * @return 元单位 */ @JSONField(serialize = false) public double getFormatCashFee() { return cashFee != null ? cashFee / 100d : 0d; } public Integer getTotalFee() { return totalFee; } /** * 调用接口获取单位为分,get方法转换为元方便使用 * * @return 元单位 */ @JSONField(serialize = false) public double getFormatTotalFee() { return totalFee != null ? totalFee / 100d : 0d; } @JSONField(serialize = false) public CurrencyType getFormatFeeType() { return feeType != null ? CurrencyType.valueOf(feeType.toUpperCase()) : null; } public String getFeeType() { return feeType; } public String getTransactionId() { return transactionId; } public String getOutTradeNo() { return outTradeNo; } public Integer getSettlementTotalFee() { return settlementTotalFee; } /** * 调用接口获取单位为分,get方法转换为元方便使用 * * @return 元单位 */ @JSONField(serialize = false) public double getFormatSettlementTotalFee() { return settlementTotalFee != null ? settlementTotalFee / 100d : 0d; } @Override public String toString() { return "transactionId=" + transactionId + ", outTradeNo=" + outTradeNo + ", totalFee=" + totalFee + ", cashFee=" + cashFee + ", feeType=" + feeType + ", settlementTotalFee=" + settlementTotalFee + ", " + super.toString(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy