#ericbirdsall

1 messages · Page 1 of 1 (latest)

oblique rainBOT
tired wren
#

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);
}
});
}

sharp gull
#

Hello! stripe.confirmPayment typically redirects to another URL rather than the promise returning. What are you seeing in the console when this happens?

tired wren
#

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

sharp gull
#

Hm. So you've mounted a Payment Element, filled it in, then you run attemptPayment()?

tired wren
#

Yes, thats correct

sharp gull
#

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?

tired wren
#

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

sharp gull
#

Honestly I'm not sure why that wouldn't work. Can you try it in a private browsing window, or in another browser?

tired wren
#

I'll play around with it more. I appreciate your help