<template>
  <form
    method="post"
    :action="creditCard.form_url">
    <input
      type="hidden"
      name="order_id"
      :value="creditCard.form_data.order_id">
    <input
      type="hidden"
      name="merchant_id"
      :value="creditCard.form_data.merchant_id">
    <input
      type="hidden"
      name="currency"
      :value="creditCard.form_data.currency">
    <input
      type="hidden"
      name="user_defined_1"
      :value="creditCard.form_data.user_defined_1">
    <input
      type="hidden"
      name="user_defined_2"
      :value="creditCard.form_data.user_defined_2">
    <input
      type="hidden"
      name="version"
      :value="creditCard.form_data.version">
    <input
      type="hidden"
      name="customer_email"
      :value="creditCard.form_data.customer_email">
    <input
      type="hidden"
      name="payment_description"
      :value="creditCard.form_data.payment_description">
    <input
      type="hidden"
      name="amount"
      :value="creditCard.form_data.amount">
    <input
      type="hidden"
      name="result_url_1"
      :value="creditCard.form_data.result_url_1">
    <input
      type="hidden"
      name="result_url_2"
      :value="creditCard.form_data.result_url_2">
    <input
      type="hidden"
      name="ipp_interest_type"
      :value="creditCard.form_data.ipp_interest_type">
    <input
      type="hidden"
      name="hash_value"
      :value="creditCard.form_data.hash_value">
  </form>
</template>

<script>
export default {
  name: 'SntCreditCardForm',
  props: {
    creditCard: {
      type: Object,
      default: () => ({
        form_url: '',
        form_data: {
          order_id: null,
          merchant_id: '',
          currency: 764,
          user_defined_1: '',
          user_defined_2: '',
          version: '7.5',
          customer_email: '',
          payment_description: '',
          amount: null,
          result_url_1: '',
          result_url_2: '',
          ipp_interest_type: 'C',
          hash_value: ''
        }
      })
    }
  }
}
</script>
