- process single charge

This commit is contained in:
Čarodej
2021-12-23 13:07:41 +01:00
parent 606765561d
commit f88ed999c5
13 changed files with 442 additions and 21 deletions
+33
View File
@@ -0,0 +1,33 @@
import {events} from "../../bus";
const defaultState = {
singleChargeAmount: undefined,
}
const actions = {
callSingleChargeProcess: ({commit}, amount) => {
// Open popup with payment methods
events.$emit('popup:open', {name: 'select-payment-method'})
// Store charge amount
commit('SET_SINGLE_CHARGE_AMOUNT', amount)
},
}
const mutations = {
SET_SINGLE_CHARGE_AMOUNT(state, amount) {
state.singleChargeAmount = amount
}
}
const getters = {
singleChargeAmount: state => state.singleChargeAmount,
}
export default {
state: defaultState,
getters,
actions,
mutations
}