{{#unless customer.payment_methods}} {{> components/common/alert/alert-info (lang 'account.payment_methods.no_methods')}} {{/unless}} {{#each customer.payment_methods}} {{!-- Check that the current instrument type is within our whitelist to stop future ones automagically coming through --}} {{#inArray ../theme_settings.supported_payment_methods type}}

{{display_name}}

{{#each stored_instruments}}
{{#if type '===' 'stored_card'}} {{!-- If credit card STARTS --}} {{#if brand}} {{#inArray ../../theme_settings.supported_card_type_icons brand }} {{lang (concat 'account.payment_methods.card_types.' brand)}} {{/inArray}} {{lang (concat 'account.payment_methods.card_types.' brand)}} {{lang 'account.payment_methods.card_ending_in' last_four=last_4}} {{else}} {{lang 'account.payment_methods.card_types.credit_card'}} {{lang 'account.payment_methods.card_types.credit_card'}} {{lang 'account.payment_methods.card_ending_in' last_four=last_4}} {{/if}} {{!-- If credit card ENDS --}} {{/if}} {{#if type '===' 'stored_paypal_account'}} {{!-- If paypal STARTS --}} {{lang 'account.payment_methods.paypal'}} {{email}} {{!-- If paypal ENDS --}} {{/if}}
{{#if expiry_year}} {{lang 'account.payment_methods.card_expiry' month=expiry_month year=expiry_year}} {{/if}} {{#if is_default}} {{/if}}
{{#if billing_address}}
{{!-- If there is an address STARTS --}}

{{lang 'account.payment_methods.billing_address'}}: {{billing_address.address1}}, {{#if billing_address.address2}} {{billing_address.address2}}, {{/if}} {{billing_address.city}}, {{billing_address.state}} {{billing_address.zip}} {{billing_address.country}}

{{!-- If there is an address ENDS --}}
{{/if}}
{{#if edit_url}} {{lang 'common.edit' }} {{/if}} {{#if delete_url}} {{/if}}
{{/each}} {{#if add_url}}
{{/if}}
{{/inArray}} {{/each}}