我已在我的应用程序中实现了Android In App Billing V3。我可以从Google Play商店购买并获得成功完整回复。下面是示例回复
Purchase data: {"orderId":"125454212.45454544794","packageName":"com.myapp.book.android","productId":"com.bookreader.sonic.the.hedgehog.five.02232010","purchaseTime":1404914019181,"purchaseState":0,"developerPayload":"com.archiereader.sonic.the.hello.five.2454542121010paid","purchaseToken":"sdsdsdsaskmg.AO-J1OzmoW2l-6GMP31IOyPtjY65cHMinYNWEeeyYIhr88g1Z7ftw7KElUTsi-ALaIyCKPWZr3cn9J3l9ypXPrzQB3SK94YTlI-AdbGU8guqBlAp_huwiJr36GIMQdX-ygwJyQWxOO0ThJvzsSziKnV_ZttyV8Ey-8DR2xaY85fjvnMRbBt05TaWVWCckdlCWPuSyCMgMbBX"}
Data signature: Bcklq9v2isbE92Zljlg2Tgapnfsadasd2xec3Z0qK6gk5D7Gu3T/xXCTs6KM8lKFiW1s5LGeQgIxJGxmodRSXGJJIlTknDcZDU2oQB+d5vM/wyn0PG0VWJa2AbjYMkIqF+G/OE3fsieYxkAM4CatnH7ijpnCsZmyB3YwMAlzbd/qGWxnOBCp7TMPssadsdCpbt3BUf6c56adwe545EXJUTOeMZEX0yeOqtmfQkgFFnUSeNtbbkeCClLBWXbuorrtS2J4cCqgbCrkfEeFyXwgGYJnVuE1oSZtaHLhejIrWnRJsdasdwddBS69Tjcu8IBgB7T1oDpHN6VZhChECno9sVhYaLqSn9fT+m9D3G5jaUMWBFA==
我将以下数据传递给我的服务器
payload.put("receiptSignature", signature);
payload.put("receiptData", Base64.encode(receipt.toString().getBytes()));
payload.put("apikey" marketkey);
我正在使用此方法在服务器端验证我的购买。
$result = openssl_verify($receipt, $signature, $key);
使用上面的代码我总是得到失败的结果。我在这做错了什么。任何人都可以帮我解决这个问题。任何帮助都会很高兴....
此致 内甚