Update customer id being passed
Status
Assign
type
effort points
100
Start Date
End Date
priority
tags
Update the code to save the corresponding Shopify customer id.
// make and request to add current contract addr and token id to redeemed token's DB//
// const customerId = await this.getCustomerId(email)
await this.registerToken(match.tokenId, match.contractAddr, shopifyProductId, "5658377846923")
Β
in response to NFThinker customer id not being saved his first 6 attempts, when he was using an email address that is not his Shopify email
Β
Context:
We have a function on the theme-extension app that fetches the userβs customer id for a given email. We need this information to add a record to the database of the redeemed tokens. This function works on all browsers except some versions of chrome. We receive a CORS error that can not be solved by adding a header or βno-cors,β as this needs to be on the resource server (Shopify).
Β
Solutions:
We have two solutions here.
- Move that function to server-side code and call it inside the function that adds a token to the redeemed tokens DB.
- We can store email instead of id, which can be helpful for customer support unless we need id for a reason.
Β