#chris-oswald

1 messages ยท Page 1 of 1 (latest)

fringe elbowBOT
kindred wedge
#

Hmm... let me do some digging

#

Are you getting any errors?

junior iris
#

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

kindred wedge
#

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)

junior iris
#

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

kindred wedge
#

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?

junior iris
#

pi_3N70PRJM7QGeoQlX0Xq4O3BQ

#

Not enrolled in betas

fringe elbowBOT
kindred wedge
#

Gotcha - just wanted to ask because the "Use a saved payment method" text threw me off a bit there

junior iris
#

It shows up on the payment element if you are logged into link

kindred wedge
#

Yeah I forgot about that

junior iris
#

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

kindred wedge
#

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)

junior iris
#

interesting

kindred wedge
#

But this behavior you're seeing with the payment still saying "link" is weird and I'd say unexpected

junior iris
#

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?

kindred wedge
#

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

junior iris
#

k

bronze mason
#

Hi there. Taking over for karbi as they have to step out. Is there anything else I can help you with?

junior iris
#

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 ๐Ÿ™‚

dark notch
#

Hello ๐Ÿ‘‹
Stepping in for my colleague as discord is running busy