mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
try to fix payrexx integration (unsuccessful)
This commit is contained in:
@@ -36,7 +36,6 @@ exports.init = function () {
|
|||||||
getGateway: function ( id ) {
|
getGateway: function ( id ) {
|
||||||
const baseUrl = buildBaseUrl( 'Gateway/' + id + '/' );
|
const baseUrl = buildBaseUrl( 'Gateway/' + id + '/' );
|
||||||
const url = baseUrl + '&ApiSignature=' + buildSignature();
|
const url = baseUrl + '&ApiSignature=' + buildSignature();
|
||||||
console.error( url );
|
|
||||||
return axios.get( url );
|
return axios.get( url );
|
||||||
},
|
},
|
||||||
createGateway: function ( params ) {
|
createGateway: function ( params ) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const payrexxModule = require( './module.payrexx.js' );
|
|||||||
const payrexx = payrexxModule.init();
|
const payrexx = payrexxModule.init();
|
||||||
const TicketGenerator = new ticket();
|
const TicketGenerator = new ticket();
|
||||||
|
|
||||||
|
payrexx.getGateway( 1 );
|
||||||
|
|
||||||
let sessionReference = {};
|
let sessionReference = {};
|
||||||
let waitingClients = {};
|
let waitingClients = {};
|
||||||
@@ -135,6 +136,7 @@ module.exports = ( app, settings ) => {
|
|||||||
|
|
||||||
app.post( '/payments/webhook', bodyParser.json(), async ( req, res ) => {
|
app.post( '/payments/webhook', bodyParser.json(), async ( req, res ) => {
|
||||||
if ( req.body.transaction.status === 'confirmed' ) {
|
if ( req.body.transaction.status === 'confirmed' ) {
|
||||||
|
console.error( gatewayReference[ req.body.transaction.referenceId ] );
|
||||||
const response = await payrexx.getGateway( gatewayReference[ req.body.transaction.referenceId ] );
|
const response = await payrexx.getGateway( gatewayReference[ req.body.transaction.referenceId ] );
|
||||||
|
|
||||||
if ( response.status === 200 ) {
|
if ( response.status === 200 ) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"twoFA":"enforce",
|
"twoFA":"enforce",
|
||||||
"twoFAMode":"enhanced",
|
"twoFAMode":"enhanced",
|
||||||
"db":"json",
|
"db":"json",
|
||||||
"payments":"stripe",
|
"payments":"payrexx",
|
||||||
"name":"libreevent",
|
"name":"libreevent",
|
||||||
"yourDomain":"http://localhost:8080",
|
"yourDomain":"http://localhost:8080",
|
||||||
"mailSender":"libreevent <no-reply@libreevent.janishutz.com>",
|
"mailSender":"libreevent <no-reply@libreevent.janishutz.com>",
|
||||||
|
|||||||
Reference in New Issue
Block a user