AppStore服务器通知设置[接收App Store服务器通知版本2]
我正在尝试使用AppStore通知来设置服务器。 因此,当用户退还其应用内购买时,我可以收到通知。 https://developer.apple.com/documentation/appstoreservernotifications/receiving_app_store_server_notifications <- guide我现在正在寻找的行。
The version 2 response body, responseBodyV2, contains a signedPayload that’s cryptographically signed by the App Store in JSON Web Signature (JWS) format. The JWS format increases security and enables you to decode and validate the signature on your server. The notification data contains transaction and subscription renewal information that the App Store signs in JWS. The App Store Server API and the StoreKit In-App Purchase API use the same JWS-signed format for transaction and subscription status information. For more information about JWS, see the IETF RFC 7515 specification.
根据文章,似乎我必须在我与App Store Connect共享的URL中持有签名的Pay代码。 “ noreferrer”> https://github.github.com/atpons/atpons/atpons/52799af568cb768cb7d124cb7d124c.24c.1b7d4c.1b7d4c.1 af4c &lt ;-思考代码看起来像这样
所以我的问题是,
我需要制作一些新的私钥并与服务器开发人员共享吗? 看起来我们从这里存储了钥匙 https://wwwww.apple.com/certificateauthority/ 并在我们要求时使用它? 我如何收到通知? 我应该期待的 预期响应json结构 这种通知将出现在我与App Store Connect共享的URL上。 感谢您阅读我的问题!
I am trying to set up my server with appstore notification.
So that I can get notification when users refund their in-app-purchase.
https://developer.apple.com/documentation/appstoreservernotifications/receiving_app_store_server_notifications <- guide line that I am looking now.
The version 2 response body, responseBodyV2, contains a signedPayload that’s cryptographically signed by the App Store in JSON Web Signature (JWS) format. The JWS format increases security and enables you to decode and validate the signature on your server. The notification data contains transaction and subscription renewal information that the App Store signs in JWS. The App Store Server API and the StoreKit In-App Purchase API use the same JWS-signed format for transaction and subscription status information. For more information about JWS, see the IETF RFC 7515 specification.
according to article, seem like I have to hold a signedpayload code inside a url that I am shared with my App Store Connect.
https://gist.github.com/atpons/5279af568cb7d1b101247c02f0a022af
<- thinking code would be look like this
So my question is,
Do I need to make some new private key and share with server developers ?
look like we store the key from here https://www.apple.com/certificateauthority/
and use it whenever we request?
how do I get notification?
should I just expect that
expected response json structure
this kind of notification will come to url that I am shared with my App Store Connect.
Thank you for reading my question!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我按照步骤进行操作:
I'm follow by steps:
好了,我可能会花一天的时间在上面,但是我发现并在一堆Java和Ruby Code片段之间撰写了一个工作的Nodejs代码。希望别人可以从中受益。
Well now, I might spend a day on it but I figured out and composed a working NodeJS code finally between a bunch of Java and Ruby code snippets. Hope someone else can get benefit from it.
以下是解析App Store Server通知的步骤V2
和示例代码
有关更多详细信息
,请参阅 https://github.com/richzw/richzw/appstore
Here are the steps to parse App Store Server Notifications V2
And the sample codes with Golang
Usage Sample
For more details, please refer to https://github.com/richzw/appstore