我在 CustomerCreateOptions 中找到 SourceToken 选项

Mar*_*ood 1 c# asp.net-mvc stripe-payments

在以下代码中使用了 SourceToken 选项,但我在 Visual Studio 中的 CreateCustomerOptions 引用中或按 f12 键找不到 SourceToken 选项。相反,我看到有一个 Source 选项,这两个选项是否相同?需要帮助解决这个问题..

我在这里给出代码链接: https://stripe.com/docs/api/customers/create

duc*_*uck 5

如果您使用的是 Stripe 的 .NET SDK (v27) 的最新版本,则情况已发生变化,SourceToken您需要将令牌/源 id 传递为Source

    var createOptions = new CustomerCreateOptions
    {
        Email = "example@example.com",
        Source = "tok_123",
    };
Run Code Online (Sandbox Code Playgroud)

请参阅 代码。