#ion-leu_code

1 messages ยท Page 1 of 1 (latest)

warped fractalBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1425033563966799883

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

sharp rivet
#

the code field had a char limit so:

    const expressCheckoutOptions: StripeExpressCheckoutElementOptions = {
        emailRequired: true,
        phoneNumberRequired: true,
        paymentMethods: {
            googlePay: auto,
            applePay: auto,
            link: auto,
            paypal: auto,
            klarna: auto,
            amazonPay: auto,
        },
        layout,
        shippingAddressRequired: true,
        shippingRates: shippingOptions.map(({ label, ...rest }) => ({ ...rest, displayName: label })),
        buttonHeight: 55,
    };
...

const handleConfirm = async (e: StripeExpressCheckoutElementConfirmEvent) => {
    const { billingDetails, shippingAddress } = e;
    console.log("shippingAddress and billingDetails", { shippingAddress, billingDetails, e });
    ...
}


...
<ExpressCheckoutElement
    onConfirm={handleConfirm}
     ...
    options={expressCheckoutOptions}
/>


sharp rivet
#

So what would my options be? just accept that all users will have the same phone number? ๐Ÿ˜…

#

Is it even possible to get the correct phone number from amazon pay?

craggy merlin
#

Stripe isn't returning any phone number under the shipping object

#

Where does these (same) numbers come from ?

sharp rivet
#

billingDetails.phone

#

I just created another amazon sandbox account
here is the address that I used (see screenshot 1)
at no point was I prompted to add a billing address
and i didn't use this phone number (4259415758) anywhere in the form.
Yet here is what the StripeExpressCheckoutElementConfirmEvent looks like after confirming the amazon flow (screenshot 2)

craggy merlin
#

Ok you are getting it from the billing object then

craggy merlin
#

Do you have this issue in production ?

sharp rivet
#

this code isn't yet on production.
This is the exact reason I am writting here in the first place...

craggy merlin
#

Yeah this should be something with Amazon Pay in Sandboxes that is sending the same phone number

warped fractalBOT
sharp rivet
#

thanks, hopefully this doesn't happen in prod...