chore(payments): start retiring Amazon Payments
This commit is contained in:
@@ -28,12 +28,6 @@
|
||||
:alt="$t('paypal')"
|
||||
>
|
||||
</button>
|
||||
<amazon-button
|
||||
v-if="amazonAvailable"
|
||||
class="payment-item"
|
||||
:disabled="disabled"
|
||||
:amazon-data="amazonData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -92,21 +86,14 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import amazonButton from '@/components/payments/buttons/amazon';
|
||||
import creditCardIcon from '@/assets/svg/credit-card-icon.svg';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
amazonButton,
|
||||
},
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
amazonData: {
|
||||
type: Object,
|
||||
},
|
||||
stripeFn: {
|
||||
type: Function,
|
||||
},
|
||||
@@ -128,9 +115,6 @@ export default {
|
||||
paypalAvailable () {
|
||||
return typeof this.paypalFn === 'function';
|
||||
},
|
||||
amazonAvailable () {
|
||||
return this.amazonData !== undefined;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
class="group-plan-page text-center"
|
||||
:class="{ static: isStaticPage }"
|
||||
>
|
||||
<amazon-payments-modal />
|
||||
<div class="top-left"></div>
|
||||
<div class="col-6 offset-3 mb-100">
|
||||
<img
|
||||
@@ -95,16 +94,10 @@
|
||||
:hide-footer="true"
|
||||
:hide-header="true"
|
||||
>
|
||||
<div v-if="modalOption === 'static'">
|
||||
<div>
|
||||
<h2>{{ $t('letsMakeAccount') }}</h2>
|
||||
<auth-form @authenticate="authenticate()" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<payments-buttons
|
||||
:stripe-fn="() => pay(PAYMENTS.STRIPE)"
|
||||
:amazon-data="pay(PAYMENTS.AMAZON)"
|
||||
/>
|
||||
</div>
|
||||
</b-modal>
|
||||
</div>
|
||||
</div>
|
||||
@@ -287,16 +280,12 @@
|
||||
<script>
|
||||
import { setup as setupPayments } from '@/libs/payments';
|
||||
import paymentsMixin from '../../mixins/payments';
|
||||
import AmazonPaymentsModal from '@/components/payments/amazonModal';
|
||||
import AuthForm from '../auth/authForm.vue';
|
||||
import GroupPlanCreationModal from '../group-plans/groupPlanCreationModal.vue';
|
||||
import PaymentsButtons from '@/components/payments/buttons/list';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AuthForm,
|
||||
AmazonPaymentsModal,
|
||||
PaymentsButtons,
|
||||
GroupPlanCreationModal,
|
||||
},
|
||||
mixins: [paymentsMixin],
|
||||
@@ -305,10 +294,6 @@ export default {
|
||||
modalOption: '',
|
||||
modalPage: 'account',
|
||||
modalTitle: this.$t('register'),
|
||||
PAYMENTS: {
|
||||
AMAZON: 'amazon',
|
||||
STRIPE: 'stripe',
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -341,14 +326,13 @@ export default {
|
||||
return this.$root.$emit('bv::show::modal', 'group-plan');
|
||||
}
|
||||
if (this.upgradingGroup._id) {
|
||||
return this.$root.$emit('bv::show::modal', 'group-plan');
|
||||
return this.pay();
|
||||
}
|
||||
return this.$root.$emit('bv::show::modal', 'create-group');
|
||||
},
|
||||
pay (paymentMethod) {
|
||||
const subscriptionKey = 'group_monthly';
|
||||
pay () {
|
||||
const paymentData = {
|
||||
subscription: subscriptionKey,
|
||||
subscription: 'group_monthly',
|
||||
coupon: null,
|
||||
};
|
||||
|
||||
@@ -359,15 +343,7 @@ export default {
|
||||
paymentData.groupToCreate = this.newGroup;
|
||||
}
|
||||
|
||||
this.paymentMethod = paymentMethod;
|
||||
if (this.paymentMethod === this.PAYMENTS.STRIPE) {
|
||||
this.redirectToStripe(paymentData);
|
||||
} else if (this.paymentMethod === this.PAYMENTS.AMAZON) {
|
||||
paymentData.type = 'subscription';
|
||||
return paymentData;
|
||||
}
|
||||
|
||||
return null;
|
||||
this.redirectToStripe(paymentData);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user