我正在尝试使用 stripe curl 向测试客户收取 10 美元,但它返回金额不正确的错误。
curl https://api.stripe.com/v1/charges \
-u sk_test_qtxx1EuLIMqMwOmEw3NKxxxx: \
-d amount=10.00 \
-d currency=usd \
-d card[number]=4242424242424242 \
-d card[exp_month]=12 \
-d card[exp_year]=2019 \
-d card[cvc]=123
返回的错误是:
{
"error": {
"type": "invalid_request_error",
"message": "Invalid integer: 10.00",
"param": "amount"
}
}
我试了 10 个,它说:“金额必须至少为 50 美分”。
我想知道我是否遗漏了任何后置变量,例如某种 token 或 key 。
最佳答案
根据 the documentation , amount参数需要为
A positive integer in the smallest currency unit
所以十 block 钱,你需要通过1000
。
关于php - Stripe curl 命令行 POST,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38226644/