Module: StripeHelper

Defined in:
app/helpers/stripe_helper.rb,
lib/generators/templates/helper.rb

Instance Method Summary collapse

Instance Method Details

#stripe_admin_credit_card_data(order) ⇒ Object



19
20
21
# File 'app/helpers/stripe_helper.rb', line 19

def stripe_admin_credit_card_data order
    render 'admin/order_credit_card_data', format: [:html], order: order
end

#stripe_application_layoutObject



15
16
17
# File 'app/helpers/stripe_helper.rb', line 15

def stripe_application_layout 
    render 'layout/meta_tags', format: [:html]
end

#stripe_checkout_fields(f) ⇒ Object



3
4
5
6
7
# File 'app/helpers/stripe_helper.rb', line 3

def stripe_checkout_fields f
    render "themes/#{Store.settings.theme.name}/carts/stripe_credit_card_form", format: [:html], f: f
rescue ActionView::MissingTemplate
    render 'carts/stripe_credit_card_form', format: [:html], f: f
end

#stripe_credit_card_data(order) ⇒ Object



9
10
11
12
13
# File 'app/helpers/stripe_helper.rb', line 9

def stripe_credit_card_data order
    render "themes/#{Store.settings.theme.name}/orders/credit_card_data", format: [:html], order: order
rescue ActionView::MissingTemplate
    render 'orders/credit_card_data', format: [:html], order: order
end

#stripe_form_tag(f) ⇒ Object



3
4
5
# File 'lib/generators/templates/helper.rb', line 3

def stripe_form_tag f
    raw("<div class='paypal-form-wrapper'>#{f.radio_button(:payment_type, 'paypal', checked: true)}#{image_tag('paypal-icon.png')}</div>")
end

#stripe_store_setting_fields(f) ⇒ Object



23
24
25
# File 'app/helpers/stripe_helper.rb', line 23

def stripe_store_setting_fields f
    render 'admin/store_setting_fields', format: [:html], f: f
end