发送哪些收据数据以供iOS应用商店验证

时间:2016-03-20 17:40:07

标签: cordova in-app-purchase itunes itunes-store

我正在关注此处的文档:https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html

它表示POST为base64编码的收据数据,但我不知道应该包含哪些收据数据。

我从另一篇文章中找到了示例代码:

$receipt = json_encode(array("receipt-data" => $_GET["receipt"]));
// NOTE: use "buy" vs "sandbox" in production.
$url = "https://sandbox.itunes.apple.com/verifyReceipt";
$response_json = call-your-http-post-here($url, $receipt);
$response = json_decode($response_json);

// Save the data here!

echo $response->status;

Verify receipt for in App purchase

我只需要知道$ _GET ['收据'] 中包含的内容。我正在使用phonegap,所以我的IAP响应是通过fovea插件。

我想它会是这样的:

[
'packageName'=> 'com.package.name',
'id'=>'123123123123',
]

0 个答案:

没有答案