Module: NimbleshopAuthorizedotnet::ExposedHelper
- Defined in:
- app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb
Instance Method Summary collapse
- #nimbleshop_authorizedotnet_available_payment_options_icons ⇒ Object
- #nimbleshop_authorizedotnet_crud_form ⇒ Object
- #nimbleshop_authorizedotnet_icon_for_order_payment(order) ⇒ Object
- #nimbleshop_authorizedotnet_next_payment_processing_action(order) ⇒ Object
- #nimbleshop_authorizedotnet_order_show_extra_info(order) ⇒ Object
- #nimbleshop_authorizedotnet_payment_form(order) ⇒ Object
- #nimbleshop_authorizedotnet_payment_info_for_buyer(order) ⇒ Object
- #nimbleshop_authorizedotnet_picture_on_admin_payment_methods ⇒ Object
- #nimbleshop_authorizedotnet_small_image ⇒ Object
Instance Method Details
#nimbleshop_authorizedotnet_available_payment_options_icons ⇒ Object
23 24 25 26 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 23 def return unless NimbleshopAuthorizedotnet::Authorizedotnet.first %w(visa mastercard discover american_express).map { |i| image_tag("engines/nimbleshop_authorizedotnet/#{i}.png") } end |
#nimbleshop_authorizedotnet_crud_form ⇒ Object
44 45 46 47 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 44 def return unless NimbleshopAuthorizedotnet::Authorizedotnet.first render partial: '/nimbleshop_authorizedotnet/authorizedotnets/edit' end |
#nimbleshop_authorizedotnet_icon_for_order_payment(order) ⇒ Object
28 29 30 31 32 33 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 28 def (order) if payment_transaction = order.payment_transactions.last cardtype = payment_transaction.[:cardtype] image_tag("engines/nimbleshop_authorizedotnet/#{cardtype}.png", height: '10px') end end |
#nimbleshop_authorizedotnet_next_payment_processing_action(order) ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 4 def (order) if order. link_to 'Capture payment', capture_payment_admin_order_path(order), method: :put, class: 'btn btn-success' end end |
#nimbleshop_authorizedotnet_order_show_extra_info(order) ⇒ Object
18 19 20 21 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 18 def (order) return unless NimbleshopAuthorizedotnet::Authorizedotnet.first render partial: '/nimbleshop_authorizedotnet/payments/order_show_extra_info', locals: { transaction: order.payment_transactions.last } end |
#nimbleshop_authorizedotnet_payment_form(order) ⇒ Object
39 40 41 42 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 39 def (order) return unless NimbleshopAuthorizedotnet::Authorizedotnet.first render partial: '/nimbleshop_authorizedotnet/payments/new', locals: { order: order } end |
#nimbleshop_authorizedotnet_payment_info_for_buyer(order) ⇒ Object
35 36 37 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 35 def (order) render partial: '/nimbleshop_authorizedotnet/payments/payment_info_for_buyer', locals: { order: order } end |
#nimbleshop_authorizedotnet_picture_on_admin_payment_methods ⇒ Object
14 15 16 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 14 def image_tag 'engines/nimbleshop_authorizedotnet/authorizedotnet_big.png', alt: 'authorizedotnet logo' end |
#nimbleshop_authorizedotnet_small_image ⇒ Object
10 11 12 |
# File 'app/helpers/nimbleshop_authorizedotnet/exposed_helper.rb', line 10 def image_tag 'engines/nimbleshop_authorizedotnet/authorizedotnet_small.png', alt: 'authorizedotnet icon' end |