使用条纹计费,我有一个表格,当我提交信息并下订单时,出现以下错误:Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 55]: Failed sending HTTP POST request)我的 PHP 代码是这样的: <?php require_once('../vendor/autoload.php'); \Stripe\Stripe::setApiKey(' sk_test_51Gw3j3DiiBRVUNG3QmcK0fjrBkpc31k5bqkX5tP3L5zo4GkLysZEO7iyflCHGoIAa6XtRJMiWjB0inTbZF390JiS00gtV1CREh '); $POST = filter_var_array($_POST, FILTER_SANITIZE_STRING); $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $email = $_POST['email']; $token = $_POST['stripeToken']; echo $token . '<br>'; echo $first_name . '<br>'; echo $last_name . '<br>'; echo $email . '<br>'; \Stripe\Stripe::setVerifySslCerts(false); try { $customer = \Stripe\Customer::create(array( "email" => $email, "source" => $token )); $charge = \Stripe\Charge::create(array( "amount" => 5000, "currency" => "usd", "description" => "porn video", "customer" => $customer->id )); print_r($charge); } catch (Exception $s){ echo $s->getMessage(); }?>输出如下:我已经安装了 SSL 证书。我正在使用 Wampserver 与 PHP 7.3.12 和 Apache 2.4.41 。
- 1 回答
- 0 关注
- 151 浏览
添加回答
举报
0/150
提交
取消