OnlinePaymentResponse.java 1.2 KB
package com.diligrp.cashier.pipeline.domain;

import com.diligrp.cashier.pipeline.type.OutPaymentType;
import com.diligrp.cashier.pipeline.type.PaymentState;

import java.time.LocalDateTime;

/**
 * 在线支付结果领域模型
 */
public class OnlinePaymentResponse extends OnlinePaymentStatus {
    // 实际支付方式-聚合支付时
    private final OutPaymentType outPayType;
    // 支付方Id - 比如微信OpenId
    private final String payerId;
    // 支付时间
    private final LocalDateTime when;
    // 交易备注
    private final String message;

    public OnlinePaymentResponse(String paymentId, String outTradeNo, OutPaymentType outPayType,
                                 String payerId, LocalDateTime when, PaymentState state, String message) {
        super(paymentId, outTradeNo, state);
        this.outPayType = outPayType;
        this.payerId = payerId;
        this.when = when;
        this.message = message;
    }

    public OutPaymentType getOutPayType() {
        return outPayType;
    }

    public String getPayerId() {
        return payerId;
    }

    public LocalDateTime getWhen() {
        return when;
    }

    public String getMessage() {
        return message;
    }
}