我想通過條帶中的php變量,但它們顯示錯誤缺少參數數量。在帶狀條件下傳遞php變量charg
這是我的代碼,我從上一頁得到這個數額,並希望在此代碼中傳遞量變量,但我在網上搜索他們說只通過分值。 是否有任何解決方案,通過變量傳遞量我想通過動態價值不是一成不變的,怎麼可能
$amountvalue = '123';
try {
if (empty($_POST['street']) || empty($_POST['city']) || empty($_POST['zip']))
throw new Exception("Fill out all required fields.");
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
Stripe_Charge::create(array("amount" => $amountvalue,
"currency" => "aud",
"card" => $_POST['stripeToken'],
"description" => $_POST['email']));
$success = '<div class="alert alert-success">
<strong>Success!</strong> Your payment was successful.
</div>';
}
catch (Exception $e) {
$error = '<div class="alert alert-danger">
<strong>Error!</strong> '.$e->getMessage().'
</div>';
}
但似乎條紋不會除了這個變量。它把一個「缺少必要PARAM:量」的錯誤頁面上,只希望接受諸如「1234」
那麼你的問題是什麼? – RiggsFolly
您是否嘗試過'$ amountvalue = 123;' – RiggsFolly
我只是想通過varible在 – flower