master
Mark Moffat 2019-10-25 19:38:47 +10:30
parent 807ab4d32c
commit 22626c0873
1 changed files with 4 additions and 5 deletions

9
app.js
View File

@ -31,9 +31,8 @@ if(baseConfig === false){
}
// Validate the payment gateway config
switch(config.paymentGateway)
{
case 'paypal':
switch(config.paymentGateway){
case'paypal':
const paypalConfig = ajv.validate(require('./config/paypalSchema'), require('./config/paypal.json'));
if(paypalConfig === false){
console.log(colors.red(`PayPal config is incorrect: ${ajv.errorsText()}`));
@ -41,7 +40,7 @@ switch(config.paymentGateway)
}
break;
case 'stripe':
case'stripe':
const stripeConfig = ajv.validate(require('./config/stripeSchema'), require('./config/stripe.json'));
if(stripeConfig === false){
console.log(colors.red(`Stripe config is incorrect: ${ajv.errorsText()}`));
@ -49,7 +48,7 @@ switch(config.paymentGateway)
}
break;
case 'authorizenet':
case'authorizenet':
const authorizenetConfig = ajv.validate(require('./config/authorizenetSchema'), require('./config/authorizenet.json'));
if(authorizenetConfig === false){
console.log(colors.red(`Authorizenet config is incorrect: ${ajv.errorsText()}`));