Update customer id being passed

Status
Completed
Assign
Pradhumna Pancholi
type
Redemption w/ NFT
effort points
100
Start Date
End Date
priority
high
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.
  1. Move that function to server-side code and call it inside the function that adds a token to the redeemed tokens DB.
  1. We can store email instead of id, which can be helpful for customer support unless we need id for a reason.
Β 

Update customer id being passed

Status
Completed
Assign
Pradhumna Pancholi
type
Redemption w/ NFT
effort points
100
Start Date
End Date
priority
high
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.
  1. Move that function to server-side code and call it inside the function that adds a token to the redeemed tokens DB.
  1. We can store email instead of id, which can be helpful for customer support unless we need id for a reason.
Β