try to fix payrexx integration (unsuccessful)

This commit is contained in:
2023-09-11 19:50:56 +02:00
parent 24e54f7e5c
commit d7eed47d2c
3 changed files with 3 additions and 2 deletions

View File

@@ -36,7 +36,6 @@ exports.init = function () {
getGateway: function ( id ) {
const baseUrl = buildBaseUrl( 'Gateway/' + id + '/' );
const url = baseUrl + '&ApiSignature=' + buildSignature();
console.error( url );
return axios.get( url );
},
createGateway: function ( params ) {

View File

@@ -14,6 +14,7 @@ const payrexxModule = require( './module.payrexx.js' );
const payrexx = payrexxModule.init();
const TicketGenerator = new ticket();
payrexx.getGateway( 1 );
let sessionReference = {};
let waitingClients = {};
@@ -135,6 +136,7 @@ module.exports = ( app, settings ) => {
app.post( '/payments/webhook', bodyParser.json(), async ( req, res ) => {
if ( req.body.transaction.status === 'confirmed' ) {
console.error( gatewayReference[ req.body.transaction.referenceId ] );
const response = await payrexx.getGateway( gatewayReference[ req.body.transaction.referenceId ] );
if ( response.status === 200 ) {