#stefan_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.
- stefan_code, 1 hour ago, 29 messages
- stefan_code, 23 hours ago, 12 messages
- stefan_code, 1 day ago, 36 messages
- stefan_code, 2 days ago, 14 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1256207632482701414
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Share the code please
async onConfirm(event: StripeExpressCheckoutElementConfirmEvent) {
const { expressPaymentType, paymentFailed } = event;
console.log(event);
// this is a reference to the stripe elements object
const stripe = this.stripe.getInstance();
// You can only call `paymentFailed` before calling `confirmPayment` to signal
// an error before payment confirmation.
const { error, confirmationToken } = await stripe!.createConfirmationToken({
elements: this.expressCheckout.elements,
params: {
return_url: 'https://bonfi-sk.ngrok.dev/order/123/complete'
}
});
console.log(confirmationToken);
const value: any = await this.http.post(environment.apiUrl + '/stripe-checkout/' + this.checkoutTransactionState?.id + '/express', confirmationToken).toPromise();
stripe!
.confirmPayment({
clientSecret: value.clientSecret,
elements: this.expressCheckout.elements,
confirmParams: {
confirmation_token: confirmationToken!.id,
return_url: 'https://ngx-stripe.dev'
}
}).then(result=>{
console.log(result)
});
Create your custom shirt campaign for free. Upload art or design your shirt online & sell to your community for a good cause or for profit. Launch today!
this is with ngx
this is with stripe.js directyle
directly
You need to call confirmPayment within the confirm event: https://docs.stripe.com/js/elements_object/express_checkout_element_confirm_event
i did
if you look at the previous conv
you will see that it's called when i mounted the ECE directly with stripe.js
What is this onConfirm function? I don't see any evidence of you listening for the .on('confirm') event?
If this is specific to that library then you'll need to reach out to them for help โ its' not a Stripe official lib
this comes from the ngx-stripe.dev
it is being called when i click the apple pay button
im reporting this here, as it's the same error im getting when not using the ngx library
when i use stripe.js directly - same error
exactly the same 'on confirm'
IMHO, ECE is not working at all in angualar
Maybe, but we don't officially support Angular for reasons stated by my colleague earlier (and hence why there's a third-party lib)
In any case, I'd recommend you write in to my team as this will require that we take a deeper look at what's going on (beyond the remit of this server really): https://support.stripe.com/contact/email?topic=api_integration
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
alright
thanks anyway
one question before this closes
if i were to include a page that contains the ECE in vanilla JS via an iframe, would that work?
In theory it should work yes. You'd need to be sure to correctly registered all domains for the wallets: https://docs.stripe.com/payments/payment-methods/pmd-registration?dashboard-or-api=dashboard#using-an-iframe
it would be the same domain, it will be just a file that is included
Yep, just flagging the additional checks you need to be mindful of for wallets with an iframe