Shopify / mobile-buy-sdk-ios

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using Apple Pay or their credit card.
MIT License
452 stars 199 forks source link

Not Able to create customer using ios sdk. every time receive Creating Customer Limit exceeded. Please try again later. #943

Closed NALAWALAMURTUZA closed 5 years ago

NALAWALAMURTUZA commented 5 years ago
     let input = Storefront.CustomerCreateInput.create(email:email,
                                                      password: password,
                                                      firstName:firstName,
                                                      lastName:lastName,
                                                      phone:phone/*,
                                                      acceptsMarketing: acceptsMarketing*/)
    return Storefront.buildMutation { $0
        .customerCreate(input: input) { $0
            .customer { $0
                .id()
                .email()
                .firstName()
                .lastName()
                /*.phone()
                .displayName()
                .createdAt()
                .updatedAt()*/
            }
            .userErrors { $0
                .field()
                .message()
            }
        }
    }

when I create customer through android it's working perfect.but while creating a customer I receive this userErrors every time we have only 3 customers in my store.

rebeccajfriedman commented 5 years ago

Are you reusing existing email addresses? You can only reuse an existing email address 3 times in a 5 minute window.

NALAWALAMURTUZA commented 5 years ago

I m not use an existing email address. but when I fire query without Phone, acceptsMarketing then I create a customer successfully. ultimately I create a customer with only 4 parameter email, firstName, lastName, password

    let input = Storefront.CustomerCreateInput.create(email:email,
                                                      password: password,
                                                      firstName:firstName,
                                                      lastName:lastName)
    return Storefront.buildMutation { $0
        .customerCreate(input: input) { $0
            .customer { $0
                .id()
                .email()
                .firstName()
                .lastName() 
            }
            .userErrors { $0
                .field()
                .message()
            }
        }
    }

This Query work but when I add a phone, acceptsMarketing it not work anymore.and getting a usererror.

So my Question what about phone? And how we pass sucessfully phone property in query.

rebeccajfriedman commented 5 years ago

How are you formatting the phone number? A phone number formatted like "+15551112222" should work - provided that you are sending a valid phone number (with a valid area code and a valid dialing code).

NALAWALAMURTUZA commented 5 years ago

ok, I got your point and it working with country code.

NALAWALAMURTUZA commented 5 years ago

if API returns user error with please adds a phone number with country code. so the user gets an idea about a wrong phone number.instand of Creating Customer Limit exceeded. Please try again later.

rebeccajfriedman commented 5 years ago

The create customer throttle of 3 times in 5 minutes is still being applied, even though you are unsuccessfully creating a customer. If you wait 5 minutes, and then send the request, you should see a "Phone is invalid" user error.