Cleaned default prices on stripe connect

no refs

Cleans up changes to create prices on stripe connect with increase in timeout to allow stripe migrations to run in backend
This commit is contained in:
Rishabh 2021-05-20 21:37:03 +05:30
parent 02a0063444
commit bfd022e760

View File

@ -288,7 +288,7 @@ export default Component.extend({
} }
); );
this.product.set('stripePrices', stripePrices); this.product.set('stripePrices', stripePrices);
yield timeout(1000); yield timeout(3000);
const updatedProduct = yield this.product.save(); const updatedProduct = yield this.product.save();
const monthlyPrice = this.getActivePrice(updatedProduct.stripePrices, 'month', 500, 'usd'); const monthlyPrice = this.getActivePrice(updatedProduct.stripePrices, 'month', 500, 'usd');
const yearlyPrice = this.getActivePrice(updatedProduct.stripePrices, 'year', 5000, 'usd'); const yearlyPrice = this.getActivePrice(updatedProduct.stripePrices, 'year', 5000, 'usd');
@ -296,9 +296,9 @@ export default Component.extend({
this.settings.set('membersMonthlyPriceId', monthlyPrice.id); this.settings.set('membersMonthlyPriceId', monthlyPrice.id);
this.settings.set('membersYearlyPriceId', yearlyPrice.id); this.settings.set('membersYearlyPriceId', yearlyPrice.id);
response = yield this.settings.save(); response = yield this.settings.save();
this.set('membersStripeOpen', false);
this.set('stripeConnectSuccess', true);
} }
this.set('membersStripeOpen', false);
this.set('stripeConnectSuccess', true);
return response; return response;
} catch (error) { } catch (error) {
if (error.payload && error.payload.errors) { if (error.payload && error.payload.errors) {