joshnuss / svelte-stripe

Everything you need to add Stripe Elements to your Svelte project
https://sveltestripe.com
MIT License
412 stars 40 forks source link

I cannot get the LinkAuthenticationElement example to work #105

Closed rif closed 7 months ago

rif commented 7 months ago

Describe the bug

the LinkAuthenticationElement demo page works fine but when I am using even exactly the example code entering the email has no effect. Any hints?

Reproduction

Set up the project and run the examples/payment-element locally

Severity

serious, but I can work around it

Additional Information

No response

joshnuss commented 7 months ago

Hi @rif,

Are you seeing any warnings or errors in the DevTools console?

Can you try it with the official Stripe example code using the same credentials: https://github.com/stripe-samples/link

LMK

rif commented 7 months ago

This comment from the link you provided solved my problem:

// Best practice is to enable Link through the dashboard and use automatic payment methods. For this demo, we explicitly pass payment_method_types: ['link', 'card'], to be extra clear which payment method types are enabled. automatic_payment_methods: { enabled: true },

I had to go to stripe -> settings -> payment methods and enable the Link payment method.

Thank you for your help!