#joeeyireland_code
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- joeeyireland_code, 19 hours ago, 20 messages
- joeeyireland_api, 1 day ago, 15 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1245347333827461130
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
elements,
clientSecret,
confirmParams: {
return_url: 'https://jgdr.epixdev.co.uk/test-donation-forms',
payment_method_data: {
billing_details: {
name: name,
email: email,
}
},
},
}).then(function(result) {
if (result.error) {
submitBtn.disabled = false;
submitBtn.style.display = 'block';
ldsRing.style.display = 'none';
errorMessageDiv.style.display = 'block';
errorMessageDiv.textContent = result.error.message;
return;
}
else {
console.log('IT WORKED');
}
});```
it never goes in the bottom else
Hi, let me help you with this.
This is expected, unless you use redirect: "if_required: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
However, in some cases the browser will still redirect the customer to another page to complete the payment.
so if i add that underneath return_url or do i need to remove return url ?
sorry outside confirmparams
ok sorry i added redirect and it goes into the else which is good but then does not redirect after so would i have to manually redirect it
Yes, you will need to manually redirect the customer in this case.
What logic do you want to execute in the else clause?
Happy to help.