
package com.slodon.b2b2c.starter.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * PayPal 支付配置信息
 */
@Data
@NoArgsConstructor
public class PayPalProperties {

    /**
     * 应用编号
     */
    private String clientId;

    /**
     * 应用密钥
     */
    private String secret;

    /**
     * 是否是沙箱环境
     */
    private boolean sandBox;

    /**
     * mode
     */
    private String mode;

    public PayPalProperties(String clientId, String secret, boolean sandBox) {
        this.clientId = clientId;
        this.secret = secret;
        this.sandBox = sandBox;
        this.mode = this.sandBox ? "sandbox" : "live";
    }
}
