Stripe payments Python条带支付网关
我正在尝试通过Python对卡进行收费。 然而,我无法让它工作。 根据文档,我可以使用测试条卡 然而,当使用其中一个测试卡时,我发现了一个错误Stripe payments Python条带支付网关,stripe-payments,Stripe Payments,我正在尝试通过Python对卡进行收费。 然而,我无法让它工作。 根据文档,我可以使用测试条卡 然而,当使用其中一个测试卡时,我发现了一个错误 stripe.error.InvalidRequestError: Request req_y3tPpc4nHFd7Pi: No such token: 4242424242424242 请让我知道如何进行测试。我没有带卡或余额的条状账户 stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc&
stripe.error.InvalidRequestError: Request req_y3tPpc4nHFd7Pi: No such token: 4242424242424242
请让我知道如何进行测试。我没有带卡或余额的条状账户
stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
a = stripe.Charge.create(
amount=2000,
currency="usd",
source="4242424242424242",
description="My First Test Charge (created for API docs)",
)
正确的语法是[1]:
# `source` is obtained with Stripe.js; see https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token
stripe.Charge.create(
amount=2000,
currency="eur",
source="tok_visa", # <-- The tokenized card information not a CC number
description="My First Test Charge (created for API docs)",
)
#`source`是通过Stripe.js获得的;看见https://stripe.com/docs/payments/accept-a-payment-charges#web-创建令牌
stripe.Charge.create(
金额=2000,
货币=“欧元”,
source=“tok_visa”,正确的语法是[1]:
# `source` is obtained with Stripe.js; see https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token
stripe.Charge.create(
amount=2000,
currency="eur",
source="tok_visa", # <-- The tokenized card information not a CC number
description="My First Test Charge (created for API docs)",
)
#`source`是通过Stripe.js获得的;请参见https://stripe.com/docs/payments/accept-a-payment-charges#web-创建令牌
stripe.Charge.create(
金额=2000,
货币=“欧元”,
source=“tok_visa”,#非常感谢您,createToken python helper工作。非常感谢您,createToken python helper工作。