Trouble receiving notifications from iTunes Connect about IAP status change events

自闭症网瘾萝莉.ら 提交于 2019-12-02 02:04:56

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.

This method to check ATS pass on nginx server

nscurl --ats-diagnostics <your status receive url>

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

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!