从Apple服务器获取空白响应订阅状态URL IAP,状态更新通知,statusUpdateNotification [英] get Blank Response Subscription Status URL IAP from Apple server, Status Update Notifications, statusUpdateNotification
问题描述
状态更新通知,statusUpdateNotification
Status Update Notifications, statusUpdateNotification
我在iTunes帐户的APP中设置了订阅状态URL,如 https://www.xxxxxx.xx/iospushnotification.php
I set Subscription Status URL in my APP in iTunes account like https://www.xxxxxx.xx/iospushnotification.php
我也成功测试了 nscurl --ats-diagnostics https://www.xxxxxx.xx/iospushnotification.php
I also successfully tested nscurl --ats-diagnostics https://www.xxxxxx.xx/iospushnotification.php
我还在iospushnotification.php文件中实现了php代码以获取JSON响应
I also implemented php code in iospushnotification.php file to get JSON response
我成功购买自动续订订阅沙盒,但我没有得到任何状态更新通知我得到空白[]从苹果服务器到我的服务器的JSON响应。
I purchased successfully Auto renewal Subscriptions Sandbox but I did not get any Status Update Notifications I get blank [] JSON response from apple server to my server.
推荐答案
如果有人在关心2年后,我找到了一个解决方案,假设您使用的是PHP。
if anyone still cares 2 years later, I found a solution, assuming you're using PHP.
使用PHP接收JSON POST 我们需要做这样的事情:
from the stackoverflow post Receive JSON POST with PHP we need to do something like this:
$appleData = file_get_contents('php://input');
然后尝试
到 json_decode($ appleData)
从那里开始。
(我以前从未做过如此奇怪的事情来获取POST数据,但我以前大部分时间都使用过框架;不幸的是,我现在还没有这么奢侈......)
(I've never had to do something so weird to get POST data before, but I've mostly used frameworks before; unfortunately, I do not currently have that luxury...)
这篇关于从Apple服务器获取空白响应订阅状态URL IAP,状态更新通知,statusUpdateNotification的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!