#Render Transaction Button Helper
You can quickly and easily place a Stripe Checkout button on any page by simply using the
render_transaction_button
view helper:<%= render_transaction_button # Note the slash here to allow continuing the line below price_cents: 9900, merchant_name: "John's Cat Carriers", product_description: "Deluxe Cat Carrier", product_name: "Deluxe Cat Carrier", product_sku: "DELUXE-CAT-CARRIER", brand_image: "https://www.google.ca/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" %>
The helper can be configured with the following options:
Option | Description |
---|---|
custom_button_class | A custom CSS class to use on the Button |
custom_button_text_class | A custom CSS class to use on the text of the Button |
custom_button_spinner_class | Customize the Processing button spinner CSS class |
button_id | Customer the Button CSS ID |
button_default_text | The default Button text |
button_processing_text | The default Button processing state text |
button_show_price | Show the price in the button |
price_cents | Item price in cents |
currency | The currency to use |
price_currency_symbol | The currency symbol to use |
brand_image | A URL to a brand image |
merchant_name | A Merchant name to use |
product_description | A short description of the product |
locale | The locale to use |
collect_zip_code | Collect zip code during checkout? |
collect_billing_address | Collect billing address during checkout? |
collect_shipping_address | Collect shipping address during checkout? |
customer_email | Customer email to prefill the form with |
allow_remember_me | Allow customer to check 'Remember Me' |
panel_label | The label to give the form |
form_id | A custom CSS ID for the Stripe form |
product_sku | A Product SKU for your own records |
product_name | A name for the product |
When the form is rendered, an additional encrypted charge verification token is included in the form to prevent tampering with the price during form submission.