Shopify / checkout-sheet-kit-react-native

Shopify's Checkout Sheet Kit for React Native - simplifying the process of adding checkout to your native apps.
https://shopify.dev/docs/custom-storefronts/mobile-apps
MIT License
30 stars 3 forks source link

Cart buyer identity is not pre-filled in the checkout #77

Closed mk-nickyang closed 2 months ago

mk-nickyang commented 5 months ago

Describe the bug

I have email buyer identity data in Cart,

"buyerIdentity": {
    "countryCode": "AU",
    "email": "nickyang0501@gmail.com",
    "phone": null,
    "customer": null
}

when I call shopifyCheckout.present(checkoutUrl), email field is still empty.

I'm using the cart query in Storefront API to get the checkoutUrl btw.

To Reproduce

  1. Create a cart with buyerIdentity data
  2. Call shopifyCheckout.present(checkoutUrl)
  3. No buyerIdentity data is pre-filled

Expected behavior

buyerIdentity data in Cart should be pre-filled in Checkout

Screenshots/Videos/Log output

https://github.com/Shopify/checkout-sheet-kit-react-native/assets/29244509/6e2c13bf-eb90-4355-a3b4-0c69875e67bf

https://github.com/Shopify/checkout-sheet-kit-react-native/assets/29244509/6264ca9c-054f-4469-8393-c41732cac2d5

Versions

Shop domain

https://apawfectplace.com.au/

Additional context

Appreciate your time on this issue, let me know if there is anything else you need. Amazing work on this package!

markmur commented 5 months ago

Hey @mk-nickyang, I took a look into this and can confirm that It's not an issue with the React Native library but instead an internal one. I've created a ticket internally to fix this. I'll report back with any progress made.

Apologies if you get any pings from Shop Pay on your phone while we reproduce this.

mk-nickyang commented 5 months ago

@markmur Thank you so much for the quick update!

And no worries about the Shop Pay code, glad I'm not brute-force attacked 😄

xseignard commented 4 months ago

Hello @markmur 👋 I'm facing the same issue. I'm using the cartBuyerIdentityUpdate mutation to update buyer infos

Here's what I pass as input to this mutation:

const input = {
  cartId: cart.id,
  buyerIdentity: {
    email: user.email,
    phone: user.phone,
    countryCode: address.country as CountryCode,
    deliveryAddressPreferences: [
      {
        deliveryAddressValidationStrategy: DeliveryAddressValidationStrategy.CountryCodeOnly,
        deliveryAddress: {
          firstName: user.firstName,
          lastName: user.lastName,
          address1: address.street,
          zip: address.postalCode,
          city: address.city,
          country: address.country,
        },
      },
    ],
  },
};

There's no errors returned by the mutation.

Everything is legit on my internal user and address objects, but for some reasons, the address cannot be prefilled on the checkout screen, only the email field is prefilled. And I see this following error

Capture d’écran 2024-04-16 à 08 38 01

Any idea?

Shop domain

https://shop.alan.com

Thanks for your help

navxchahal commented 4 months ago

Facing the same issue, the address and user cannot be prefilled on the checkout screen even after updating the buyerIdentity every time. Kindly update ASAP.

koulomesh commented 4 months ago

@markmur Any update on this issue? I tried after implementing multipass also. In the first load, the webview loads with the user being logged in. But when we load the webview, the second time, it asks for login.

markmur commented 4 months ago

Hi @koulomesh, would you mind creating another issue outlining how you're creating checkout URL via the storefront API?

This issue is not related to multipass.

koulomesh commented 4 months ago

Created a new issue @markmur .

AdarshShine commented 4 months ago

I am also facing the same issue

xseignard commented 3 months ago

It's been 2 months, is there any remediation regarding this issue? cc @markmur

MoeMamdouh commented 3 months ago

I'm also facing the same issue, Any updates?

c-bahar commented 3 months ago

Same issue

markmur commented 2 months ago

A fix for this has been rolled out. Apologies for the delay.

Please report back if you continue to encounter this issue.