且构网

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

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

更新时间:2023-11-04 16:58:22

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.

这种检查ATS传递nginx服务器的方法

This method to check ATS pass on nginx server

nscurl --ats-诊断<您的状态接收网址>

查看有关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.

我的订阅状态网址设置简单,例如创建简单的http服务on nodejs(express framwork)

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!.