Question

I don't understand how they are generating the jwt in tutorial #1.

Is it a call to a JavaScript function?

Was it helpful?

Solution

The Tutorial says that it's generating the JWT server side and has a link to server libraries (in multiple languages) that can do the generation for you.

OTHER TIPS

Honestly, the library link didn't connect the dots completely for me either. Especially when you're going from Google Checkout, which takes 10 minutes to set up, to Google Wallet that requires JSon/JWT knowledge.

So, I went to the Samples link instead and found all references to "Cake" in the code, per their demo. Link to sample code.

------- Digital goods sample app (PHP) ---------

I am using PHP, so I downloaded iap-php source at the this link. And clicked the Download .zip link. It's not very obvious on the page and the window will show you a message that says, "No files in the selected directory. Select a subdirectory, if one exists, or another directory from the tree on the left." Don't worry; just find that little Download: .zip link in the Source tab.

When I opened the files, I saw seller-info.php to enter my specific issuerID (also called your merchant id) & secret. Replace that red text with your info.

generate-token.php is where you change the red text to information about YOUR product.

index.php is where you change the same product information that appears on the page that the user first sees. When you put this on another page, inside of your live website, be sure to include all of the scripts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top