如何使用 allauth 在条带上将范围参数设置为 read_write?

How to set scope parameter to read_write on stripe using allauth?

我想知道当用户使用 Django 通过 Stripe connect 订阅时如何将 scope 参数设置为 read_write -allauth?

我处于开发模式,当我创建一个帐户并尝试对另一个用户的产品收费时,我收到此错误:

Cannot transfer to a destination that is connected with read_only scope.

我在文档中遇到过这个:

The Stripe endpoint needs to at least receive two parameters:

  • response_type, with a value of code.

  • Your client_id.

You’ll likely also want to provide the scope. This parameter dictates what your platform will be able to do on behalf of the connected account. The options are read_write and read_only, with read_only being the default.

但我不知道如何将范围设置为 read_write?有人遇到过这个问题吗?

将此添加到您的 settings.py

SOCIALACCOUNT_PROVIDERS = {
    'stripe': {
        'SCOPE': ['read_write']
    }
}