#ericbirdsall
1 messages · Page 1 of 1 (latest)
function attemptPayment() {
console.log('started', elements)
stripe.confirmPayment({
elements,
confirmParams: {
return_url: 'https://example.com',
},
})
.then(function(result) {
if (result.error) {
console.log(result.error);
}
});
}
Hello! stripe.confirmPayment typically redirects to another URL rather than the promise returning. What are you seeing in the console when this happens?
When running the function above-
I see in the console:
started, and the elements object that I just logged out to confirm it was valid
then the console shows undefined
then it shows "Uncaught (in promise) Object {}
and that object is empty
Hm. So you've mounted a Payment Element, filled it in, then you run attemptPayment()?
Yes, thats correct
Is your return_url literally https://example.com/? I don't think that should matter, but just to rule it out, does a non-example URL make any difference?
If that doesn't make any difference, can you link me to the page where this is happening so I can take a look?
a different URL did not change it :/
I cant link you the page because it's within a CRM system that you need to logged in to view
Honestly I'm not sure why that wouldn't work. Can you try it in a private browsing window, or in another browser?
I'll play around with it more. I appreciate your help