我不断收到此错误,有人可以帮忙知道做错了什么吗?
条带\错误\ InvalidRequest没有这样的令牌: tok_1E6AbPFWwEbVuzsrPEO3KM3A
\ vendor \ stripe \ stripe-php \ lib \ ApiRequestor.php
// for API versions earlier than 2015-09-08
if ($code == 'rate_limit') {
return new Error\RateLimit($msg, $param, $rcode, $rbody, $resp, $rheaders);
}
if ($type == 'idempotency_error') {
return new Error\Idempotency($msg, $rcode, $rbody, $resp, $rheaders);
}
// intentional fall-through
case 404:
return new Error\InvalidRequest($msg, $param, $rcode, $rbody, $resp, $rheaders);
case 401:
return new Error\Authentication($msg, $rcode, $rbody, $resp, $rheaders);
case 402:
return new Error\Card($msg, $param, $code, $rcode, $rbody, $resp, $rheaders);
case 403:
return new Error\Permission($msg, $rcode, $rbody, $resp, $rheaders);
case 429:
return new Error\RateLimit($msg, $param, $rcode, $rbody, $resp, $rheaders);
default:
return new Error\Api($msg, $rcode, $rbody, $resp, $rheaders);
}
}
答案 0 :(得分:0)
当您从不同的发布密钥生成令牌并使用不同的秘密密钥进行收费时,会发生此问题。 因此,当您尝试使用该令牌(该帐户在您使用的其他帐户中不存在)进行收费或执行任何操作时, 在这种情况下,条带引发错误“您的帐户中不存在该令牌”。 请确认您使用的是相同的发布和密钥