mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 21:34:24 +00:00
payment gateway settings now fully working
This commit is contained in:
@@ -113,7 +113,7 @@ class POSTHandler {
|
|||||||
reject( { 'code': 500, 'error': error } );
|
reject( { 'code': 500, 'error': error } );
|
||||||
} );
|
} );
|
||||||
} else if ( call === 'createAdminAccount' ) {
|
} else if ( call === 'createAdminAccount' ) {
|
||||||
// TODO: Finish
|
db.writeDataSimple( 'admin', 'email', data.email )
|
||||||
} else if ( call === 'updateAdminAccount' ) {
|
} else if ( call === 'updateAdminAccount' ) {
|
||||||
// TODO: Finish
|
// TODO: Finish
|
||||||
} else if ( call === 'deleteAdminAccount' ) {
|
} else if ( call === 'deleteAdminAccount' ) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class PluginManager {
|
|||||||
|
|
||||||
loadPaymentGatewaySettings () {
|
loadPaymentGatewaySettings () {
|
||||||
return new Promise( ( resolve, reject ) => {
|
return new Promise( ( resolve, reject ) => {
|
||||||
|
this.paymentGateway = JSON.parse( fs.readFileSync( path.join( __dirname + '/../../config/settings.config.json' ) ) ).payments;
|
||||||
fs.readFile( path.join( __dirname + '/payments/' + this.paymentGateway + '/configOptions.json' ), ( err, optionsBuffer ) => {
|
fs.readFile( path.join( __dirname + '/payments/' + this.paymentGateway + '/configOptions.json' ), ( err, optionsBuffer ) => {
|
||||||
if ( err ) reject( err );
|
if ( err ) reject( err );
|
||||||
fs.readFile( path.join( __dirname + '/payments/' + this.paymentGateway + '/config.payments.json' ), ( err, configBuffer ) => {
|
fs.readFile( path.join( __dirname + '/payments/' + this.paymentGateway + '/config.payments.json' ), ( err, configBuffer ) => {
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
"currency":"CHF",
|
"currency":"CHF",
|
||||||
"gcInterval":300,
|
"gcInterval":300,
|
||||||
"ticketTimeout":900,
|
"ticketTimeout":900,
|
||||||
"startPage": "default"
|
"startPage":"default"
|
||||||
}
|
}
|
||||||
@@ -252,6 +252,27 @@
|
|||||||
'value': '',
|
'value': '',
|
||||||
'type': 'password',
|
'type': 'password',
|
||||||
},
|
},
|
||||||
|
'twoFA': {
|
||||||
|
'display': 'Two Factor Authentication',
|
||||||
|
'id': 'twoFA',
|
||||||
|
'tooltip':'With this setting you may change the 2FA Authentication should work for this user. Enhanced requires the user to enter a code, simple solely to click a link',
|
||||||
|
'value': 'enhanced',
|
||||||
|
'type': 'select',
|
||||||
|
'restrictions': {
|
||||||
|
'enhanced': {
|
||||||
|
'value': 'enhanced',
|
||||||
|
'displayName': 'Enhanced'
|
||||||
|
},
|
||||||
|
'eventManager': {
|
||||||
|
'value': 'simple',
|
||||||
|
'displayName': 'Simple'
|
||||||
|
},
|
||||||
|
'disabled': {
|
||||||
|
'value': 'disabled',
|
||||||
|
'displayName': 'Disabled'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
, 'settings' );
|
, 'settings' );
|
||||||
},
|
},
|
||||||
@@ -272,6 +293,7 @@
|
|||||||
console.log( this.currentPopup );
|
console.log( this.currentPopup );
|
||||||
if ( this.currentPopup === 'account' ) {
|
if ( this.currentPopup === 'account' ) {
|
||||||
console.log( 'settings processing' )
|
console.log( 'settings processing' )
|
||||||
|
// TODO: Call to server to create account, also add to admin accounts here
|
||||||
} else if ( this.currentPopup === 'payments' ) {
|
} else if ( this.currentPopup === 'payments' ) {
|
||||||
for ( let setting in data.data ) {
|
for ( let setting in data.data ) {
|
||||||
if ( !data.data[ setting ] ) {
|
if ( !data.data[ setting ] ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user