托管PHP应用程序:: Stripe Payment集成中的错误

时间:2016-05-25 00:28:08

标签: php hosting stripe-payments payment

我已经托管了我的PHP应用程序,除了Stripe Payment集成之外,一切正常。

有人可以建议可能出现的错误吗?

require_once('../../Stripe/init.php');

\Stripe\Stripe::setApiKey('sk_test_************');

$e="";

// Get the credit card details submitted by the form
$token = $_POST['stripeToken'];

// Create the charge on Stripe's servers - this will charge the user's card
try {
    $charge = \Stripe\Charge::create(array(
        "amount" => $stripe_amount, // amount in cents, again
        "currency" => "cad",
        "source" => $token,
        "description" => "Buy Gift Card"
    ));
} catch(\Stripe\Error\Card $e) {
    $e = "Your card has been declined, please enter a valid card";
}

它在我的本地计算机上工作正常,但在我的托管上它给了我这个错误:

  

500 - 内部服务器错误。您的资源存在问题   正在寻找,它无法显示。

0 个答案:

没有答案