PaymentEvent.java 1.5 KB
package com.diligrp.cashier.shared.spi;

import java.time.LocalDateTime;

public class PaymentEvent {
    // 交易号
    private final String tradeId;
    // 支付ID
    private final String paymentId;
    // 支付状态
    private final Integer state;
    // 业务系统订单号
    private final String outTradeNo;
    // 实际支付方式
    private final Integer outPayType;
    // 支付人信息
    private final String payerId;
    // 发生时间
    private final LocalDateTime when;
    // 交易描述
    private final String message;

    public PaymentEvent(String tradeId, String paymentId, int state, String outTradeNo, Integer outPayType,
                        String payerId, LocalDateTime when, String message) {
        this.tradeId = tradeId;
        this.paymentId = paymentId;
        this.state = state;
        this.outTradeNo = outTradeNo;
        this.outPayType = outPayType;
        this.payerId = payerId;
        this.when = when;
        this.message = message;
    }

    public String getTradeId() {
        return tradeId;
    }

    public String getPaymentId() {
        return paymentId;
    }

    public Integer getState() {
        return state;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public Integer getOutPayType() {
        return outPayType;
    }

    public String getPayerId() {
        return payerId;
    }

    public LocalDateTime getWhen() {
        return when;
    }

    public String getMessage() {
        return message;
    }
}