mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
try to fix payrexx integration (unsuccessful)
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user