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

Wallet Pass Integration: Troubleshooting and Prerequisites #1

Open
purevsurena opened this issue Sep 29, 2023 · 0 comments
Open

Wallet Pass Integration: Troubleshooting and Prerequisites #1

purevsurena opened this issue Sep 29, 2023 · 0 comments

Comments

@purevsurena
Copy link

purevsurena commented Sep 29, 2023

Before implementing the provided logic with the dummy jsonStringObject, when I click the handleOpenWalletPass button, I encounter an error message: "Something went wrong. Please try again." What prerequisites are crucial for this logic, and could you please provide detailed instructions?

const handleOpenWalletPass = async () => {
    const jsonStringObject = {
      id: 1,
      classId: 12,
      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: '[TEST ONLY] Google I/O',
        },
      },
      subheader: {
        defaultValue: {
          language: 'en-US',
          value: 'Attendee',
        },
      },
      header: {
        defaultValue: {
          language: 'en-US',
          value: 'Alex McJacobs',
        },
      },
      barcode: {
        type: 'QR_CODE',
        value: 'BARCODE_VALUE',
        alternateText: '',
      },
      hexBackgroundColor: '#f44343',
      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',
          },
        },
      },
    };

    if (await isSupported()) {
      const jsonString = JSON.stringify(jsonStringObject);
      addWalletPass(jsonString);
    }
  };
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