【问题标题】:get Blank Response Subscription Status URL IAP from Apple server, Status Update Notifications, statusUpdateNotification从 Apple 服务器获取空白响应订阅状态 URL IAP、状态更新通知、状态更新通知
【发布时间】:2018-02-23 09:40:04
【问题描述】:

状态更新通知,statusUpdateNotification

我在 iTunes 帐户中的 APP 中设置订阅状态 URL,例如 https://www.xxxxxx.xx/iospushnotification.php

我也成功测试了nscurl --ats-diagnostics https://www.xxxxxx.xx/iospushnotification.php

我还在 iospushnotification.php 文件中实现了 php 代码来获取 JSON 响应

我成功购买了自动续订订阅沙盒,但我没有收到任何状态更新通知我从苹果服务器到我的服务器收到空白 [] JSON 响应。

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW6

【问题讨论】:

  • 2 年后,我也遇到了这个问题。我想你没有找到解决办法?
  • 嗨@Ankur 你得到解决方案了吗?
  • @Niraj 实际上 PHP 开发人员只得到了最新数据的响应
  • $data = array( 'password' => $password, // IAP 服务器上的密钥 'receipt-data' => $receipt_data, // 'latest_receipt', base64 string 'exclude-old -交易' => 真); $post = json_encode($data); $ch = curl_init() ; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,1); curl_setopt($ch,CURLOPT_POSTFIELDS,$post); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE) ;
  • 好的,感谢重播,我会尝试使用新的苹果帐户,然后它会工作吗?

标签: ios in-app-purchase


【解决方案1】:

如果有人在 2 年后仍然关心,我找到了一个解决方案,假设您使用的是 PHP。

从 stackoverflow 帖子 Receive JSON POST with PHP 我们需要做这样的事情:

$appleData = file_get_contents('php://input');

然后从那里tryjson_decode($appleData)

(我以前从未做过如此奇怪的事情来获取 POST 数据,但我以前主要使用框架;不幸的是,我目前没有那种奢侈......)

【讨论】:

    猜你喜欢
    • 2018-12-20
    • 2021-04-23
    • 2018-02-26
    • 1970-01-01
    • 2021-08-07
    • 1970-01-01
    • 2012-01-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多