<% display_payment_methods_list = (@methods = payment_method.customer_payment_methods(@order, payment_method_type)).any? %> <% shipping_address = @order.shipping_address %> <% paypal = payment_method_type.eql?('paypal') %> <% dropin = payment_method_type.eql?('dropin') %> <% hosted = payment_method_type.eql?('custom') %>
<% if display_payment_methods_list %> <%= label_tag 'saved_payment_methods', I18n.t("braintree.checkout.saved_payment_method.#{payment_method_type}") %> <%= select_tag "saved_payment_methods_for_#{payment_method.id}", options_from_braintree_payments(@methods, true), class: 'form-control saved-payment-methods' %> <% unless paypal %>
<% end %> <% end %> <% if paypal %>
<% unless display_payment_methods_list %>
<%= I18n.t('braintree.admin.no_paypal_payments') %>
<% end %> <% else %>
<% end %> <% if hosted %>
<%= label_tag 'card_number_label', payment_method.preferred_number_placeholder %> *

<%= label_tag 'cvv_label', payment_method.preferred_cvv_placeholder %> *

<%= label_tag 'expiration_date_label', payment_method.preferred_expiration_date_placeholder %> *


<% elsif dropin %>

<% end %>
<% unless paypal %> <%= button Spree.t('actions.update'), 'save', 'submit', class: 'new-braintree-payment-method braintree-submit' %> <% end %>