Plugin uses the plugin wicked_pdf to build a PDF file. You can customize HTML-template.
Stripe Invoice PDF has been verified to work on Ruby versions 2.3.4 through 2.4; Rails 4.2.1 through 5.1
Add this line to your application's Gemfile:
gem 'stripe_invoice_pdf', git: 'https://github.com/nav-mike/stripe-invoice-pdf.git'
And then execute:
$ bundle install
Then create the initializer with
rails generate stripe_invoice_pdf
Open config/initializer/stripe_invoice_pdf.rb
and set Stripe's api_key
and your logo:
StripeInvoicePdf.config = {
api_key: 'sk_...',
company_logo: 'logo.png'
}
Run rails server rails s
and open http://0.0.0.0:3000/invoices/:invoice_id
.
More about invoice id here.
You can use svg logo. For this set company_logo
as "logo"
, without extension, more.
stripe-invoice-pdf use wicked_pdf for generate pdf. You can use GET parameter ?debug=1
for show pdf as html.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
The gem is available as open source under the terms of the MIT License.