Erreur de connexion de bande

J’ai le code suivant Node.js backend pour me connecter à mon compte Ssortingpe afin de facturer des frais. Mais je reçois cette erreur. J’utilise des fonctions Firebase, et cette fonctionnalité fonctionnait auparavant, donc je doute que cela soit lié aux ressortingctions d’access de Firebase. Toute idée ou aide à ce sujet sera grandement appréciée!

var functions = require('firebase-functions'); var ssortingpe = require('ssortingpe')('sk_test'); var express = require('express'); var bodyParser = require('body-parser'); var cors = require('cors'); exports.ssortingpePay = functions.https.onRequest((request, response) => { if (request.method === 'POST') { var app = express(); var router = express.Router(); app.use(bodyParser.urlencoded({ extended: false })); app.use(cors()); var ssortingpetoken = request.body.cardToken; var amountpayable = request.body.amount; var charge = ssortingpe.charges.create({ amount: amountpayable, currency: 'usd', source: ssortingpetoken, description: 'Sample transaction' }, function (err, charge) { console.log("ST4"); if (err) { response.send("Failed!"); } else { response.send({ success: true }); } }) } { Error: An error occurred with our connection to Ssortingpe at Error._Error (/user_code/node_modules/ssortingpe/lib/Error.js:12:17) at Error.Constructor (/user_code/node_modules/ssortingpe/lib/utils.js:98:13) at Error.Constructor (/user_code/node_modules/ssortingpe/lib/utils.js:98:13) at ClientRequest. (/user_code/node_modules/ssortingpe/lib/SsortingpeResource.js:192:9) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at TLSSocket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at TLSSocket.emit (events.js:188:7) at connectErrorNT (net.js:1020:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickDomainCallback (internal/process/next_tick.js:122:9) type: 'SsortingpeConnectionError', stack: 'Error: An error occurred with our connection to Ssortingpe\n at Error._Error (/user_code/node_modules/ssortingpe/lib/Error.js:12:17)\n at Error.Constructor (/user_code/node_modules/ssortingpe/lib/utils.js:98:13)\n at Error.Constructor (/user_code/node_modules/ssortingpe/lib/utils.js:98:13)\n at ClientRequest. (/user_code/node_modules/ssortingpe/lib/SsortingpeResource.js:192:9)\n at emitOne (events.js:96:13)\n at ClientRequest.emit (events.js:188:7)\n at TLSSocket.socketErrorListener (_http_client.js:310:9)\n at emitOne (events.js:96:13)\n at TLSSocket.emit (events.js:188:7)\n at connectErrorNT (net.js:1020:8)\n at _combinedTickCallback (internal/process/next_tick.js:74:11)\n at process._tickDomainCallback (internal/process/next_tick.js:122:9)', rawType: undefined, code: undefined, param: undefined, message: 'An error occurred with our connection to Ssortingpe', detail: { Error: getaddrinfo ENOTFOUND api.ssortingpe.com api.ssortingpe.com:443 at errnoException (dns.js:28:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26) code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'api.ssortingpe.com', host: 'api.ssortingpe.com', port: '443' }, raw: { message: 'An error occurred with our connection to Ssortingpe', detail: { Error: getaddrinfo ENOTFOUND api.ssortingpe.com api.ssortingpe.com:443 at errnoException (dns.js:28:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26) code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'api.ssortingpe.com', host: 'api.ssortingpe.com', port: '443' } }, requestId: undefined, statusCode: undefined } Reply 

c’est une bonne! Firebase bloque les connexions externes à l’API pour les comptes gratuits. Obtenez simplement un compte payant et cela fonctionnera!