Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textModulesData[] is not being displayed #26

Open
igmer opened this issue Nov 5, 2024 · 0 comments
Open

textModulesData[] is not being displayed #26

igmer opened this issue Nov 5, 2024 · 0 comments

Comments

@igmer
Copy link

igmer commented Nov 5, 2024

I have followed the codelad example but when viewing the pass in the wallet the textmoduledata information is not displayed.
this is my code:
`const genricClass = {
"id": ${issuerId}.${classSuffix},
"classTemplateInfo": {
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"twoItems": {
"startItem": {
"firstValue": {
"fields": [
{
"fieldPath": "object.textModulesData['points']",
},
],
},
},
"endItem": {
"firstValue": {
"fields": [
{
"fieldPath": "object.textModulesData['contacts']",
},
],
},
},
},
},
],
},
},
}
const genericObject = {
'id': ${issuerId}.${order.nanoId},
'classId': ${issuerId}.${classSuffix},
"logo": {
"sourceUri": {
"uri": "https://storage.googleapis.com/wallet-lab-tools-codelab-artifacts-public/pass_google_logo.jpg"
},
"contentDescription": {
"defaultValue": {
"language": "en-US",
"value": "LOGO_IMAGE_DESCRIPTION"
}
}
},
"cardTitle": {
"defaultValue": {
"language": "en-US",
"value": "[SOLO PARA PRUEBAS] Google I/O"
}
},
"subheader": {
"defaultValue": {
"language": "en-US",
"value": "Attendee"
}
},
"header": {
"defaultValue": {
"language": "en-US",
"value": "Alex McJacobs"
}
},
"textModulesData": [
{
"id": "points",
"header": "POINTS",
"body": "1112"
},
{
"id": "contacts",
"header": "CONTACTS",
"body": "79"
}
],
"barcode": {
"type": "QR_CODE",
"value": "BARCODE_VALUE",
"alternateText": ""
},
"hexBackgroundColor": "#4285f4",
"heroImage": {
"sourceUri": {
"uri": "https://storage.googleapis.com/wallet-lab-tools-codelab-artifacts-public/google-io-hero-demo-only.png"
},
"contentDescription": {
"defaultValue": {
"language": "en-US",
"value": "HERO_IMAGE_DESCRIPTION"
}
}
}
}

const claims = {
  iss: credentials.client_email, 
  aud: 'google',
  origins: ['https://dev-api.hifumi.com'],
  typ: 'savetowallet',
  payload: {
    genericObjects: [genericObject],
    genericClasses: [genricClass]
  }
}`

and this is my result:
IMG_3026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant