条纹错误 - 您的卡的到期年份无效

jas*_*328 6 javascript stripe-payments

在测试模式下测试我的stripe js帐户.我正在运行这段代码

Stripe.card.createToken({
  number: "4242424242424242",  
  cvc: "333", 
  exp_month: "02", 
  exp_year: "19", 
  address_zip: "11111", 
  address_country: "AX"}, 
stripeResponseHandler);
Run Code Online (Sandbox Code Playgroud)

我一直收到这个回复错误.

Your card's expiration year is invalid.
Run Code Online (Sandbox Code Playgroud)

即使我改变年份2019,我仍然会收到错误.我仔细检查并使用正确的测试密钥.怎么了,怎么解决这个问题?

Rez*_*Net 0

也许是因为它EndYear是一个数字,而不是一个字符串。

看看这个: https: //stripe.com/docs/api/tokens/create_card ?lang=dotnet