Firstly, all works fine, but i want to use the payment element from stripe instead of the card element.
the payment element return to a page and does not run the script afterwards, which is fine for me. But there is the cartComplete function which then doesn't get called. But even when it's not called i see the payment in stripe and the order in the medusa backend - so all works perfectly fine.
Since there is no documentation for it, i am not sure if this is on purpose.
This is my code of the stripe element.
paymentElement.value = elements.create('payment');
paymentElement.value.mount('#payment-element');
const {error} = await stripe.value.confirmPayment({
elements,
confirmParams: {
return_url: `${window.location.origin}/payment-complete`
}
});
// this is not needed and i don't know why
// await client.carts.complete(cartId);