#chris-oswald
1 messages ยท Page 1 of 1 (latest)
no errors
just a weird state in the UI
If I never create the address element the link payment options shows
If I create the address element, the link option disappears and when I select a different payment options like "Klarna" the change event still says the payment is "Link"
Here is my code
this.paymentElement.on('change', function (event: any) {
console.log("Payment Type" + event.value.type);
const previousPayment = vm.paymentName;
vm.paymentName = event.value.type;
if (vm.paymentName === 'card' || vm.paymentName === 'cashapp') {
if (!vm.billingElement) {
vm.createBillingElement();
}
} else {
if (vm.billingElement) {
vm.billingElement.destroy();
vm.billingElement = null
}
}
});
in the payment element "On Change" I'm dynamically adding the billing element based on the payment type
Do you also have the Link authentication element implemented? And can I see a screenshot of your UI?
Even better would be if you have a URL I can look at on my end (but no worries if you don't have that)
No, because you get it for free with the Payment element
that "debug" circled at the top is displaying the payment method selected, which isn't link
If I log out of link everything works normally
it's something to do with Link and it working with the payment element
Really quick - can you share a PaymentIntent ID (any one will be fine, just want to see something on your account). And do you happen to be enrolled in any betas/private features?
Gotcha - just wanted to ask because the "Use a saved payment method" text threw me off a bit there
It shows up on the payment element if you are logged into link
Yeah I forgot about that
no worries, I'm migrating off the card element (trying to), but this thing seems like a WIP still
I like the idea tho
Logged out of link ^^^ everything is normal
I guess I can just turn off link in my payment setting and it fixes my immediate problems
I think the issue here is that to use the Address Element w/ Link you also need to implement the Authentication Element (because we don't want you to be able to update the address unless you're authenticated)
interesting
But this behavior you're seeing with the payment still saying "link" is weird and I'd say unexpected
agreed, I do think that's a bug
I looked over the documentation. I don't see a way with the payment element to "require" a phone number or billing address without using the address element. Am I missing something?
It's either use the address element (and if you want link, then you'd also want to add the authentication element) or you'd collect it in your own UI inputs
k
Hi there. Taking over for karbi as they have to step out. Is there anything else I can help you with?
no, I guess I would like to understand if that issue with the payment type being wrong will be addressed. It was acknowledged as unexpected
I might classify it differently ๐
Hello ๐
Stepping in for my colleague as discord is running busy