I have been building an ecommerce web application and wanted to Integrate my Checkout with the Stripe API , but when i run the application and make a transaction. I get the following message error..
I came to find that Payment Intent API are to be used as per new RBI regulations, I cannot get how to change my code so that it again accepts my transaction with a 201 response. Here is my code snippet.
import StripeCheckout from "react-stripe-checkout";
const STRIPE_PUBLISHABLE =
"my_api_key";
const onToken = (user, checkout) => (token) => checkout(user, token.id);
const Checkout = ({ amount, user, checkout }) => (
<StripeCheckout
amount={amount * 100}
token={onToken(user, checkout)}
currency="INR"
stripeKey={STRIPE_PUBLISHABLE}
/>
);
export default Checkout;