mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-20 12:48:52 +00:00
reorganize payments files (#10235)
This commit is contained in:
parent
fb4d3e44d3
commit
1c1b0f00ad
53 changed files with 121 additions and 121 deletions
|
|
@ -11,7 +11,7 @@ import {
|
|||
each,
|
||||
} from 'lodash';
|
||||
import { model as User } from '../../../../../website/server/models/user';
|
||||
import * as payments from '../../../../../website/server/libs/payments';
|
||||
import * as payments from '../../../../../website/server/libs/payments/payments';
|
||||
|
||||
describe('POST /groups/:groupId/leave', () => {
|
||||
let typesOfGroups = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
generateGroup,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import amzLib from '../../../../../../website/server/libs/amazonPayments';
|
||||
import amzLib from '../../../../../../website/server/libs/payments/amazon';
|
||||
|
||||
describe('payments : amazon #subscribeCancel', () => {
|
||||
let endpoint = '/amazon/subscribe/cancel?noRedirect=true';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
generateUser,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import amzLib from '../../../../../../website/server/libs/amazonPayments';
|
||||
import amzLib from '../../../../../../website/server/libs/payments/amazon';
|
||||
|
||||
describe('payments - amazon - #checkout', () => {
|
||||
let endpoint = '/amazon/checkout';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
generateGroup,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import amzLib from '../../../../../../website/server/libs/amazonPayments';
|
||||
import amzLib from '../../../../../../website/server/libs/payments/amazon';
|
||||
|
||||
describe('payments - amazon - #subscribe', () => {
|
||||
let endpoint = '/amazon/subscribe';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {generateUser} from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/applePayments';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #cancelSubscribe', () => {
|
||||
let endpoint = '/iap/ios/subscribe/cancel?noRedirect=true';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {generateUser} from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/applePayments';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #verify', () => {
|
||||
let endpoint = '/iap/ios/verify';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {generateUser, translate as t} from '../../../../../helpers/api-integration/v3';
|
||||
import applePayments from '../../../../../../website/server/libs/applePayments';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
|
||||
describe('payments : apple #subscribe', () => {
|
||||
let endpoint = '/iap/ios/subscribe';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {generateUser} from '../../../../../helpers/api-integration/v3';
|
||||
import googlePayments from '../../../../../../website/server/libs/googlePayments';
|
||||
import googlePayments from '../../../../../../website/server/libs/payments/google';
|
||||
|
||||
describe('payments : google #cancelSubscribe', () => {
|
||||
let endpoint = '/iap/android/subscribe/cancel?noRedirect=true';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {generateUser, translate as t} from '../../../../../helpers/api-integration/v3';
|
||||
import googlePayments from '../../../../../../website/server/libs/googlePayments';
|
||||
import googlePayments from '../../../../../../website/server/libs/payments/google';
|
||||
|
||||
describe('payments : google #subscribe', () => {
|
||||
let endpoint = '/iap/android/subscribe';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {generateUser} from '../../../../../helpers/api-integration/v3';
|
||||
import googlePayments from '../../../../../../website/server/libs/googlePayments';
|
||||
import googlePayments from '../../../../../../website/server/libs/payments/google';
|
||||
|
||||
describe('payments : google #verify', () => {
|
||||
let endpoint = '/iap/android/verify';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
generateUser,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
|
||||
describe('payments : paypal #checkout', () => {
|
||||
let endpoint = '/paypal/checkout';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
|
||||
describe('payments : paypal #checkoutSuccess', () => {
|
||||
let endpoint = '/paypal/checkout/success';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
import shared from '../../../../../../website/common';
|
||||
|
||||
describe('payments : paypal #subscribe', () => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
|
||||
describe('payments : paypal #subscribeCancel', () => {
|
||||
let endpoint = '/paypal/subscribe/cancel';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
generateUser,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
|
||||
describe('payments : paypal #subscribeSuccess', () => {
|
||||
let endpoint = '/paypal/subscribe/success';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
generateUser,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import paypalPayments from '../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../website/server/libs/payments/paypal';
|
||||
|
||||
describe('payments - paypal - #ipn', () => {
|
||||
let endpoint = '/paypal/ipn';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
generateGroup,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import stripePayments from '../../../../../../website/server/libs/stripePayments';
|
||||
import stripePayments from '../../../../../../website/server/libs/payments/stripe';
|
||||
|
||||
describe('payments - stripe - #subscribeCancel', () => {
|
||||
let endpoint = '/stripe/subscribe/cancel?redirect=none';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
generateUser,
|
||||
generateGroup,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import stripePayments from '../../../../../../website/server/libs/stripePayments';
|
||||
import stripePayments from '../../../../../../website/server/libs/payments/stripe';
|
||||
|
||||
describe('payments - stripe - #checkout', () => {
|
||||
let endpoint = '/stripe/checkout';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
generateGroup,
|
||||
translate as t,
|
||||
} from '../../../../../helpers/api-integration/v3';
|
||||
import stripePayments from '../../../../../../website/server/libs/stripePayments';
|
||||
import stripePayments from '../../../../../../website/server/libs/payments/stripe';
|
||||
|
||||
describe('payments - stripe - #subscribeEdit', () => {
|
||||
let endpoint = '/stripe/subscribe/edit';
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import {
|
|||
generateGroup,
|
||||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import amzLib from '../../../../../../../website/server/libs/amazonPayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import amzLib from '../../../../../../../website/server/libs/payments/amazon';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../../website/common';
|
||||
import { createNonLeaderGroupMember } from '../paymentHelpers';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import amzLib from '../../../../../../../website/server/libs/amazonPayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import amzLib from '../../../../../../../website/server/libs/payments/amazon';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import {
|
|||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import { model as Coupon } from '../../../../../../../website/server/models/coupon';
|
||||
import amzLib from '../../../../../../../website/server/libs/amazonPayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import amzLib from '../../../../../../../website/server/libs/payments/amazon';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import {
|
|||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import { model as Group } from '../../../../../../../website/server/models/group';
|
||||
import amzLib from '../../../../../../../website/server/libs/amazonPayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import amzLib from '../../../../../../../website/server/libs/payments/amazon';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
|
||||
describe('#upgradeGroupPlan', () => {
|
||||
let spy, data, user, group, uuidString;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* eslint-disable camelcase */
|
||||
import iapModule from '../../../../../website/server/libs/inAppPurchases';
|
||||
import payments from '../../../../../website/server/libs/payments';
|
||||
import applePayments from '../../../../../website/server/libs/applePayments';
|
||||
import iap from '../../../../../website/server/libs/inAppPurchases';
|
||||
import {model as User} from '../../../../../website/server/models/user';
|
||||
import common from '../../../../../website/common';
|
||||
import iapModule from '../../../../../../website/server/libs/inAppPurchases';
|
||||
import payments from '../../../../../../website/server/libs/payments/payments';
|
||||
import applePayments from '../../../../../../website/server/libs/payments/apple';
|
||||
import iap from '../../../../../../website/server/libs/inAppPurchases';
|
||||
import {model as User} from '../../../../../../website/server/models/user';
|
||||
import common from '../../../../../../website/common';
|
||||
import moment from 'moment';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
/* eslint-disable camelcase */
|
||||
import iapModule from '../../../../../website/server/libs/inAppPurchases';
|
||||
import payments from '../../../../../website/server/libs/payments';
|
||||
import googlePayments from '../../../../../website/server/libs/googlePayments';
|
||||
import iap from '../../../../../website/server/libs/inAppPurchases';
|
||||
import {model as User} from '../../../../../website/server/models/user';
|
||||
import common from '../../../../../website/common';
|
||||
import iapModule from '../../../../../../website/server/libs/inAppPurchases';
|
||||
import payments from '../../../../../../website/server/libs/payments/payments';
|
||||
import googlePayments from '../../../../../../website/server/libs/payments/google';
|
||||
import iap from '../../../../../../website/server/libs/inAppPurchases';
|
||||
import {model as User} from '../../../../../../website/server/models/user';
|
||||
import common from '../../../../../../website/common';
|
||||
import moment from 'moment';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import moment from 'moment';
|
||||
|
||||
import * as sender from '../../../../../../../website/server/libs/email';
|
||||
import * as api from '../../../../../../../website/server/libs/payments';
|
||||
import * as api from '../../../../../../../website/server/libs/payments/payments';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import { model as Group } from '../../../../../../../website/server/models/group';
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import stripeModule from 'stripe';
|
|||
import nconf from 'nconf';
|
||||
|
||||
import * as sender from '../../../../../../../website/server/libs/email';
|
||||
import * as api from '../../../../../../../website/server/libs/payments';
|
||||
import amzLib from '../../../../../../../website/server/libs/amazonPayments';
|
||||
import stripePayments from '../../../../../../../website/server/libs/stripePayments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/paypalPayments';
|
||||
import * as api from '../../../../../../../website/server/libs/payments/payments';
|
||||
import amzLib from '../../../../../../../website/server/libs/payments/amazon';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/payments/paypal';
|
||||
import stripePayments from '../../../../../../../website/server/libs/payments/stripe';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import { model as Group } from '../../../../../../../website/server/models/group';
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import moment from 'moment';
|
||||
|
||||
import * as sender from '../../../../../website/server/libs/email';
|
||||
import * as api from '../../../../../website/server/libs/payments';
|
||||
import analytics from '../../../../../website/server/libs/analyticsService';
|
||||
import notifications from '../../../../../website/server/libs/pushNotifications';
|
||||
import { model as User } from '../../../../../website/server/models/user';
|
||||
import { translate as t } from '../../../../helpers/api-v3-integration.helper';
|
||||
import * as sender from '../../../../../../website/server/libs/email';
|
||||
import * as api from '../../../../../../website/server/libs/payments/payments';
|
||||
import analytics from '../../../../../../website/server/libs/analyticsService';
|
||||
import notifications from '../../../../../../website/server/libs/pushNotifications';
|
||||
import { model as User } from '../../../../../../website/server/models/user';
|
||||
import { translate as t } from '../../../../../helpers/api-v3-integration.helper';
|
||||
import {
|
||||
generateGroup,
|
||||
} from '../../../../helpers/api-unit.helper.js';
|
||||
} from '../../../../../helpers/api-unit.helper.js';
|
||||
|
||||
describe('payments/index', () => {
|
||||
let user, group, data, plan;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable camelcase */
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/payments/paypal';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
|
||||
describe('checkout success', () => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable camelcase */
|
||||
import nconf from 'nconf';
|
||||
|
||||
import paypalPayments from '../../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/payments/paypal';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable camelcase */
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/payments/paypal';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import {
|
||||
generateGroup,
|
||||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable camelcase */
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/payments/paypal';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import {
|
||||
generateGroup,
|
||||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable camelcase */
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/payments/paypal';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import {
|
||||
generateGroup,
|
||||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import moment from 'moment';
|
||||
import cc from 'coupon-code';
|
||||
|
||||
import paypalPayments from '../../../../../../../website/server/libs/paypalPayments';
|
||||
import paypalPayments from '../../../../../../../website/server/libs/payments/paypal';
|
||||
import { model as Coupon } from '../../../../../../../website/server/models/coupon';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import {
|
|||
generateGroup,
|
||||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import stripePayments from '../../../../../../../website/server/libs/stripePayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import stripePayments from '../../../../../../../website/server/libs/payments/stripe';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import {
|
|||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import { model as Coupon } from '../../../../../../../website/server/models/coupon';
|
||||
import stripePayments from '../../../../../../../website/server/libs/stripePayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import stripePayments from '../../../../../../../website/server/libs/payments/stripe';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import stripeModule from 'stripe';
|
||||
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import stripePayments from '../../../../../../../website/server/libs/stripePayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import stripePayments from '../../../../../../../website/server/libs/payments/stripe';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
generateGroup,
|
||||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import stripePayments from '../../../../../../../website/server/libs/stripePayments';
|
||||
import stripePayments from '../../../../../../../website/server/libs/payments/stripe';
|
||||
import common from '../../../../../../../website/common';
|
||||
|
||||
const i18n = common.i18n;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import {
|
|||
generateGroup,
|
||||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import stripePayments from '../../../../../../../website/server/libs/stripePayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import stripePayments from '../../../../../../../website/server/libs/payments/stripe';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
import common from '../../../../../../../website/common';
|
||||
import logger from '../../../../../../../website/server/libs/logger';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import {
|
|||
} from '../../../../../../helpers/api-unit.helper.js';
|
||||
import { model as User } from '../../../../../../../website/server/models/user';
|
||||
import { model as Group } from '../../../../../../../website/server/models/group';
|
||||
import stripePayments from '../../../../../../../website/server/libs/stripePayments';
|
||||
import payments from '../../../../../../../website/server/libs/payments';
|
||||
import stripePayments from '../../../../../../../website/server/libs/payments/stripe';
|
||||
import payments from '../../../../../../../website/server/libs/payments/payments';
|
||||
|
||||
describe('Stripe - Upgrade Group Plan', () => {
|
||||
const stripe = stripeModule('test');
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ import { encrypt } from '../../libs/encryption';
|
|||
import { sendNotification as sendPushNotification } from '../../libs/pushNotifications';
|
||||
import pusher from '../../libs/pusher';
|
||||
import common from '../../../common';
|
||||
import payments from '../../libs/payments';
|
||||
import stripePayments from '../../libs/stripePayments';
|
||||
import amzLib from '../../libs/amazonPayments';
|
||||
import payments from '../../libs/payments/payments';
|
||||
import stripePayments from '../../libs/payments/stripe';
|
||||
import amzLib from '../../libs/payments/amazon';
|
||||
import shared from '../../../common';
|
||||
import apiMessages from '../../libs/apiMessages';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
BadRequest,
|
||||
} from '../../../libs/errors';
|
||||
import amzLib from '../../../libs/amazonPayments';
|
||||
import amzLib from '../../../libs/payments/amazon';
|
||||
import {
|
||||
authWithHeaders,
|
||||
authWithUrl,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import {
|
|||
import {
|
||||
BadRequest,
|
||||
} from '../../../libs/errors';
|
||||
import googlePayments from '../../../libs/googlePayments';
|
||||
import applePayments from '../../../libs/applePayments';
|
||||
import googlePayments from '../../../libs/payments/google';
|
||||
import applePayments from '../../../libs/payments/apple';
|
||||
|
||||
let api = {};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable camelcase */
|
||||
import paypalPayments from '../../../libs/paypalPayments';
|
||||
import paypalPayments from '../../../libs/payments/paypal';
|
||||
import shared from '../../../../common';
|
||||
import {
|
||||
authWithUrl,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import {
|
|||
authWithHeaders,
|
||||
authWithUrl,
|
||||
} from '../../../middlewares/auth';
|
||||
import stripePayments from '../../../libs/stripePayments';
|
||||
import stripePayments from '../../../libs/payments/stripe';
|
||||
|
||||
let api = {};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@ import cc from 'coupon-code';
|
|||
import uuid from 'uuid';
|
||||
import util from 'util';
|
||||
|
||||
import common from '../../common';
|
||||
import common from '../../../common';
|
||||
import {
|
||||
BadRequest,
|
||||
NotAuthorized,
|
||||
NotFound,
|
||||
} from './errors';
|
||||
} from '../errors';
|
||||
import payments from './payments';
|
||||
import { model as User } from '../models/user';
|
||||
import { model as User } from '../../models/user';
|
||||
import {
|
||||
model as Group,
|
||||
basicFields as basicGroupFields,
|
||||
} from '../models/group';
|
||||
import { model as Coupon } from '../models/coupon';
|
||||
} from '../../models/group';
|
||||
import { model as Coupon } from '../../models/coupon';
|
||||
|
||||
// TODO better handling of errors
|
||||
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
import shared from '../../common';
|
||||
import iap from './inAppPurchases';
|
||||
import shared from '../../../common';
|
||||
import iap from '../inAppPurchases';
|
||||
import payments from './payments';
|
||||
import {
|
||||
NotAuthorized,
|
||||
BadRequest,
|
||||
} from './errors';
|
||||
import { model as IapPurchaseReceipt } from '../models/iapPurchaseReceipt';
|
||||
import {model as User } from '../models/user';
|
||||
} from '../errors';
|
||||
import { model as IapPurchaseReceipt } from '../../models/iapPurchaseReceipt';
|
||||
import {model as User } from '../../models/user';
|
||||
import moment from 'moment';
|
||||
|
||||
let api = {};
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
import shared from '../../common';
|
||||
import iap from './inAppPurchases';
|
||||
import shared from '../../../common';
|
||||
import iap from '../inAppPurchases';
|
||||
import payments from './payments';
|
||||
import {
|
||||
NotAuthorized,
|
||||
BadRequest,
|
||||
} from './errors';
|
||||
import { model as IapPurchaseReceipt } from '../models/iapPurchaseReceipt';
|
||||
import {model as User } from '../models/user';
|
||||
} from '../errors';
|
||||
import { model as IapPurchaseReceipt } from '../../models/iapPurchaseReceipt';
|
||||
import {model as User } from '../../models/user';
|
||||
import moment from 'moment';
|
||||
|
||||
let api = {};
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
import _ from 'lodash';
|
||||
import nconf from 'nconf';
|
||||
import analytics from './analyticsService';
|
||||
import analytics from '../analyticsService';
|
||||
import {
|
||||
getUserInfo,
|
||||
sendTxn as txnEmail,
|
||||
} from './email';
|
||||
} from '../email';
|
||||
import moment from 'moment';
|
||||
import { sendNotification as sendPushNotification } from './pushNotifications';
|
||||
import shared from '../../common';
|
||||
import { sendNotification as sendPushNotification } from '../pushNotifications';
|
||||
import shared from '../../../common';
|
||||
import {
|
||||
model as Group,
|
||||
basicFields as basicGroupFields,
|
||||
} from '../models/group';
|
||||
import { model as User } from '../models/user';
|
||||
} from '../../models/group';
|
||||
import { model as User } from '../../models/user';
|
||||
import {
|
||||
NotAuthorized,
|
||||
NotFound,
|
||||
} from './errors';
|
||||
import slack from './slack';
|
||||
} from '../errors';
|
||||
import slack from '../slack';
|
||||
|
||||
const TECH_ASSISTANCE_EMAIL = nconf.get('EMAILS:TECH_ASSISTANCE_EMAIL');
|
||||
const JOINED_GROUP_PLAN = 'joined group plan';
|
||||
|
|
@ -6,19 +6,19 @@ import _ from 'lodash';
|
|||
import payments from './payments';
|
||||
import ipn from 'paypal-ipn';
|
||||
import paypal from 'paypal-rest-sdk';
|
||||
import shared from '../../common';
|
||||
import shared from '../../../common';
|
||||
import cc from 'coupon-code';
|
||||
import { model as Coupon } from '../models/coupon';
|
||||
import { model as User } from '../models/user';
|
||||
import { model as Coupon } from '../../models/coupon';
|
||||
import { model as User } from '../../models/user';
|
||||
import {
|
||||
model as Group,
|
||||
basicFields as basicGroupFields,
|
||||
} from '../models/group';
|
||||
} from '../../models/group';
|
||||
import {
|
||||
BadRequest,
|
||||
NotAuthorized,
|
||||
NotFound,
|
||||
} from './errors';
|
||||
} from '../errors';
|
||||
|
||||
|
||||
const BASE_URL = nconf.get('BASE_URL');
|
||||
|
|
@ -2,20 +2,20 @@ import stripeModule from 'stripe';
|
|||
import nconf from 'nconf';
|
||||
import cc from 'coupon-code';
|
||||
import moment from 'moment';
|
||||
import logger from './logger';
|
||||
import logger from '../logger';
|
||||
import {
|
||||
BadRequest,
|
||||
NotAuthorized,
|
||||
NotFound,
|
||||
} from './errors';
|
||||
} from '../errors';
|
||||
import payments from './payments';
|
||||
import { model as User } from '../models/user';
|
||||
import { model as Coupon } from '../models/coupon';
|
||||
import { model as User } from '../../models/user';
|
||||
import { model as Coupon } from '../../models/coupon';
|
||||
import {
|
||||
model as Group,
|
||||
basicFields as basicGroupFields,
|
||||
} from '../models/group';
|
||||
import shared from '../../common';
|
||||
} from '../../models/group';
|
||||
import shared from '../../../common';
|
||||
|
||||
let stripe = stripeModule(nconf.get('STRIPE_API_KEY'));
|
||||
const i18n = shared.i18n;
|
||||
|
|
@ -10,7 +10,7 @@ import { model as Challenge} from './challenge';
|
|||
import * as Tasks from './task';
|
||||
import validator from 'validator';
|
||||
import { removeFromArray } from '../libs/collectionManipulators';
|
||||
import payments from '../libs/payments';
|
||||
import payments from '../libs/payments/payments';
|
||||
import { groupChatReceivedWebhook } from '../libs/webhook';
|
||||
import {
|
||||
InternalServerError,
|
||||
|
|
@ -28,8 +28,8 @@ import {
|
|||
import {
|
||||
schema as SubscriptionPlanSchema,
|
||||
} from './subscriptionPlan';
|
||||
import amazonPayments from '../libs/amazonPayments';
|
||||
import stripePayments from '../libs/stripePayments';
|
||||
import amazonPayments from '../libs/payments/amazon';
|
||||
import stripePayments from '../libs/payments/stripe';
|
||||
import { model as UserNotification } from './userNotification';
|
||||
|
||||
const questScrolls = shared.content.quests;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import {
|
|||
import { defaults, map, flatten, flow, compact, uniq, partialRight } from 'lodash';
|
||||
import { model as UserNotification } from '../userNotification';
|
||||
import schema from './schema';
|
||||
import payments from '../../libs/payments';
|
||||
import amazonPayments from '../../libs/amazonPayments';
|
||||
import stripePayments from '../../libs/stripePayments';
|
||||
import paypalPayments from '../../libs/paypalPayments';
|
||||
import payments from '../../libs/payments/payments';
|
||||
import amazonPayments from '../../libs/payments/amazon';
|
||||
import stripePayments from '../../libs/payments/stripe';
|
||||
import paypalPayments from '../../libs/payments/paypal';
|
||||
|
||||
const daysSince = common.daysSince;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue