条带连接未捕获异常错误' Stripe \ Error \ Authentication'有消息'提供的密钥' sk_test _'无权访问帐户

时间:2016-07-03 15:03:03

标签: php stripe-payments stripe-connect

\Stripe\Stripe::setApiKey("sk_test_someString");
$charge = \Stripe\Charge::create(
  array(
    "amount" => 5000, // amount in cents
    "currency" => "usd",
    "source" => $token,
    "description" => "Example charge",
    "application_fee" => 123 // amount in cents
  ),
  array("stripe_account" => CONNECTED_STRIPE_ACCOUNT_ID)
);

} catch(\Stripe\Error\Card $e) {
  // The card has been declined

}
catch (\Stripe\Error\ApiConnection $e) {
    // Network problem, perhaps try again.
} catch (\Stripe\Error\InvalidRequest $e) {
    // You screwed up in your programming. Shouldn't happen!
} catch (\Stripe\Error\Api $e) {
    // Stripe's servers are down!
} catch (\Stripe\Error\Card $e) {
    // Card was declined.
}

到目前为止我所做的一切: 创建自定义表单添加条带提供的所有必要编码 添加最新的php条带依赖项 将localhost url添加到我的条带连接 问题是我通过单击连接条带按钮连接后 然后使用演示卡并发布请求这样的错误回来也没有 充电发生。在日志中,我看到帖子但没有解析请求查询参数。有人可以告诉我,我做错了什么

0 个答案:

没有答案