PHPを使用してストライプペイメントを使用しました。ローカルマシンで動作しますが、ライブサーバーでは期待どおりに動作しません。私たちが使用したコードを共有し、エラーのスクリーンショットも添付しました。私たちがどこで間違いを犯したのかわからない、あなたは私たちを導くことができる?潜在的にあなたがをコピーしていないように見えますストライプペイメントSSLプロトコルエラーWordPress
require_once('Stripe.php');
Stripe::setApiKey('secret key');
echo '<form action="" method="post">
<script src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="publish key"
data-description="Access for a year"
data-amount="5000"
data-locale="auto"></script>
</form>';
if($_POST) {
$token = $_POST['stripeToken'];
$customer = Stripe_Customer::create(array(
'email' => '[email protected]',
'source' => $token
));
$charge = Stripe_Charge::create(array(
'customer' => $customer->id,
'amount' => 5000,
'currency' => 'usd'
));
echo '<h1>Successfully charged $50.00!</h1>';
}
ローカルマシン
ライブサーバー