Stripe Charge::create not working on my website, why?
I am using stripe PHP in India.
and Charge::create is not working, I tried with international keys but it works but not with mine key.
Here is the code
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
// Token is created using Checkout or Elements!
// Get the payment token ID submitted by the form:
$token = $_POST['stripeToken'];
// `source` is obtained with Stripe.js; see https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token
$charge = \Stripe\Charge::create([
'amount' => 2000,
'currency' => 'usd',
'source' => $token,
'description' => 'Charge for email@example.com',
Why it is not working, please tell me?
Total 1 Ans
, 53 views
announcement Recently Asked