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

invalid pkpass #47

Open
charis-mag opened this issue Dec 4, 2024 · 1 comment
Open

invalid pkpass #47

charis-mag opened this issue Dec 4, 2024 · 1 comment

Comments

@charis-mag
Copy link

charis-mag commented Dec 4, 2024

Hello, we need to use the pass-converter tool to convert a Google Wallet pass into an Apple PKPass. After using the tool, I received the following result:
image

After checking the pass.json, there are only the primary fields:


{
  "passTypeIdentifier": "pass.com.company.wallet",
  "teamIdentifier": "someid",
  "serialNumber": "custom17",
  "formatVersion": 1,
  "logoText": "An Amazing Event",
  "description": "An Amazing Event",
  "organizationName": "Times",
  "foregroundColor": "rgb(255, 255, 255)",
  "backgroundColor": "rgb(0, 0, 0)",
  "barcodes": [
    {
      "message": "My unique QR code value",
      "format": "PKBarcodeFormatQR"
    }
  ],
  "eventTicket": {
    "primaryFields": [
      {
        "key": "title",
        "value": "An Amazing Event"
      }
    ],
    "secondaryFields": [],
    "auxiliaryFields": []
  }
}

This is the google payload:

{
    "eventTicketClasses": [
      {
        "classTemplateInfo": {
          "cardBarcodeSectionDetails": {
            "firstTopDetail": {
              "fieldSelector": {
                "fields": [
                  {
                    "fieldPath": "class.imageModulesData['myimage'].mainImage"
                  }
                ]
              }
            }
          },
          "cardTemplateOverride": {
            "cardRowTemplateInfos": [
              {
                "twoItems": {
                  "endItem": {
                    "firstValue": {
                      "fields": [
                        {
                          "fieldPath": "class.textModulesData['eventTime']"
                        }
                      ]
                    }
                  },
                  "startItem": {
                    "firstValue": {
                      "fields": [
                        {
                          "fieldPath": "class.textModulesData['eventDate']"
                        }
                      ]
                    }
                  }
                }
              },
              {
                "twoItems": {
                  "endItem": {
                    "firstValue": {
                      "fields": [
                        {
                          "fieldPath": "class.textModulesData['ticketType']"
                        }
                      ]
                    }
                  },
                  "startItem": {
                    "firstValue": {
                      "fields": [
                        {
                          "fieldPath": "class.textModulesData['ticketHolder']"
                        }
                      ]
                    }
                  }
                }
              }
            ]
          }
        },
        "eventId": "anEventId",
        "eventName": {
          "defaultValue": {
            "kind": "walletobjects#translatedString",
            "language": "en-US",
            "value": "An Amazing Event"
          },
          "kind": "walletobjects#localizedString"
        },
        "hexBackgroundColor": "#ffffff",
        "id": "0000000000022815278.custom17",
        "issuerName": "Times",
        "kind": "walletobjects#eventTicketClass",
        "logo": {
          "kind": "walletobjects#image",
          "sourceUri": {
            "uri": "https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png"
          }
        },
        "reviewStatus": "approved",
        "textModulesData": [
          {
            "body": "2023-12-25",
            "header": "Date",
            "id": "eventDate"
          },
          {
            "body": "08:30",
            "header": "Time",
            "id": "eventTime"
          },
          {
            "body": "James Vincent Patrick",
            "header": "Name",
            "id": "ticketHolder"
          },
          {
            "body": "General VIP, US$500",
            "header": "TICKET TYPE",
            "id": "ticketType"
          }
        ],
        "venue": {
          "address": {
            "defaultValue": {
              "kind": "walletobjects#translatedString",
              "language": "en-US",
              "value": "Company, New York, NY, USA"
            },
            "kind": "walletobjects#localizedString"
          },
          "kind": "walletobjects#eventVenue",
          "name": {
            "defaultValue": {
              "kind": "walletobjects#translatedString",
              "language": "en-US",
              "value": "NY LEOLAND Venue"
            },
            "kind": "walletobjects#localizedString"
          }
        },
        "version": 1,
        "wideLogo": {
          "kind": "walletobjects#image",
          "sourceUri": {
            "uri": "https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png"
          }
        }
      }
    ],
    "eventTicketObjects": [
      {
        "barcode": {
          "alternateText": "#448156",
          "kind": "walletobjects#barcode",
          "type": "qrCode",
          "value": "My unique QR code value"
        },
        "classId": "0000000000022815278.custom17",
        "classReference": {
          "classTemplateInfo": {
            "cardBarcodeSectionDetails": {
              "firstTopDetail": {
                "fieldSelector": {
                  "fields": [
                    {
                      "fieldPath": "class.imageModulesData['myimage'].mainImage"
                    }
                  ]
                }
              }
            },
            "cardTemplateOverride": {
              "cardRowTemplateInfos": [
                {
                  "twoItems": {
                    "endItem": {
                      "firstValue": {
                        "fields": [
                          {
                            "fieldPath": "class.textModulesData['eventTime']"
                          }
                        ]
                      }
                    },
                    "startItem": {
                      "firstValue": {
                        "fields": [
                          {
                            "fieldPath": "class.textModulesData['eventDate']"
                          }
                        ]
                      }
                    }
                  }
                },
                {
                  "twoItems": {
                    "endItem": {
                      "firstValue": {
                        "fields": [
                          {
                            "fieldPath": "class.textModulesData['ticketType']"
                          }
                        ]
                      }
                    },
                    "startItem": {
                      "firstValue": {
                        "fields": [
                          {
                            "fieldPath": "class.textModulesData['ticketHolder']"
                          }
                        ]
                      }
                    }
                  }
                }
              ]
            }
          },
          "eventId": "anEventId",
          "eventName": {
            "defaultValue": {
              "kind": "walletobjects#translatedString",
              "language": "en-US",
              "value": "An Amazing Event"
            },
            "kind": "walletobjects#localizedString"
          },
          "hexBackgroundColor": "#ffffff",
          "id": "0000000000022815278.custom17",
          "issuerName": "Times",
          "kind": "walletobjects#eventTicketClass",
          "logo": {
            "kind": "walletobjects#image",
            "sourceUri": {
              "uri": "https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png"
            }
          },
          "reviewStatus": "approved",
          "textModulesData": [
            {
              "body": "2023-12-25",
              "header": "Date",
              "id": "eventDate"
            },
            {
              "body": "08:30",
              "header": "Time",
              "id": "eventTime"
            },
            {
              "body": "James Vincent Patrick",
              "header": "Name",
              "id": "ticketHolder"
            },
            {
              "body": "General VIP, US$500",
              "header": "TICKET TYPE",
              "id": "ticketType"
            }
          ],
          "venue": {
            "address": {
              "defaultValue": {
                "kind": "walletobjects#translatedString",
                "language": "en-US",
                "value": "Company, New York, NY, USA"
              },
              "kind": "walletobjects#localizedString"
            },
            "kind": "walletobjects#eventVenue",
            "name": {
              "defaultValue": {
                "kind": "walletobjects#translatedString",
                "language": "en-US",
                "value": "NY LEOLAND Venue"
              },
              "kind": "walletobjects#localizedString"
            }
          },
          "version": 1,
          "wideLogo": {
            "kind": "walletobjects#image",
            "sourceUri": {
              "uri": "https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png"
            }
          }
        },
        "id": "0000000000022815278.custom17",
        "kind": "walletobjects#eventTicketObject",
        "state": "active",
        "textModulesData": [
          {
            "body": "Welcome to the BEST EVENT! Please keep this ticket safe.",
            "header": "Event Details",
            "id": "TEXT_MODULE_ID"
          }
        ],
        "ticketHolderName": "James Vincent Patrick",
        "ticketNumber": "1234567890",
        "version": 1
      }
    ]
  }

Any help or suggestions to resolve this issue would be highly appreciated. I’m open to ideas and happy to provide more details if needed, thank you.

@julia-elikhis
Copy link

The same happens when using the example JWT from https://developers.google.com/wallet/retail/offers/overview/add-to-google-wallet-flow#expandable-6:
Screenshot 2024-12-09 at 12 23 18
@stephenmcd could you please help here?

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

2 participants