Hello, I am having trouble adding a Loyalty Card to my wallet via C# - here 
are the steps I took so far:

1. Added a LoyaltyClass from code using quick start project
2. Added a LoyaltyObject from code using quick start project
3. Constructed the S2AP button using the jwt generated from the quick start 
project
4. Used this link in a browser to try and link this LoyaltyObject to my 
google account:

https://www.android.com/payapp/savetoandroidpay/eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiAiaWQtYWNjb3VudEBjYXJkLXRvLXdhbGxldC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsCSJhdWQiOiAiZ29vZ2xlIiwiaWF0IjogMTIzNDU2Nzg5MCwidHlwIjogInNhdmV0b3dhbGxldCIsInBheWxvYWQiOiB7ImxveWFsdHlPYmplY3RzIjogW3siY2xhc3NJZCI6ICIxMjM0NTY3ODkwMTIzNDU2Nzg5Ll9MMTIzIiwiaWQiOiAiMTIzNDU2Nzg5MDEyMzQ1Njc4OS5Mb3lhbHR5T2JqZWN0In1dLCJvZmZlck9iamVjdHMiOiBbXX0sIm9yaWdpbnMiOiBbImh0dHA6Ly9pbmZvLmNvbS8iXX0.gpGDqpMHuTXZ0-_xxlh2FK8QTFUfIDLG4XaMkJ6Zt2dHuk0Y7ojkddkVGCLOxq_euoKryMPC_cIi-Sz8eNOhL2SVqnRlLisUgQb9npYRY_bXUmZF1zlHf39dDHhKM79IX8l0nByElAMaW3eVYwssFqVqUitevSUz_mEaYPFu5zuouTCvU7Fu4dzaxcfPLxvmoV9vADyZH8Wz-WsmILJC3uH2SjHkulERIOdgHKeZmTYhIN1rBDnFr3ibkVlaxnNh-TrKkqYcHcyO1vizTxfdRRlRaSgBXOTJkBoOHVfriC6C5QbUkQI4i2d9mt5-kZP3fMt_A-nXHPFB6QnB1cx4YQ

Here's the LoyaltyObject's JSON payload:

{{
 "iss": "id-account...@card-to-wallet.iam.gserviceaccount.com",
 "aud": "google",
 "iat": 1234567890,
 "typ": "savetowallet",
 "payload": {
  "loyaltyObjects": [{
   "classId": "1234567890123456789._L123",
   "id": "1234567890123456789.LoyaltyObject"
  }],
  "offerObjects": []
 },
 "origins": ["http://info.com/";]
}}

When I tried #4, the browser rendered the card on screen with a "Save" 
button but on clicking it, I got an error : "This item could not be saved.  
Please try again."

I looked at the console pressing F12 and saw this error:

Failed to load resource: the server responded with a status of 400 ()  
/cm/a/valuables/jwt/save?authuser=0 

I know that 400 is the code for bad request - not sure what is wrong with 
the above - any help will be much appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1772b4b5-b48a-40ca-b799-6403d11c1367%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to