mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 21:34:24 +00:00
add payrexx as payment provider
This commit is contained in:
@@ -10,21 +10,19 @@
|
||||
const fs = require( 'fs' );
|
||||
const path = require( 'path' );
|
||||
const db = require( '../../../db/db.js' );
|
||||
const stripConfig = JSON.parse( fs.readFileSync( path.join( __dirname + '/../../../../config/payments.config.secret.json' ) ) )[ 'stripe' ];
|
||||
const stripe = require( 'stripe' )( stripConfig[ 'APIKey' ] );
|
||||
const stripeConfig = JSON.parse( fs.readFileSync( path.join( __dirname + '/../../../../config/payments.config.secret.json' ) ) )[ 'stripe' ];
|
||||
const stripe = require( 'stripe' )( stripeConfig[ 'APIKey' ] );
|
||||
const bodyParser = require( 'body-parser' );
|
||||
const ticket = require( '../../../tickets/ticketGenerator.js' );
|
||||
const TicketGenerator = new ticket();
|
||||
|
||||
const endpointSecret = stripConfig[ 'endpointSecret' ];
|
||||
const endpointSecret = stripeConfig[ 'endpointSecret' ];
|
||||
|
||||
let sessionReference = {};
|
||||
let waitingClients = {};
|
||||
let pendingPayments = {};
|
||||
let paymentOk = {};
|
||||
|
||||
// TODO: Remove all selected tickets if timestamp more than user defined amount ago
|
||||
|
||||
module.exports = ( app, settings ) => {
|
||||
app.post( '/payments/prepare', bodyParser.json(), ( req, res ) => {
|
||||
if ( req.session.loggedInUser ) {
|
||||
|
||||
Reference in New Issue
Block a user