#ross.alexander

1 messages · Page 1 of 1 (latest)

vale sapphireBOT
sullen hollow
#

Sounds like you are using Checkout instead of payment element + address element, can you confirm your integration?

tall crown
sullen hollow
#

Can you share with me the relevant code?

tall crown
#
<script src="https://js.stripe.com/v3/"></script>

    <script>
        const stripe = Stripe('{{config('services.stripe.key')}}');

        const options = {
            clientSecret: '{{$paymentIntentClientSecret}}',
            appearance: {
                theme: 'stripe',
            },
        };

        const elements = stripe.elements(options);

        const paymentElement = elements.create('payment');
        paymentElement.mount('#payment-element');

        const form = document.getElementById('payment-form');

        const shippingAddressOptions = {
            mode: 'shipping',
        };

        const shippingAddressElement = elements.create('address', shippingAddressOptions);
        shippingAddressElement.mount('#address-element');

        shippingAddressElement.on('change', (event) => {
            if (event.complete){
                Livewire.dispatch('address-updated', {address: event.value});
                // Extract potentially complete address
                // const address = event.value.address;
                // console.log(address);
            }
        })
....
tall crown
#

I just find it hard to believe that collecting separate shipping and billing addresses is not a straightforward process. It's an incredibly common scenario 🤔

native willow
#

Hi! I'm taking over this thread. Give me a few minuites to look into this.