mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
stripe payment details
This commit is contained in:
@@ -12,6 +12,9 @@ import {
|
||||
import apple from '../../libs/payments/apple';
|
||||
import google from '../../libs/payments/google';
|
||||
import paypal from '../../libs/payments/paypal';
|
||||
import {
|
||||
getSubscriptionPaymentDetails as getStripeSubscriptionPaymentDetails,
|
||||
} from '../../libs/payments/stripe/subscriptions';
|
||||
|
||||
const api = {};
|
||||
|
||||
@@ -221,7 +224,7 @@ api.validateSubscriptionPaymentDetails = {
|
||||
} else if (user.purchased.plan.paymentMethod === 'Paypal') {
|
||||
paymentDetails = await paypal.getSubscriptionPaymentDetails({ user });
|
||||
} else if (user.purchased.plan.paymentMethod === 'Stripe') {
|
||||
throw new NotFound(res.t('stripeSubscriptionNotValidated'));
|
||||
paymentDetails = await getStripeSubscriptionPaymentDetails(user);
|
||||
} else if (user.purchased.plan.paymentMethod === 'Amazon Payments') {
|
||||
throw new NotFound(res.t('amazonSubscriptionNotValidated'));
|
||||
} else if (user.purchased.plan.paymentMethod === 'Gift') {
|
||||
|
||||
Reference in New Issue
Block a user