mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
fix(amazon): add new env variable to specify environment
This commit is contained in:
@@ -22,10 +22,10 @@ import { model as Coupon } from '../../models/coupon';
|
||||
// TODO better handling of errors
|
||||
|
||||
const i18n = common.i18n;
|
||||
const IS_PROD = nconf.get('NODE_ENV') === 'production';
|
||||
const IS_SANDBOX = nconf.get('AMAZON_PAYMENTS:MODE') === 'sandbox';
|
||||
|
||||
let amzPayment = amazonPayments.connect({
|
||||
environment: amazonPayments.Environment[IS_PROD ? 'Production' : 'Sandbox'],
|
||||
environment: amazonPayments.Environment[IS_SANDBOX ? 'Sandbox' : 'Production'],
|
||||
sellerId: nconf.get('AMAZON_PAYMENTS:SELLER_ID'),
|
||||
mwsAccessKey: nconf.get('AMAZON_PAYMENTS:MWS_KEY'),
|
||||
mwsSecretKey: nconf.get('AMAZON_PAYMENTS:MWS_SECRET'),
|
||||
|
||||
Reference in New Issue
Block a user