Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : PaymentButtonInner.vue
<template>
    <div class="am-payment-button-inner">
      <img v-if="value !== 'onsite' && value !== 'mollie'" :width="value === 'razorpay' ? '70' : '32'" height="32" :src="$root.getUrl + 'public/img/payments/icons/' + getIconName(value)">
      <svg-icon
        v-else-if="value === 'onsite' || value === 'mollie'"
        :iconName="value"
        :iconColor="color"
      >
      </svg-icon>
      <p v-if="value !== 'razorpay'">{{ formatPaymentName(value) }}</p>
    </div>
</template>

<script>
import svgIcon from '../backend/customize/parts/svgIcon'

export default {
  name: 'paymentButtonInner',

  components: {
    svgIcon
  },

  props: {
    value: {
      type: String,
      default: ''
    },
    color: {
      type: String,
      default: ''
    },
    formField: {
      type: Object,
      default: () => {}
    },
    customizeOption: {
      type: String,
      default: ''
    }
  },

  data () {
    return {
      labelPaymentMethodBtnMollie: this.formField[this.customizeOption].labels.payment_btn_mollie
        ? this.formField[this.customizeOption].labels.payment_btn_mollie.value : this.$root.labels.payment_btn_mollie,
      labelPaymentMethodBtnStripe: this.formField[this.customizeOption].labels.payment_btn_stripe
        ? this.formField[this.customizeOption].labels.payment_btn_stripe.value : this.$root.labels.payment_btn_stripe,
      labelPaymentMethodBtnOnsite: this.formField[this.customizeOption].labels.payment_btn_on_site
        ? this.formField[this.customizeOption].labels.payment_btn_on_site.value : this.$root.labels.payment_btn_on_site,
      labelPaymentMethodBtnSquare: this.formField[this.customizeOption].labels.payment_btn_square
        ? this.formField[this.customizeOption].labels.payment_btn_square.value : this.$root.labels.payment_btn_square
    }
  },

  methods: {
    getIconName (value) {
      return value.toLowerCase() + '.svg'
    },

    formatPaymentName (name) {
      let paymentName = name.toLowerCase()

      switch (paymentName) {
        case 'paypal':
          return 'Paypal'
        case 'stripe':
          return this.labelPaymentMethodBtnStripe || this.$root.labels.payment_btn_stripe
        case 'onsite':
          return this.labelPaymentMethodBtnOnsite || this.$root.labels.payment_btn_on_site
        case 'mollie':
          return this.labelPaymentMethodBtnMollie || this.$root.labels.payment_btn_mollie
        case 'square':
          return this.labelPaymentMethodBtnSquare || this.$root.labels.payment_btn_square
        case 'razorpay':
          return 'Razorpay'
        default:
          return name
      }
    }
  }
}
</script>
© 2026 GrazzMean-Shell