You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

2 years ago
  1. <template>
  2. <div class="payment-status tw-mb-[15px] tw-flex tw-flex-col tw-items-center">
  3. <div
  4. :class="[
  5. 'status-icon',
  6. 'tw-w-[48px]',
  7. 'tw-h-[48px]',
  8. 'tw-mb-[20px]',
  9. status,
  10. ]"
  11. ></div>
  12. <h2 class="info-title t24 tw-text-black tw-mb-[4px]">
  13. <span v-if="status == 'success'">{{ $t("Payment Success!") }}</span>
  14. <span v-else>{{ $t("Payment Failed!") }}</span>
  15. </h2>
  16. <div class="info-description">
  17. <div v-if="status == 'success'" class="t16">
  18. {{ $t("Thanks for your booking!") }}
  19. </div>
  20. <div v-else class="t14 tw-text-error-default tw-text-center">
  21. {{
  22. $t("Unable to authorize payment. Pleaser try another credit card.")
  23. }}
  24. </div>
  25. <div v-if="errorMessage" class="t14 tw-text-error-default">
  26. {{ errorMessage }}
  27. </div>
  28. </div>
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. props: {
  34. status: {
  35. type: String,
  36. },
  37. errorMessage: {
  38. type: String,
  39. },
  40. },
  41. };
  42. </script>
  43. <style lang="scss" scoped>
  44. .status-icon {
  45. background-size: 100%;
  46. background-repeat: no-repeat;
  47. background-position: center;
  48. &.success {
  49. background-color: transparent !important;
  50. background-image: url("~/assets/svg/payment-status-check.svg");
  51. }
  52. &.failed {
  53. background-color: transparent !important;
  54. background-image: url("~/assets/svg/payment-status-failed.svg");
  55. }
  56. }
  57. </style>