[英]What is the " result object " from stripe.redirectToCheckout?
var stripe = Stripe('pk_test_51JaZneFymkOlJfbtifS7RjJeFPZTchtlvU5iiVmemkU76vOFWWPZOW9GwBDb9518RCoOfkvUQkGV92TyEMaXqYgh00eb6kLKZj');
var session = "<?php echo $checkout_session['id']; ?>";
stripe.redirectToCheckout({ sessionId: session })
.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);
}
})
.catch(function(error) {
console.error('Error:', error);
});
For some reason i cant get access to " result " value in >>.then(function(result) << can anyone tell me whats values are available " result "?出于某种原因,我无法访问 >>.then(function(result) << 中的“result”值 << 谁能告诉我“result”可用的值有哪些?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.