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

我没有看到条纹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响应的正文:

相关文章

Format[$] ( expr [ , fmt ] ) format 返回变体型 format$ 强制返回为文本 --------------------------...
VB6或者ASP 格式化时间为 MM/dd/yyyy 格式,竟然没有好的办法, Format 或者FormatDateTime 竟然结果和...
在项目中添加如下代码:新建窗口来显示异常信息。 Namespace My ‘全局错误处理,新的解决方案直接...
转了这一篇文章,原来一直想用C#做k3的插件开发,vb没有C#用的爽呀,这篇文章写与2011年,看来我以前没...
Sub 分列() ‘以空格为分隔符,连续空格只算1个。对所选中的单元格进行处理 Dim m As Range, t...
  窗体代码 1 Private Sub Text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integ...