Google Wallet integration on a multi user system

130 Views Asked by At

I have a small issue right now where I am trying to integrate Google wallet with my project which has many users which will all have access to using this gateway and accepting payments.

The only issue I cannot seem to over come or figure out how to get around is how am I supposed to know which sellers secret key to use for the encoded JWT I receive from the postback?

Since I cannot access the the data inside the JWT obviously without decoding it first?

Thanks to anyone who can help me brainstorm about trying to work around this.

------UPDATE------ By the looks of what I have here, could I use the success or failure call back handlers to associate my users with the encoded JWT and then then compare the JWT to a database and call the corosponding users data to decode the JWT?

1

There are 1 best solutions below

4
EdSF On

You can use either

  • aud
  • sellerData

from Google's postback and obtain the Seller Id...

So something like:

  1. Base64url decode JWT to get the Seller Id from either aud or sellerData
  2. do your lookup for stored seller secret
  3. verify the JWT

Hth....