shinnosuke
2026-09-10 65b57875700bf42ebd17eafa01a265e5690ce271
talent-card-server/src/main/java/com/talentcard/server/business/payment/huifu/HuifuPaymentProperties.java
@@ -17,6 +17,14 @@
    private String withdrawalProductId = "";
    private String withdrawalNotifyUrl = "";
    private String merchantBusinessNotifyUrl = "";
    private String merchantOnboardingNotifyUrl = "";
    private String merchantWechatConfigNotifyUrl = "";
    private String merchantBusinessOpenNotifyUrl = "";
    private String onboardingUpperHuifuId = "";
    private String merchantWechatFeeRate = "0.60";
    private String merchantOnlineBusinessType = "H5311L";
    private String merchantOnlineMediaName = "东区人才卡";
    private String merchantAgreementUrl = "https://cloudpnrcdn.oss-cn-shanghai.aliyuncs.com/opps/api/prod/download_file/PaymentServiceAgreement.htm";
    private String withdrawalIntoAccountDateType = "DM";
    private boolean delayAccount;
@@ -47,8 +55,42 @@
        return withdrawalNotifyUrl == null ? "" : withdrawalNotifyUrl.replace("/withdrawal-notify", "/merchant-business-notify");
    }
    public void setMerchantBusinessNotifyUrl(String merchantBusinessNotifyUrl) { this.merchantBusinessNotifyUrl = merchantBusinessNotifyUrl; }
    public String getMerchantOnboardingNotifyUrl() {
        if (merchantOnboardingNotifyUrl != null && !merchantOnboardingNotifyUrl.isBlank()) return merchantOnboardingNotifyUrl;
        return withdrawalNotifyUrl == null ? "" : withdrawalNotifyUrl.replace("/withdrawal-notify", "/merchant-onboarding-notify");
    }
    public void setMerchantOnboardingNotifyUrl(String merchantOnboardingNotifyUrl) { this.merchantOnboardingNotifyUrl = merchantOnboardingNotifyUrl; }
    public String getMerchantWechatConfigNotifyUrl() {
        if (merchantWechatConfigNotifyUrl != null && !merchantWechatConfigNotifyUrl.isBlank()) return merchantWechatConfigNotifyUrl;
        return callbackUrl("merchant-wechat-config-notify");
    }
    public void setMerchantWechatConfigNotifyUrl(String merchantWechatConfigNotifyUrl) { this.merchantWechatConfigNotifyUrl = merchantWechatConfigNotifyUrl; }
    public String getMerchantBusinessOpenNotifyUrl() {
        if (merchantBusinessOpenNotifyUrl != null && !merchantBusinessOpenNotifyUrl.isBlank()) return merchantBusinessOpenNotifyUrl;
        return callbackUrl("merchant-business-open-notify");
    }
    public void setMerchantBusinessOpenNotifyUrl(String merchantBusinessOpenNotifyUrl) { this.merchantBusinessOpenNotifyUrl = merchantBusinessOpenNotifyUrl; }
    public String getOnboardingUpperHuifuId() {
        if (onboardingUpperHuifuId != null && !onboardingUpperHuifuId.isBlank()) return onboardingUpperHuifuId;
        return merchantId;
    }
    public void setOnboardingUpperHuifuId(String onboardingUpperHuifuId) { this.onboardingUpperHuifuId = onboardingUpperHuifuId; }
    public String getMerchantWechatFeeRate() { return merchantWechatFeeRate; }
    public void setMerchantWechatFeeRate(String merchantWechatFeeRate) { this.merchantWechatFeeRate = merchantWechatFeeRate; }
    public String getMerchantOnlineBusinessType() { return merchantOnlineBusinessType; }
    public void setMerchantOnlineBusinessType(String merchantOnlineBusinessType) { this.merchantOnlineBusinessType = merchantOnlineBusinessType; }
    public String getMerchantOnlineMediaName() { return merchantOnlineMediaName; }
    public void setMerchantOnlineMediaName(String merchantOnlineMediaName) { this.merchantOnlineMediaName = merchantOnlineMediaName; }
    public String getMerchantAgreementUrl() { return merchantAgreementUrl; }
    public void setMerchantAgreementUrl(String merchantAgreementUrl) { this.merchantAgreementUrl = merchantAgreementUrl; }
    public String getWithdrawalIntoAccountDateType() { return withdrawalIntoAccountDateType; }
    public void setWithdrawalIntoAccountDateType(String withdrawalIntoAccountDateType) { this.withdrawalIntoAccountDateType = withdrawalIntoAccountDateType; }
    public boolean isDelayAccount() { return delayAccount; }
    public void setDelayAccount(boolean delayAccount) { this.delayAccount = delayAccount; }
    private String callbackUrl(String endpoint) {
        if (withdrawalNotifyUrl == null || withdrawalNotifyUrl.isBlank()) return "";
        int slash = withdrawalNotifyUrl.lastIndexOf('/');
        return slash < 0 ? "" : withdrawalNotifyUrl.substring(0, slash + 1) + endpoint;
    }
}