|
@@ -0,0 +1,102 @@
|
|
1
|
+<template>
|
|
2
|
+ <section id="intro">
|
|
3
|
+ <div class="container">
|
|
4
|
+ <div class="row">
|
|
5
|
+ <div class="col-md-6">
|
|
6
|
+ <div class="intro-content box text-center">
|
|
7
|
+ <h2>Payment Option</h2>
|
|
8
|
+ <select name="" id="" v-model="selectedOption" class="uniSelect form-control">
|
|
9
|
+ <option value="CC">Credit/Debit Card</option>
|
|
10
|
+ <option value="EFT">EFT</option>
|
|
11
|
+ </select>
|
|
12
|
+ <button class="btn-solid-blue mt-5" @click="pushToApi()">Continue</button>
|
|
13
|
+ </div>
|
|
14
|
+ </div>
|
|
15
|
+ </div>
|
|
16
|
+ </div>
|
|
17
|
+
|
|
18
|
+ <carousel
|
|
19
|
+ :nav="false"
|
|
20
|
+ :dots="false"
|
|
21
|
+ :items="1"
|
|
22
|
+ :autoplay="true"
|
|
23
|
+ :loop="true"
|
|
24
|
+ :autoHeight="true"
|
|
25
|
+ id="intro-carousel"
|
|
26
|
+ style="margin-top:-50px;"
|
|
27
|
+ :responsive="{ 0: { items: 1, nav: false }, 600: { items: 1, nav: false } }"
|
|
28
|
+ >
|
|
29
|
+ <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
|
|
30
|
+ <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
|
|
31
|
+ <img class="item" src="/img/intro-carousel/comm-1.jpg" alt="" />
|
|
32
|
+ <img class="item" src="/img/intro-carousel/comm-4.jpg" alt="" />
|
|
33
|
+ <img class="item" src="/img/intro-carousel/3.jpg" alt="" />
|
|
34
|
+ <img class="item" src="/img/intro-carousel/home-5.jpg" alt="" />
|
|
35
|
+ </carousel>
|
|
36
|
+ </section>
|
|
37
|
+</template>
|
|
38
|
+
|
|
39
|
+<script>
|
|
40
|
+/* eslint-disable */
|
|
41
|
+import { mapState, mapActions, mapGetters } from "vuex";
|
|
42
|
+import carousel from "vue-owl-carousel";
|
|
43
|
+import Log from "../../assets/Log";
|
|
44
|
+export default {
|
|
45
|
+ components: {
|
|
46
|
+ carousel
|
|
47
|
+ },
|
|
48
|
+ props: {
|
|
49
|
+ week: {}
|
|
50
|
+ },
|
|
51
|
+ data() {
|
|
52
|
+ return {
|
|
53
|
+ boolLoaded: false,
|
|
54
|
+ selectedOption: "CC"
|
|
55
|
+ };
|
|
56
|
+ },
|
|
57
|
+ computed: {
|
|
58
|
+ ...mapGetters("fees", ["getListingFee"])
|
|
59
|
+ },
|
|
60
|
+ methods: {
|
|
61
|
+ ...mapActions("payment", ["addPayment"]),
|
|
62
|
+ ...mapActions("myWeeks", ["editSave"]),
|
|
63
|
+ pushToApi() {
|
|
64
|
+ if (this.selectedOption == "CC") {
|
|
65
|
+ this.paygateRedirect();
|
|
66
|
+ } else {
|
|
67
|
+ this.week.statusId = 1033; // change this value to link with status
|
|
68
|
+ if (this.week.owner.telephone === "") {
|
|
69
|
+ delete this.week.owner.telephone;
|
|
70
|
+ }
|
|
71
|
+ console.log(JSON.stringify(this.week));
|
|
72
|
+ this.editSave(this.week).then(ex => {
|
|
73
|
+ console.log("It was here");
|
|
74
|
+ });
|
|
75
|
+ }
|
|
76
|
+ },
|
|
77
|
+ paygateRedirect() {
|
|
78
|
+ var amount = this.getListingFee.amount;
|
|
79
|
+ var paymentObj = {
|
|
80
|
+ timeshareWeekId: this.week.id, // this.sellItem.Id,
|
|
81
|
+ propertyId: 0,
|
|
82
|
+ creatydById: Log.getUser().id, //Log.getUser().id,
|
|
83
|
+ amount: amount,
|
|
84
|
+ paymentStatus: "",
|
|
85
|
+ paymentToken: ""
|
|
86
|
+ };
|
|
87
|
+
|
|
88
|
+ this.addPayment(paymentObj).then(res => {
|
|
89
|
+ this.$router.push({
|
|
90
|
+ name: "PaymentGateway",
|
|
91
|
+ params: {
|
|
92
|
+ paymentReqId: res.PAY_REQUEST_ID,
|
|
93
|
+ checksum: res.CHECKSUM
|
|
94
|
+ }
|
|
95
|
+ });
|
|
96
|
+ });
|
|
97
|
+ }
|
|
98
|
+ }
|
|
99
|
+};
|
|
100
|
+</script>
|
|
101
|
+
|
|
102
|
+<style lang="scss" scoped></style>
|