且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法从 iTunes Connect 接收有关 IAP 状态更改事件的通知

更新时间:2023-11-04 15:52:10

您是否检查过与服务器的安全网络连接?我的意思是您必须检查服务器上的 ATS.我正在使用 nginx,例如代理服务器.首先,您必须使用ATS检查您的nginx系统对过去以连接苹果服务器.

Have you checked secure network connection with your server? I mean that you have to check ATS on your server. I'm using nginx such as proxy server. First of all, you have to check your nginx system pair past with ATS to connect with apple server.

此方法在nginx服务器上检查ATS通过

This method to check ATS pass on nginx server

nscurl --ats-diagnostics

查看有关 Apple 文档的更多信息 使用 nscurl 工具诊断 ATS 连接问题

See more on apple documentation Using the nscurl Tool to Diagnose ATS Connection Issues

如果您的服务器通过了.您已准备好接收来自 Apple 的回复.

If your server passed. You are ready to receive response from apple.

我的订阅状态 URL 设置简单,例如在 nodejs 上创建的简单 http 服务(快速框架)

My subscription status URL setup simple such as a simple http service created on nodejs ( express framwork )

const express = require('express')
const app = express()
const bodyParser = require('body-parser');
const path = require('path');

process.on('uncaughtException', function (err) {
    console.log(err.stack);
});

process.on('exit', function (code) {
    console.log('About to exit with code: ' + code);
});

// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))

// parse application/json
app.use(bodyParser.json())

app.post('/', function (req, res) {
    console.log(req.body); < response from apple is here >

    res.send({ ok: 1 });
})

const port = 12092;

app.listen(port, function () {
    console.log('Subscription status url ping on port ' + port);
});

顺便说一下,您应该更新您的问题.您可以参考有关您的问题的其他关系问题.这更有帮助!.

By the way, you should update your question. you can reference from a other relation question on your question. This's more helpful!.