gpt4 book ai didi

vb.net - 为什么 Stripe.com 返回错误(402)需要付款?

转载 作者:行者123 更新时间:2023-12-02 08:21:35 25 4
gpt4 key购买 nike

我没有在任何地方看到 stripes API 中描述的这个特定错误。有人知道这是怎么回事吗?

这是我用于创建客户的 VB.net 代码:

Function CreateStripeCustomer(ByVal Token As String) As String
'' The Stripe Account API Token - change this for testing
Dim STR_Stripe_API_Token As String = "sk_test_SECRET_TEST_KEY" '<-- test secret key. Change to live later.
''The Stripe API URL
Dim STR_Stripe_API_URL As String = "https://api.stripe.com/v1/customers"
''Creates a Web Client
Dim OBJ_Webclient As New System.Net.WebClient()
''Creates Credentials
Dim OBJ_Credentials As New System.Net.NetworkCredential(STR_Stripe_API_Token, "MY_STRIPE.COM_PASSWORD")
''Sets the Credentials on the Web Client
OBJ_Webclient.Credentials = OBJ_Credentials
''Creates a Transaction with Data that Will be Sent to Stripe
Dim OBJ_Transaction As New System.Collections.Specialized.NameValueCollection()
OBJ_Transaction.Add("email", "PERFECTLY_VALID_EMAIL")
OBJ_Transaction.Add("card", "PERFECTLY VALID TOKEN RETURNED BY STRIPE.JS")
''The Stripe Response String
Dim STR_Response As String = Encoding.ASCII.GetString(OBJ_Webclient.UploadValues(STR_Stripe_API_URL, OBJ_Transaction))
Return STR_Response
End Function

线路发生402“需要付款”错误:

Dim STR_Response As String = Encoding.ASCII.GetString(OBJ_Webclient.UploadValues(STR_Stripe_API_URL, OBJ_Transaction))

最佳答案

如果您在现场看到这种情况,也有可能卡号根本不正确,例如:如果您检查 402 响应的正文:

enter image description here

关于vb.net - 为什么 Stripe.com 返回错误(402)需要付款?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19239339/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com