mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Sept 18 fixes (#9051)
* Added hover state to buy buttons * Translated profile * Fixed sending private message from member modal * Added payment functions * Added translation to home page * Fixed translation * Some front page styles * Fixed inbox sorting and searching * Added seasonals * Fixed buy gem modal conflict * Fixed paypal link * Fixed footer style crossover * Fixed quest update * Fixed sanity
This commit is contained in:
@@ -2,8 +2,10 @@ import axios from 'axios';
|
||||
|
||||
let AUTH_SETTINGS = localStorage.getItem('habit-mobile-settings');
|
||||
let API_TOKEN = '';
|
||||
let API_ID = '';
|
||||
if (AUTH_SETTINGS) {
|
||||
AUTH_SETTINGS = JSON.parse(AUTH_SETTINGS);
|
||||
API_ID = AUTH_SETTINGS.auth.apiId;
|
||||
API_TOKEN = AUTH_SETTINGS.auth.apiToken;
|
||||
}
|
||||
|
||||
@@ -15,7 +17,16 @@ let StripeCheckout = window.StripeCheckout;
|
||||
export default {
|
||||
computed: {
|
||||
paypalCheckoutLink () {
|
||||
return `/paypal/checkout?_id=${this.user._id}&apiToken=${API_TOKEN}`;
|
||||
return `/paypal/checkout?_id=${API_ID}&apiToken=${API_TOKEN}`;
|
||||
},
|
||||
paypalSubscriptionLink () {
|
||||
return `/paypal/subscribe?_id=${API_ID}&apiToken=${API_TOKEN}&sub=${this.subscriptionPlan}`;
|
||||
},
|
||||
paypalPurchaseLink () {
|
||||
if (!this.subscription) return '';
|
||||
let couponString = '';
|
||||
if (this.subscription.coupon) couponString = `&coupon=${this.subscription.coupon}`;
|
||||
return `/paypal/subscribe?_id=${API_ID}&apiToken=${API_TOKEN}&sub=${this.subscription.key}${couponString}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user