mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 11:46:23 +00:00
Disables payment scripts setup.
This commit is contained in:
parent
8488054954
commit
217583213d
4 changed files with 10 additions and 29 deletions
|
|
@ -1,29 +1,2 @@
|
||||||
import getStore from '@/store';
|
export function setup() { // eslint-disable-line import/prefer-default-export
|
||||||
|
|
||||||
export function setup () { // eslint-disable-line import/prefer-default-export
|
|
||||||
const store = getStore();
|
|
||||||
|
|
||||||
// Set Amazon Payments as ready in the store,
|
|
||||||
// Added here to make sure the listener is registered before the script can be executed
|
|
||||||
window.onAmazonLoginReady = () => {
|
|
||||||
store.state.isAmazonReady = true;
|
|
||||||
window.amazon.Login.setClientId(import.meta.env.AMAZON_PAYMENTS_CLIENT_ID);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Load the scripts
|
|
||||||
|
|
||||||
// Amazon Payments
|
|
||||||
const amazonScript = document.createElement('script');
|
|
||||||
let firstScript = document.getElementsByTagName('script')[0];
|
|
||||||
amazonScript.type = 'text/javascript';
|
|
||||||
amazonScript.async = true;
|
|
||||||
amazonScript.src = `https://static-na.payments-amazon.com/OffAmazonPayments/us/${(import.meta.env.AMAZON_PAYMENTS_MODE === 'sandbox' ? 'sandbox/' : '')}js/Widgets.js`;
|
|
||||||
firstScript.parentNode.insertBefore(amazonScript, firstScript);
|
|
||||||
|
|
||||||
// Stripe
|
|
||||||
const stripeScript = document.createElement('script');
|
|
||||||
[firstScript] = document.getElementsByTagName('script');
|
|
||||||
stripeScript.async = true;
|
|
||||||
stripeScript.src = 'https://js.stripe.com/v3/';
|
|
||||||
firstScript.parentNode.insertBefore(stripeScript, firstScript);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/*
|
||||||
import nconf from 'nconf';
|
import nconf from 'nconf';
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
import iap from 'in-app-purchase';
|
import iap from 'in-app-purchase';
|
||||||
|
|
@ -27,3 +28,4 @@ export default {
|
||||||
GOOGLE: iap.GOOGLE,
|
GOOGLE: iap.GOOGLE,
|
||||||
APPLE: iap.APPLE,
|
APPLE: iap.APPLE,
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
|
/* eslint-disable max-len */
|
||||||
|
/*
|
||||||
import nconf from 'nconf';
|
import nconf from 'nconf';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
|
|
@ -222,7 +224,7 @@ api.subscribeSuccess = async function subscribeSuccess (options = {}) {
|
||||||
headers,
|
headers,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* Cancel a PayPal Subscription
|
* Cancel a PayPal Subscription
|
||||||
*
|
*
|
||||||
|
|
@ -233,6 +235,7 @@ api.subscribeSuccess = async function subscribeSuccess (options = {}) {
|
||||||
*
|
*
|
||||||
* @return undefined
|
* @return undefined
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
api.subscribeCancel = async function subscribeCancel (options = {}) {
|
api.subscribeCancel = async function subscribeCancel (options = {}) {
|
||||||
const { groupId, user, cancellationReason } = options;
|
const { groupId, user, cancellationReason } = options;
|
||||||
|
|
||||||
|
|
@ -324,3 +327,4 @@ api.ipn = async function ipnApi (options = {}) {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default api;
|
export default api;
|
||||||
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
/*
|
||||||
import passport from 'passport';
|
import passport from 'passport';
|
||||||
import nconf from 'nconf';
|
import nconf from 'nconf';
|
||||||
import { Strategy as GoogleStrategy } from 'passport-google-oauth20';
|
import { Strategy as GoogleStrategy } from 'passport-google-oauth20';
|
||||||
|
|
@ -16,3 +17,4 @@ passport.use(new GoogleStrategy({
|
||||||
clientID: nconf.get('GOOGLE_CLIENT_ID'),
|
clientID: nconf.get('GOOGLE_CLIENT_ID'),
|
||||||
clientSecret: nconf.get('GOOGLE_CLIENT_SECRET'),
|
clientSecret: nconf.get('GOOGLE_CLIENT_SECRET'),
|
||||||
}, (accessToken, refreshToken, profile, done) => done(null, profile)));
|
}, (accessToken, refreshToken, profile, done) => done(null, profile)));
|
||||||
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue