jeudi 7 octobre 2021

I found Fatal Error in Stripe Integration

Fatal error: Uncaught (Status 400) (Request req_0uWOhuErSVVYrT) Must provide source or customer. thrown in C:\xampp\htdocs\augermates\stripe\vendor\stripe\stripe-php\lib\Exception\ApiErrorException.php on line 38

<?php 
include('config.php');

$price=500;
$name="augermates";

$token=$_POST['stripeToken'];

$data=\Stripe\Charge::create(array(
  "amount"=> 500,
  "currency"=> "USD",
  "Description"=> "augermates",
  "Source"=>$token,


));

echo "<pre>";
print_r($token);


 ?>


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire