appointment.js
1 day ago
appointmentWaitingListOptions.js
1 day ago
attendee.js
1 day ago
auth.js
1 day ago
bookableType.js
1 day ago
booking.js
1 day ago
cabinet.js
1 day ago
cabinetFilters.js
1 day ago
coupon.js
1 day ago
customFields.js
1 day ago
customerInfo.js
1 day ago
employee.js
1 day ago
entities.js
1 day ago
event.js
1 day ago
eventBooking.js
1 day ago
eventEntities.js
1 day ago
eventWaitingListOptions.js
1 day ago
pagination.js
1 day ago
params.js
1 day ago
payment.js
1 day ago
persons.js
1 day ago
recurring.js
1 day ago
shortcodeParams.js
1 day ago
stepByStepFilters.js
1 day ago
tickets.js
1 day ago
payment.js
82 lines
| 1 | export default { |
| 2 | namespaced: true, |
| 3 | |
| 4 | state: () => ({ |
| 5 | amount: 0, |
| 6 | gateway: '', |
| 7 | deposit: false, |
| 8 | depositAmount: 0, |
| 9 | depositType: '', |
| 10 | data: {}, |
| 11 | error: '', |
| 12 | onSitePayment: false, |
| 13 | }), |
| 14 | |
| 15 | getters: { |
| 16 | getError(state) { |
| 17 | return state.error |
| 18 | }, |
| 19 | getPaymentGateway(state) { |
| 20 | return state.gateway |
| 21 | }, |
| 22 | getPaymentDeposit(state) { |
| 23 | return state.deposit |
| 24 | }, |
| 25 | getAllData(state) { |
| 26 | return { |
| 27 | amount: state.amount, |
| 28 | gateway: state.gateway, |
| 29 | deposit: state.deposit, |
| 30 | depositAmount: state.depositAmount, |
| 31 | depositType: state.depositType, |
| 32 | data: state.data, |
| 33 | } |
| 34 | }, |
| 35 | getOnSitePayment(state) { |
| 36 | return state.onSitePayment |
| 37 | }, |
| 38 | }, |
| 39 | |
| 40 | mutations: { |
| 41 | setError(state, payload) { |
| 42 | state.error = payload |
| 43 | }, |
| 44 | setPaymentGateway(state, payload) { |
| 45 | state.gateway = payload |
| 46 | }, |
| 47 | setPaymentDeposit(state, payload) { |
| 48 | state.deposit = payload |
| 49 | }, |
| 50 | setPaymentDepositAmount(state, payload) { |
| 51 | state.depositAmount = payload |
| 52 | }, |
| 53 | setPaymentDepositType(state, payload) { |
| 54 | state.depositType = payload |
| 55 | }, |
| 56 | setAllData(state, payload) { |
| 57 | state.amount = payload.amount |
| 58 | state.gateway = payload.gateway |
| 59 | state.deposit = payload.deposit |
| 60 | state.depositAmount = payload.depositAmount |
| 61 | state.depositType = payload.depositType |
| 62 | state.data = payload.data |
| 63 | }, |
| 64 | setOnSitePayment(state, payload) { |
| 65 | state.onSitePayment = payload |
| 66 | }, |
| 67 | }, |
| 68 | |
| 69 | actions: { |
| 70 | resetPaymentData({ commit }) { |
| 71 | commit('setAllData', { |
| 72 | amount: 0, |
| 73 | gateway: '', |
| 74 | deposit: false, |
| 75 | depositAmount: 0, |
| 76 | depositType: '', |
| 77 | data: {}, |
| 78 | }) |
| 79 | }, |
| 80 | }, |
| 81 | } |
| 82 |