app/Plugin/VeriTrans4G2/Resource/template/default/Shopping/vt4g_payment_credit_setting.twig line 1

Open in your IDE?
  1. {#
  2. Copyright (c) 2018 VeriTrans Inc., a Digital Garage company. All rights reserved.
  3. http://www.veritrans.co.jp/
  4. #}
  5. {{ include('VeriTrans4G2/Resource/template/default/js/vt4g_credit_js.twig') }}
  6. {{ include('VeriTrans4G2/Resource/template/default/css/vt4g_css.twig') }}
  7. {% form_theme form 'Form/form_div_layout.twig' %}
  8. <script>
  9.     $(function () {
  10.         $('.vt4g_payment_credit').appendTo($('.ec-orderPayment').first());
  11.     })
  12. </script>
  13. <div class="vt4g_payment_credit">
  14.     {# ベリトランス会員ID決済 入力フォーム #}
  15.     {% if useAccountPayment and accountCards is not empty %}
  16.         <div class="accordion_one">
  17.             <div id="vt4g-credit-account" class="ec-rectHeading">
  18.                 <h2 class="vt4g_toggle_title">
  19.                     登録済みクレジットカード決済
  20.                     <div class ="vt4g_toggle_btn">
  21.                         <span class="plus-dark-icon change-class"></span>
  22.                     </div>
  23.                 </h2>
  24.                 <div class="accordion_inner">
  25.                     {{ form_widget(accountForm._token) }}
  26.                     <input type="hidden" name="mode" value="account">
  27.                     <p class="ec-para-normal">決済に利用するカードを選択してください。</p>
  28.                     {% if isCardMaxOver %}
  29.                     <p class="ec-para-normal ec-color-red">登録できるカード情報が上限に達しているため、新しいカード情報でお支払いはできません。</p>
  30.                     <p class="ec-para-normal ec-color-red">新しいカード情報でお支払いの場合は、マイページから使用しないカード情報を削除してください。</p>
  31.                     {% endif %}
  32.                     <p class="ec-color-red ec-para-normal"></p>
  33.                     <div class="ec-borderedDefs">
  34.                         <dl>
  35.                             <dt><label class="ec-label"><p>登録済みの</p>クレジットカード番号</label><span class="ec-required">必須</span></dt>
  36.                             <dd>
  37.                                 <table class="table table-bordered">
  38.                                     <thead>
  39.                                         <tr class="active">
  40.                                             <th>カード番号</th>
  41.                                             <th>有効期限</th>
  42.                                         </tr>
  43.                                     </thead>
  44.                                     <tbody>
  45.                                         {% for index, card in accountCards %}
  46.                                             <tr>
  47.                                                 <td class="ec-blockRadio">
  48.                                                     <label>
  49.                                                         <input name="card_id" type="radio" value="{{ card.cardId }}" {% if card.isDefault %}checked{% endif %}>
  50.                                                         <span>{{ card.cardNumber }}</span>
  51.                                                     </label>
  52.                                                     <input type = "hidden"  name = "registered_mask_card_number" value="{{ card.cardNumber }}">
  53.                                                     <input type = "hidden"  class = "registered_card_name" value="{{ card.registeredCardName }}">
  54.                                                 </td>
  55.                                                 <td>{{ card.expire }}</td>
  56.                                             </tr>
  57.                                         {% endfor %}
  58.                                     </tbody>
  59.                                 </table>
  60.                                 <input type = "hidden" id = "account_mask_card_number" name = "account_mask_card_number">
  61.                             </dd>
  62.                         </dl>
  63.                         <dl>
  64.                             <dt><label class="ec-label">お支払い方法</label><span class="ec-required">必須</span></dt>
  65.                             <dd>
  66.                                 <div class="ec-select {% if accountForm.payment_type.vars.errors is not empty %}error{% endif %}">
  67.                                     {{ form_widget(accountForm.payment_type) }}
  68.                                     <p class="ec-errorMessage">{{ form_errors(accountForm.payment_type) }}</p>
  69.                                 </div>
  70.                             </dd>
  71.                         </dl>
  72.                         {% if paymentInfo.mpi_flg is defined and paymentInfo.mpi_flg %}
  73.                             <dl>
  74.                                 <dt><label for="payment_credit_account_card_name" class="ec-label">カード名義人名</label><span class="ec-required">必須</span></dt>
  75.                                 <dd>
  76.                                     <div class="ec-input {% if accountForm.card_name.vars.errors is not empty %}error{% endif %}">
  77.                                         {{ form_widget(accountForm.card_name) }}
  78.                                         <p class="ec-para-normal">(例: TARO YAMADA)</p>
  79.                                         {{ form_errors(accountForm.card_name) }}
  80.                                     </div>
  81.                                 </dd>
  82.                             </dl>
  83.                         {% endif %}
  84.                     </div>
  85.                 </div>
  86.             </div>
  87.         </div>
  88.     {% endif %}
  89.     {# 再取引 入力フォーム #}
  90.     {% if useReTradePayment and reTradeCards is not empty %}
  91.         <div class="accordion_one">
  92.             <div id="vt4g-credit-retrade" class="ec-rectHeading">
  93.                 <h2 class="vt4g_toggle_title">
  94.                     かんたん決済 (前回ご利用カードでのお支払い)
  95.                     <div class ="vt4g_toggle_btn">
  96.                         <span class="plus-dark-icon change-class"></span>
  97.                     </div>
  98.                 </h2>
  99.                 <div class="accordion_inner">
  100.                     {{ form_widget(oneClickForm._token) }}
  101.                     <input type="hidden" name="mode" value="retrade">
  102.                     <p class="ec-para-normal">決済に利用するカードを選択してください。</p>
  103.                     <p class="ec-color-red ec-para-normal"></p>
  104.                     <div class="ec-borderedDefs">
  105.                         <dl>
  106.                             <dt><label class="ec-label">これまでの<p>クレジットカード番号</p></label><span class="ec-required">必須</span></dt>
  107.                             <dd>
  108.                                 <table class="table table-bordered">
  109.                                     <thead>
  110.                                         <tr class="active">
  111.                                             <th>カード番号</th>
  112.                                             <th>ご注文日時</th>
  113.                                         </tr>
  114.                                     </thead>
  115.                                     <tbody>
  116.                                         {% for index, card in reTradeCards %}
  117.                                             <tr>
  118.                                                 <td class="ec-blockRadio">
  119.                                                     <label>
  120.                                                         <input name="payment_order_id" type="radio" value="{{ card.paymentOrderId }}" {% if index is same as(0) %}checked{% endif %}>
  121.                                                         <span>{{ card.cardNumber }}</span>
  122.                                                     </label>
  123.                                                     <input type = "hidden" name = "registered_mask_card_number" value="{{ card.cardNumber }}">
  124.                                                     <input type = "hidden" class = "registered_card_name" value="{{ card.registeredCardName }}">
  125.                                                 </td>
  126.                                                 <td>{{ card.orderDate }}</td>
  127.                                             </tr>
  128.                                         {% endfor %}
  129.                                     </tbody>
  130.                                 </table>
  131.                                 <input type = "hidden" id = "retrade_mask_card_number" name = "retrade_mask_card_number">
  132.                             </dd>
  133.                         </dl>
  134.                         <dl>
  135.                             <dt><label class="ec-label">お支払い方法</label><span class="ec-required">必須</span></dt>
  136.                             <dd>
  137.                                 <div class="ec-select {% if oneClickForm.payment_type.vars.errors is not empty %}error{% endif %}">
  138.                                     {{ form_widget(oneClickForm.payment_type) }}
  139.                                     <p class="ec-errorMessage">{{ form_errors(oneClickForm.payment_type) }}</p>
  140.                                 </div>
  141.                             </dd>
  142.                         </dl>
  143.                         {% if paymentInfo.mpi_flg is defined and paymentInfo.mpi_flg %}
  144.                             <dl>
  145.                                 <dt><label for="payment_credit_retrade_card_name" class="ec-label">カード名義人名</label><span class="ec-required">必須</span></dt>
  146.                                 <dd>
  147.                                     <div class="ec-input {% if oneClickForm.card_name.vars.errors is not empty %}error{% endif %}">
  148.                                         {{ form_widget(oneClickForm.card_name) }}
  149.                                         <p class="ec-para-normal">(例: TARO YAMADA)</p>
  150.                                         {{ form_errors(oneClickForm.card_name) }}
  151.                                     </div>
  152.                                 </dd>
  153.                             </dl>
  154.                         {% endif %}
  155.                     </div>
  156.                 </div>
  157.             </div>
  158.         </div>
  159.     {% endif %}
  160.     {# クレジットカード情報 入力フォーム #}
  161.     {% if not isCardMaxOver %}
  162.         <div class="accordion_one">
  163.             <div id="vt4g-credit" class="ec-rectHeading">
  164.                 <input type="hidden" name="token_id" value="">
  165.                 <input type="hidden" name="token_expire_date" value="">
  166.                 <input type="hidden" name="mask_card_number" value="">
  167.                 <input type="hidden" name="subsc_order_flg" value="{{ subscOrderFlg }}">
  168.                 <h2 class="vt4g_toggle_title">
  169.                     {{ title }}
  170.                     <div class ="vt4g_toggle_btn">
  171.                         <span class="plus-dark-icon change-class"></span>
  172.                     </div>
  173.                 </h2>
  174.                 <div class="accordion_inner">
  175.                     {{ form_widget(form._token) }}
  176.                     <input type="hidden" name="mode" value="next">
  177.                     <p class="ec-color-red ec-para-normal" id="vt4g_form_credit_error"></p>
  178.                     {% if ('vt4g_plugin.shopping.credit.token.timelimit'|trans) != 'vt4g_plugin.shopping.credit.token.timelimit' %}
  179.                         <p class="ec-para-normal ec-color-red">{{ 'vt4g_plugin.shopping.credit.token.timelimit'|trans }}</p>
  180.                     {% endif %}
  181.                     <div class="ec-borderedDefs">
  182.                         <dl>
  183.                             <dt><label for="vt4g_card_no" class="ec-label">クレジットカード番号</label><span class="ec-required">必須</span></dt>
  184.                             <dd>
  185.                                 <div class="ec-input {% if form.card_no.vars.errors is not empty %}error{% endif %}">
  186.                                     {{ form_widget(form.card_no, {"id": "vt4g_card_no"}) }}
  187.                                     {{ form_errors(form.card_no) }}
  188.                                 </div>
  189.                             </dd>
  190.                         </dl>
  191.                         <dl>
  192.                             <dt><label for="vt4g_expiry_mon" class="ec-label">カード有効期限</label><span class="ec-required">必須</span></dt>
  193.                             <dd>
  194.                                 <div class="ec-select {% if form.expiry_month.vars.errors is not empty or form.expiry_year.vars.errors is not empty %}error{% endif %}">
  195.                                     {{ form_widget(form.expiry_month, {"id": "vt4g_expiry_mon"}) }}月 / 20{{ form_widget(form.expiry_year) }}年
  196.                                     {{ form_errors(form.expiry_month) }}
  197.                                     {{ form_errors(form.expiry_year) }}
  198.                                 </div>
  199.                             </dd>
  200.                         </dl>
  201.                         <dl>
  202.                             <dt><label for="payment_credit_card_name" class="ec-label">カード名義人名</label><span class="ec-required">必須</span></dt>
  203.                             <dd>
  204.                                 <div class="ec-input {% if form.card_name.vars.errors is not empty %}error{% endif %}">
  205.                                     {{ form_widget(form.card_name) }}
  206.                                     <p class="ec-para-normal">(例: TARO YAMADA)</p>
  207.                                     {{ form_errors(form.card_name) }}
  208.                                 </div>
  209.                             </dd>
  210.                         </dl>
  211.                         {% if paymentInfo.security_flg is defined and paymentInfo.security_flg %}
  212.                             <dl>
  213.                                 <dt><label for="payment_credit_sec_code" class="ec-label">セキュリティコード</label><span class="ec-required">必須</span></dt>
  214.                                 <dd>
  215.                                     <div class="ec-halfInput {% if form.sec_code.vars.errors is not empty %}error{% endif %}">
  216.                                         {{ form_widget(form.sec_code) }}
  217.                                         <p class="ec-para-normal">(例: 123)</p>
  218.                                         {{ form_errors(form.sec_code) }}
  219.                                     </div>
  220.                                 </dd>
  221.                             </dl>
  222.                         {% endif %}
  223.                         <dl>
  224.                             <dt><label for="payment_credit_payment_type" class="ec-label">お支払い方法</label><span class="ec-required">必須</span></dt>
  225.                             <dd>
  226.                                 <div class="ec-select {% if form.payment_type.vars.errors is not empty %}error{% endif %}">
  227.                                     {{ form_widget(form.payment_type) }}
  228.                                     <p class="ec-errorMessage">{{ form_errors(form.payment_type) }}</p>
  229.                                 </div>
  230.                             </dd>
  231.                         </dl>
  232.                         {% if cardRegistFlg %}
  233.                         <dl>
  234.                             <dt><label for="payment_credit_cardinfo_regist" class="ec-label">カード情報登録</label><span class="ec-required">必須</span></dt>
  235.                             <dd>
  236.                                 <div class="ec-radio {% if form.cardinfo_regist.vars.errors is not empty %}error{% endif %}">
  237.                                     {{ form_widget(form.cardinfo_regist) | spaceless }}
  238.                                     {{ form_errors(form.cardinfo_regist) }}
  239.                                 </div>
  240.                             </dd>
  241.                         </dl>
  242.                         {% endif %}
  243.                         {% if cardRetradeFlg %}
  244.                         <dl>
  245.                             <dt>
  246.                                 <label for="payment_credit_cardinfo_retrade" class="ec-label">かんたん決済</label><span class="ec-required">必須</span>
  247.                                 <div>【利用する】を選択いただくと次回購入時にカード情報の入力を省くことができます。</div>
  248.                             </dt>
  249.                             <dd>
  250.                                 <div class="ec-radio {% if form.cardinfo_retrade.vars.errors is not empty %}error{% endif %}">
  251.                                     {{ form_widget(form.cardinfo_retrade) | spaceless  }}
  252.                                     {{ form_errors(form.cardinfo_retrade) }}
  253.                                 </div>
  254.                             </dd>
  255.                         </dl>
  256.                         {% endif %}
  257.                     </div>
  258.                 </div>
  259.             </div>
  260.         </div>
  261.     {% endif %}
  262. </div>