This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sig = new KJUR.crypto.Signature({ alg: "SHA224withECDSA" }); | |
var ecdsa = new KJUR.crypto.ECDSA({ curve: "secp224r1" }); | |
ecdsa.setPrivateKeyHex(b64tohex(this.keys.client.priv)); | |
sig.init(ecdsa); | |
return sig.signHex(message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package yourgaeproject | |
// go-iap doesn't work for GAE since we need to use urlfetch | |
// | |
// Copy this source file to your GAE to your project. | |
// | |
// The API is mostly the same as go-iap. I prefixed some stuff since this file lives within my GAE project's package. | |
// client, err := PlaystoreNew(ctx, jsonKey) | |
// | |
// purchase, err := client.VerifyProduct("com.you.yourapp", productId, purchaseToken) |