Module: Sanwo::Rails::Helper
- Defined in:
- lib/sanwo/rails/helper.rb
Overview
View helpers for rendering Sanwo checkout components in Rails templates.
The helpers delegate to the Client instance stored in
Rails.application.config.sanwo_client.
Instance Method Summary collapse
-
#sanwo_checkout(**opts) ⇒ String
Render a checkout button with inline JavaScript.
-
#sanwo_custom_amount(**opts) ⇒ String
Render a custom-amount checkout widget.
-
#sanwo_scripts ⇒ String
Render the
Render a checkout button with inline JavaScript.
31 32 33
# File 'lib/sanwo/rails/helper.rb', line 31 def sanwo_checkout(**opts) sanwo_client.render_checkout(**opts) end
#sanwo_custom_amount(**opts) ⇒ String
Render a custom-amount checkout widget.
39 40 41
# File 'lib/sanwo/rails/helper.rb', line 39 def sanwo_custom_amount(**opts) sanwo_client.render_custom_amount(**opts) end
#sanwo_scripts ⇒ String
Render the