klover2 / nest-wechatpay-node-v3-ts

nest 版 微信v3支付
MIT License
39 stars 6 forks source link

使用报错 #5

Open zboMa opened 5 months ago

zboMa commented 5 months ago

按照示例使用,报错了

ERROR [ExceptionHandler] Nest can't resolve dependencies of the AccountPaymentService (?). Please make sure that the argument "WECHAT_PAY_MANAGER" at index [0] is available in the AccountsModule context.

Potential solutions:
- Is AccountsModule a valid NestJS module?
- If "WECHAT_PAY_MANAGER" is a provider, is it part of the current AccountsModule?
- If "WECHAT_PAY_MANAGER" is exported from a separate @Module, is that module imported within AccountsModule?
  @Module({
    imports: [ /* the Module containing "WECHAT_PAY_MANAGER" */ ]
  })
zboMa commented 5 months ago

nestjs 10.0.0 wechatpay-node-v3 2.2.0

notbucai commented 3 months ago

WeChatPayModule.registerAsync({ global: true, // 增加这个 useFactory: