Everything's OK: client created, and Stripe->Checkout->Sessions->Create returned a (very long) ID.
My problem is that this code is being rejected?
Код: Выделить всё
requestSubscription(function(err, response) {
console.log('response', response);
if (!err) {
let stripe = Stripe(response.stripe.publicKey);
chekoutSession = response.stripe.checkoutSessionKey;
stripe.initCheckout({
chekoutSession
}).then((checkout) => {
const checkoutContainer = document.getElementById('extranet-checkout-stripe');
checkoutContainer.append(JSON.stringify(checkout.lineItems, null, 2));
checkoutContainer.append(document.createElement('br'));
checkoutContainer.append(`Total: $ {
checkout.session().total.total.amount
}`);
});
}
});
< /code>
Я получаю сообщение об ошибке: < /p>
Uncaught IntegrationError: Invalid initCheckout() parameter: options. chekoutSession is not an accepted parameter.
Может ли кто -нибудь помочь мне и сказать мне, что я сделал неправильно?>
Подробнее здесь: https://stackoverflow.com/questions/797 ... ession-key
Мобильная версия