Estoy tratando de abrir la pasarela de pago (página de pago) de stripe js. Hice esto:
async function LoadPaymentController(){ var stripe = Stripe('pk_test_51JBxkrB1SsiUQAfnzEWMqNgSCr9yV7tvULhePuQxwP3iCVr1kkNZskUA51TOtE5gw7f1X1ZSw41FKbHoIAHDolgI00DStmrT1m'); // Call your backend to create the Checkout Session fetch('/create-checkout-session', { method: 'POST', }) .then(function(response) { return response.json(); }) .then(function(session) { return stripe.redirectToCheckout({ sessionId: session.id }); }) .then(function(result) { // If `redirectToCheckout` fails due to a browser or network // error, you should display the localized error message to your // customer using `error.message`. if (result.error) { alert(result.error.message); } }); }Esta función se llama cuando se hace clic en un botón en mi página. pero me devuelve el error
Stripe.js requires 'allow-same-origin' if sandboxedCuando busco en Google eso, solo encuentro ejemplos de esto que se usa dentro de un iframe, lo cual no estoy haciendo.
¿Puede alguien ayudarme aquí?