Skip to content

SDK能动态添加公众号和支付相关的配置吗? #3129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lycoris-xmin opened this issue Apr 22, 2025 · 1 comment
Open

SDK能动态添加公众号和支付相关的配置吗? #3129

lycoris-xmin opened this issue Apr 22, 2025 · 1 comment

Comments

@lycoris-xmin
Copy link

对于多租户的场景,商户并未入驻,所以这时候配置并没有。
我翻了一会文档啥的,好像没有找到动态配置的方式。
我不想在program里去注册

builder.Services.AddSenparcWeixinServices(builder.Configuration);

var registerService = app.UseSenparcWeixin(app.Environment, null, null, register => { },
    (register, weixinSetting) =>
{
    //注册公众号信息(可以执行多次,注册多个公众号)
    register.RegisterMpAccount(weixinSetting, "【盛派网络小助手】公众号");
});

是否有其他方式实现?

@JeffreySu
Copy link
Owner

可以在程序运行后的任何地方,运行 AccessTokenContainer.Register 注册对应的公众号或者微信支付。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants