您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

paymentOption.vue 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. <carousel
  18. :nav="false"
  19. :dots="false"
  20. :items="1"
  21. :autoplay="true"
  22. :loop="true"
  23. :autoHeight="true"
  24. id="intro-carousel"
  25. style="margin-top:-50px;"
  26. :responsive="{ 0: { items: 1, nav: false }, 600: { items: 1, nav: false } }"
  27. >
  28. <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
  29. <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
  30. <img class="item" src="/img/intro-carousel/comm-1.jpg" alt="" />
  31. <img class="item" src="/img/intro-carousel/comm-4.jpg" alt="" />
  32. <img class="item" src="/img/intro-carousel/3.jpg" alt="" />
  33. <img class="item" src="/img/intro-carousel/home-5.jpg" alt="" />
  34. </carousel>
  35. </section>
  36. </template>
  37. <script>
  38. /* eslint-disable */
  39. import { mapState, mapActions, mapGetters } from "vuex";
  40. import carousel from "vue-owl-carousel";
  41. import Log from "../../assets/Log";
  42. export default {
  43. components: {
  44. carousel
  45. },
  46. props: {
  47. week: {}
  48. },
  49. data() {
  50. return {
  51. boolLoaded: false,
  52. selectedOption: "CC"
  53. };
  54. },
  55. computed: {
  56. ...mapGetters("fees", ["getListingFee"])
  57. },
  58. methods: {
  59. ...mapActions("payment", ["addPayment"]),
  60. ...mapActions("myWeeks", ["editSave"]),
  61. pushToApi() {
  62. if (this.selectedOption == "CC") {
  63. this.paygateRedirect();
  64. } else {
  65. this.week.statusId = 1033; // change this value to link with status
  66. if (this.week.owner.telephone === "") {
  67. delete this.week.owner.telephone;
  68. }
  69. console.log(JSON.stringify(this.week));
  70. this.editSave(this.week).then(() => {
  71. this.$router.push({ name: "EFTPage", params: { week: this.week } });
  72. });
  73. }
  74. },
  75. paygateRedirect() {
  76. var amount = this.getListingFee.amount;
  77. var paymentObj = {
  78. timeshareWeekId: this.week.id, // this.sellItem.Id,
  79. propertyId: 0,
  80. creatydById: Log.getUser().id, //Log.getUser().id,
  81. amount: amount,
  82. paymentStatus: "",
  83. paymentToken: ""
  84. };
  85. this.addPayment(paymentObj).then(res => {
  86. this.$router.push({
  87. name: "PaymentGateway",
  88. params: {
  89. paymentReqId: res.PAY_REQUEST_ID,
  90. checksum: res.CHECKSUM
  91. }
  92. });
  93. });
  94. }
  95. }
  96. };
  97. </script>
  98. <style lang="scss" scoped></style>