package com.fzm.mall.server.admin.config;

import com.fzm.mall.server.admin.pay.PayOption;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wulixian
 * @since 2021/5/13
 */
@Configuration
public class PayConfig {

    @Value("${pay.ali-pay-url}")
    private String aLiPayUrl;

    @Value("${pay.we-chat-pay-url}")
    private String weChatUrl;

    @Bean
    public PayOption getPayOption(){
        PayOption payOption = new PayOption();
        payOption.setALiPayUrl(aLiPayUrl);
        payOption.setWeChatUrl(weChatUrl);
        return payOption;
    }
}
