-
Notifications
You must be signed in to change notification settings - Fork 125
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
Hard error if objects contain classid #72
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
@Defman Can you please help to generate google generic pass using C# please? I've searched lots and didn't find any fruitful result |
@singhdilip1007 what's the issue? I don't know much about C#. Google passes are basically JWT tokens. You can either deliver the pass as a url with the pass fully encoded as JWT or as a JWT containing a reference to a pre-created/-uploaded object or the JWT token can contain the object(large token). https://developers.google.com/wallet/tickets/boarding-passes/web |
@Defman Thank you so much for your reply here. I've gone through this link https://developers.google.com/wallet/generic/resources/pass-builder Saw the sample Thanks in advance |
Dilip,
Here is the link I used. https://github.com/google-pay/wallet-samples/tree/main/dotnet
From: Singh Dilip ***@***.***>
Sent: Monday, August 7, 2023 9:58 AM
To: google-pay/wallet-samples ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [google-pay/wallet-samples] Hard error if objects contain classid (PR #72)
<https://github.com/Defman>
Caution: This email originated outside of the organization. Do not open any attachments or click on links unless you recognize the sender and know the content is safe.<https://github.com/Defman>
<https://github.com/Defman>
<https://github.com/Defman>
…________________________________
@Defman<https://github.com/Defman> Thank you so much for your reply here.
I've gone through this link https://developers.google.com/wallet/generic/resources/pass-builder<https://developers.google.com/wallet/generic/resources/pass-builder>
Saw the sample Class definition & Object definition and able to generate JWT token. but not able to get how to use this JWT tokens to generate passes. If you can help me on it so, I can generate JWT token using C# and can use that token with URL to generate passes. Please help me on it.
Thanks in advance
—
Reply to this email directly, view it on GitHub<#72 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AY6KNXSHIDP3ELULZ762R4TXUDX77ANCNFSM6AAAAAAXTJPVGI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
Important Notice:
This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to which they are addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, please contact the sender and delete the material from your computer. Please note that any view or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Confie Administrative Services, Inc. and/or its affiliates ("Confie"). Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Confie accepts no liability for any damage caused by any virus transmitted by this e-mail.
|
Thanks for this. I've cloned the application and opened with VS2022 and seems lots of compile time error its looking very hard to me to see much kind of issue, Also, I need to generate pas ASAP because this is very important for me @Defman |
***@***.***
You need these nuget installed
From: Singh Dilip ***@***.***>
Sent: Monday, August 7, 2023 10:16 AM
To: google-pay/wallet-samples ***@***.***>
Cc: Anita Kamat ***@***.***>; Comment ***@***.***>
Subject: Re: [google-pay/wallet-samples] Hard error if objects contain classid (PR #72)
Caution: This email originated outside of the organization. Do not open any attachments or click on links unless you recognize the sender and know the content is safe.
…________________________________
Dilip, Here is the link I used. https://github.com/google-pay/wallet-samples/tree/main/dotnet<https://github.com/google-pay/wallet-samples/tree/main/dotnet> From: Singh Dilip @.> Sent: Monday, August 7, 2023 9:58 AM To: google-pay/wallet-samples @.> Cc: Subscribed @.> Subject: Re: [google-pay/wallet-samples] Hard error if objects contain classid (PR #72<#72>) https://github.com/Defman<https://github.com/Defman> Caution: This email originated outside of the organization. Do not open any attachments or click on links unless you recognize the sender and know the content is safe.https://github.com/Defman<https://github.com/Defman> https://github.com/Defman<https://github.com/Defman> https://github.com/Defman<https://github.com/Defman>
…
________________________________ @Defman<https://github.com/Defman>https://github.com/Defman<https://github.com/Defman> Thank you so much for your reply here. I've gone through this link https://developers.google.com/wallet/generic/resources/pass-builder<https://developers.google.com/wallet/generic/resources/pass-builder>https://developers.google.com/wallet/generic/resources/pass-builder<https://developers.google.com/wallet/generic/resources/pass-builder> Saw the sample Class definition & Object definition and able to generate JWT token. but not able to get how to use this JWT tokens to generate passes. If you can help me on it so, I can generate JWT token using C# and can use that token with URL to generate passes. Please help me on it. Thanks in advance — Reply to this email directly, view it on GitHub<#72 (comment)<#72 (comment)>>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY6KNXSHIDP3ELULZ762R4TXUDX77ANCNFSM6AAAAAAXTJPVGI<https://github.com/notifications/unsubscribe-auth/AY6KNXSHIDP3ELULZ762R4TXUDX77ANCNFSM6AAAAAAXTJPVGI>. You are receiving this because you are subscribed to this thread.Message ID: @.@.***>> Important Notice: This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to which they are addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, please contact the sender and delete the material from your computer. Please note that any view or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Confie Administrative Services, Inc. and/or its affiliates ("Confie"). Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Confie accepts no liability for any damage caused by any virus transmitted by this e-mail.
Thanks for this. I've cloned the application and opened with VS2022 and seems lots of compile time error
[image]<https://user-images.githubusercontent.com/18436894/258827536-9dd484f2-c919-4084-83b0-32c835b7d14a.png>
its looking very hard to me to see much kind of issue, Also, I need to generate pas ASAP because this is very important for me @Defman<https://github.com/Defman>
—
Reply to this email directly, view it on GitHub<#72 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AY6KNXUV36SXEZQMTW4VTELXUD2CNANCNFSM6AAAAAAXTJPVGI>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
Important Notice:
This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to which they are addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, please contact the sender and delete the material from your computer. Please note that any view or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Confie Administrative Services, Inc. and/or its affiliates ("Confie"). Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Confie accepts no liability for any damage caused by any virus transmitted by this e-mail.
|
This too
***@***.***
From: Singh Dilip ***@***.***>
Sent: Monday, August 7, 2023 10:16 AM
To: google-pay/wallet-samples ***@***.***>
Cc: Anita Kamat ***@***.***>; Comment ***@***.***>
Subject: Re: [google-pay/wallet-samples] Hard error if objects contain classid (PR #72)
Caution: This email originated outside of the organization. Do not open any attachments or click on links unless you recognize the sender and know the content is safe.
…________________________________
Dilip, Here is the link I used. https://github.com/google-pay/wallet-samples/tree/main/dotnet<https://github.com/google-pay/wallet-samples/tree/main/dotnet> From: Singh Dilip @.> Sent: Monday, August 7, 2023 9:58 AM To: google-pay/wallet-samples @.> Cc: Subscribed @.> Subject: Re: [google-pay/wallet-samples] Hard error if objects contain classid (PR #72<#72>) https://github.com/Defman<https://github.com/Defman> Caution: This email originated outside of the organization. Do not open any attachments or click on links unless you recognize the sender and know the content is safe.https://github.com/Defman<https://github.com/Defman> https://github.com/Defman<https://github.com/Defman> https://github.com/Defman<https://github.com/Defman>
…
________________________________ @Defman<https://github.com/Defman>https://github.com/Defman<https://github.com/Defman> Thank you so much for your reply here. I've gone through this link https://developers.google.com/wallet/generic/resources/pass-builder<https://developers.google.com/wallet/generic/resources/pass-builder>https://developers.google.com/wallet/generic/resources/pass-builder<https://developers.google.com/wallet/generic/resources/pass-builder> Saw the sample Class definition & Object definition and able to generate JWT token. but not able to get how to use this JWT tokens to generate passes. If you can help me on it so, I can generate JWT token using C# and can use that token with URL to generate passes. Please help me on it. Thanks in advance — Reply to this email directly, view it on GitHub<#72 (comment)<#72 (comment)>>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY6KNXSHIDP3ELULZ762R4TXUDX77ANCNFSM6AAAAAAXTJPVGI<https://github.com/notifications/unsubscribe-auth/AY6KNXSHIDP3ELULZ762R4TXUDX77ANCNFSM6AAAAAAXTJPVGI>. You are receiving this because you are subscribed to this thread.Message ID: @.@.***>> Important Notice: This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to which they are addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, please contact the sender and delete the material from your computer. Please note that any view or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Confie Administrative Services, Inc. and/or its affiliates ("Confie"). Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Confie accepts no liability for any damage caused by any virus transmitted by this e-mail.
Thanks for this. I've cloned the application and opened with VS2022 and seems lots of compile time error
[image]<https://user-images.githubusercontent.com/18436894/258827536-9dd484f2-c919-4084-83b0-32c835b7d14a.png>
its looking very hard to me to see much kind of issue, Also, I need to generate pas ASAP because this is very important for me @Defman<https://github.com/Defman>
—
Reply to this email directly, view it on GitHub<#72 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AY6KNXUV36SXEZQMTW4VTELXUD2CNANCNFSM6AAAAAAXTJPVGI>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
Important Notice:
This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to which they are addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, please contact the sender and delete the material from your computer. Please note that any view or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Confie Administrative Services, Inc. and/or its affiliates ("Confie"). Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Confie accepts no liability for any damage caused by any virus transmitted by this e-mail.
|
@Defman I'm sorry to not mention with above. I've installed below dependencies but not able to fix above errors: |
@singhdilip1007
|
Google.Apis.Walletobjects.v1.txt |
Here's some old python code of mine.
Sorry can't help you on the C# issue. But you will need a .json key file to authenticate with google. Passes are quite simple, try reading some C# JWT reference material? Note. I don't work for or with google, neither do I have any relation to them. |
@Defman |
create a folder called "lib" and added the class I had send above |
@Defman Your kind support will make me much more valuable on it. PLease help me to fix the same |
@Defman thanks, while I've followed the same but will try to do the same again and will update you. It will be great if you can provide me a demo application from your end, I'll edit my own issuerid for test |
@Defman @anita-kamat @stephenmcd below steps I've followed so far:
and then followed below steps: 2. Copy the path to the Google Wallet API Client library ( Google.Apis.Walletobjects.v1.csproj file) you downloaded. If needed, update the path in wallet-rest-samples.csproj (line 19).
3. Build the project to install the dependencies. below is my project structure during build below error is showing: Please guide me for next. I've to create google generic pass ba an URL or an API call |
Can you please confirm your project is set for Class Library?
…--> Right click on the project
--> and select "Properties"
--> then set "Output Type" to "Class Library".
From: Singh Dilip ***@***.***>
Sent: Tuesday, August 8, 2023 11:10 AM
To: google-pay/wallet-samples ***@***.***>
Cc: Anita Kamat ***@***.***>; Mention ***@***.***>
Subject: Re: [google-pay/wallet-samples] Hard error if objects contain classid (PR #72)
<https://github.com/Defman>
Caution: This email originated outside of the organization. Do not open any attachments or click on links unless you recognize the sender and know the content is safe.<https://github.com/Defman>
<https://github.com/Defman>
<https://github.com/Defman>
________________________________
@Defman<https://github.com/Defman> @anita-kamat<https://github.com/anita-kamat> @stephenmcd<https://github.com/stephenmcd>
below steps I've followed so far:
1. downloaded application from https://github.com/google-pay/wallet-samples<https://github.com/google-pay/wallet-samples>
2. downloaded class library from https://developers.google.com/wallet/generic/resources/libraries#c<https://developers.google.com/wallet/generic/resources/libraries#c>
and then followed below steps:
1. Open the wallet-rest-samples.csproj<https://github.com/google-pay/wallet-samples/blob/main/dotnet/wallet-rest-samples.csproj> file in your .NET editor of choice.
2. Copy the path to the Google Wallet API Client library ( Google.Apis.Walletobjects.v1.csproj file) you downloaded. If needed, update the path in wallet-rest-samples.csproj<https://github.com/google-pay/wallet-samples/blob/main/dotnet/wallet-rest-samples.csproj> (line 19).
(Its added)
3. Build the project to install the dependencies.
below is my project structure
[image]<https://user-images.githubusercontent.com/18436894/259143898-196b3804-e3f9-4b33-a789-a0d51bae31a3.png>
during build below error is showing:
[image]<https://user-images.githubusercontent.com/18436894/259144525-95b88a5a-468b-4cf2-8a98-86edc37e06e6.png>
Please guide me for next. I've to create google generic pass ba an URL or an API call
—
Reply to this email directly, view it on GitHub<#72 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AY6KNXTEGMHVDTTOX7BGGFTXUJJFZANCNFSM6AAAAAAXTJPVGI>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
Important Notice:
This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to which they are addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, please contact the sender and delete the material from your computer. Please note that any view or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Confie Administrative Services, Inc. and/or its affiliates ("Confie"). Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Confie accepts no liability for any damage caused by any virus transmitted by this e-mail.
|
@anita-kamat yes, can see in |
Here's some progress done by me while trying to generate google generic pass. This is what I got the link and how its looking: But I want to add more fields like below and I've used below code : GenericObject newObject = new GenericObject
{
Id = $"{issuerId}.{objectSuffix}",
ClassId = $"{issuerId}.{classSuffix}",
State = "ACTIVE",
HeroImage = new Image
{
SourceUri = new ImageUri
{
Uri = "https://storage.googleapis.com/wallet-lab-tools-codelab-artifacts-public/pass_google_logo.jpg"// "https://farm4.staticflickr.com/3723/11177041115_6e6a3b6f49_o.jpg"
},
ContentDescription = new LocalizedString
{
DefaultValue = new TranslatedString
{
Language = "en-US",
Value = "Hero image description"
}
}
},
LinksModuleData = new LinksModuleData
{
Uris = new List<Google.Apis.Walletobjects.v1.Data.Uri>
{
new Google.Apis.Walletobjects.v1.Data.Uri
{
UriValue = "http://maps.google.com/",
Description = "Link module URI description",
Id = "LINK_MODULE_URI_ID"
},
new Google.Apis.Walletobjects.v1.Data.Uri
{
UriValue = "tel:6505555555",
Description = "Link module tel description",
Id = "LINK_MODULE_TEL_ID"
}
}
},
ImageModulesData = new List<ImageModuleData>
{
new ImageModuleData
{
MainImage = new Image
{
SourceUri = new ImageUri
{
Uri = "http://farm4.staticflickr.com/3738/12440799783_3dc3c20606_b.jpg"
},
ContentDescription = new LocalizedString
{
DefaultValue = new TranslatedString
{
Language = "en-US",
Value = "Image module description"
}
}
},
Id = "IMAGE_MODULE_ID"
}
},
Barcode = new Barcode
{
Type = "QR_CODE",
Value = "QR code"
},
CardTitle = new LocalizedString
{
DefaultValue = new TranslatedString
{
Language = "en-US",
Value = "Glic Health Google Pass"
}
},
Header = new LocalizedString
{
DefaultValue = new TranslatedString
{
Language = "en-US",
Value = "Generic header"
}
},
TextModulesData = new List<TextModuleData>
{
new TextModuleData
{
Header = "L_lbl1",
Body = "1112",
Id = "l_lbl1"
},
new TextModuleData
{
Header = "M_lbl1",
Body = "middle",
Id = "M_lbl1"
},
new TextModuleData
{
Header = "R_lbl1",
Body = "Right",
Id = "R_lbl1"
}
},
HexBackgroundColor = "#4285f4",
Logo = new Image
{
SourceUri = new ImageUri
{
Uri = "https://storage.googleapis.com/wallet-lab-tools-codelab-artifacts-public/pass_google_logo.jpg"
},
ContentDescription = new LocalizedString
{
DefaultValue = new TranslatedString
{
Language = "en-US",
Value = "Generic card logo"
}
},
}
}; |
@anita-kamat @Defman |
@Defman @anita-kamat |
The sample on creating generic pass and then generating a JWT token for an existing object is inaccurate. The objects should not contain
classId
I have updated all the samples, however I have only tested the python generic sample.