Sha256: 0690ffc1d0bfcc7f8d975044bca951f5eed41af96d91a9f3038ed71c1ed880c7

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

Deface::Override.new(
  virtual_path: 'spree/shared/_payment',
  name: 'Displays payment data for PayPal Express payment methods',
  replace: 'erb[silent]:contains("else")',
  text: %{
        <% elsif payment.payment_method.kind_of?(Spree::Gateway::BraintreeVzeroBase) %>
          <% if (last_digits = payment.source.braintree_last_digits) %>
            <%
              cc_type = payment.source.braintree_card_type
              img = "credit_cards/icons/" + cc_type.downcase + ".png"
            %>
            <% if asset_available?(img) %>
              <%= image_tag img %>
            <% else %>
              <p><%= Spree.t(:cc_type) + ": " + cc_type %></p>
              </br>
            <% end %>
            <p><%= Spree.t(:ending_in) + " " + last_digits %></p>
          <% end %>

          <% if (paypal_email = payment.source.paypal_email) %>
            <!-- PayPal Logo --><img src="https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_37x23.jpg" border="0" alt="PayPal Logo"><!-- PayPal Logo -->
            <%= paypal_email %>
          <% end %>

        <% else %>
        }
)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_braintree_vzero-3.6.0 app/overrides/spree/shared/_payment.rb
spree_braintree_vzero-3.5.1 app/overrides/spree/shared/_payment.rb