Skip to content

Commit

Permalink
add the stripe stamp to the payment confirmation email
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Fuchs committed Feb 6, 2012
1 parent 5a62230 commit 50c85be
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 36 deletions.
63 changes: 33 additions & 30 deletions app/views/order_mailer/_invoice.html.haml
@@ -1,34 +1,37 @@
%h2 Invoice
#invoice
%h2 Invoice

%dl
%dt Number
%dd= "CF%09d" % order.id
%dt Date
%dd= l Time.now, :format => :short
%dt= order.subscription? ? 'Subscription' : 'Package'
%dd= order.package.name
%dt Price
- if order.add_vat?
%dd
#{number_to_currency order.package.price_with_vat_in_dollars}
(#{number_to_currency order.package.price_in_dollars} plus #{number_to_currency order.package.vat_in_dollars} VAT, which equals 19%)
- else
%dd= number_to_currency order.total_in_dollars
%img.stamp{src: encoded_image('logos/stripe-stamp-111x103.png')}

- if order.subscription?
%p The payment for this subscription will be due on a monthly base and billed on your credit card by our payment partner.
%dl
%dt Number
%dd= "CF%09d" % order.id
%dt Date
%dd= l Time.now, :format => :short
%dt= order.subscription? ? 'Subscription' : 'Package'
%dd= order.package.name
%dt Price
- if order.add_vat?
%dd
#{number_to_currency order.package.price_with_vat_in_dollars}
(#{number_to_currency order.package.price_in_dollars} plus #{number_to_currency order.package.vat_in_dollars} VAT, which equals 19%)
- else
%dd= number_to_currency order.total_in_dollars

%h3 Your address
%dl
- %w(name street city zip state country).each do |attr|
- if order.billing_address.send(attr).present?
%dt= attr.camelize
%dd= order.billing_address.send(attr)
- if order.subscription?
%p The payment for this subscription will be due on a monthly base and billed on your credit card by our payment partner.

%p.footnotes
Travis CI GmbH, Prinzessinenstr. 20, 10969 Berlin, Germany, VAT ID: (in Gründung), CEOs: Sven Fuchs and Joshua Kalderimis,
Register Berlin (in Gründung)
%p.footnotes
We use Stripe Inc., 522 Ramona St, Palo Alto, CA 94391, U.S.A., as our payment partner. All payments made via Stripe are routed to us by our clearing agent JumpstartLab, Jeff Casimir, 3634 Georgia Ave NW, Washington, DC 20010, U.S.A.
%p.footnotes
Contributions and payments to travis-ci.org or Travis CI GmbH are not deductible as charitable contributions for federal income tax purposes. However, they may be deductible under other provisions of the Internal Revenue Code (for US) or your local tax authority's advice.
%h3 Your address
%dl
- %w(name street city zip state country).each do |attr|
- if order.billing_address.send(attr).present?
%dt= attr.camelize
%dd= order.billing_address.send(attr)

%p.footnotes
Travis CI GmbH, Prinzessinenstr. 20, 10969 Berlin, Germany, VAT ID: (in Gründung), CEOs: Joshua Kalderimis and Sven Fuchs,
Register Berlin (in Gründung)
%p.footnotes
We use Stripe Inc., 522 Ramona St, Palo Alto, CA 94391, U.S.A., as our payment partner. All payments made via Stripe are routed to us by our clearing agent JumpstartLab, Jeff Casimir, 3634 Georgia Ave NW, Washington, DC 20010, U.S.A.
%p.footnotes
Contributions and payments to travis-ci.org or Travis CI GmbH are not deductible as charitable contributions for federal income tax purposes. However, they may be deductible under other provisions of the Internal Revenue Code (for US) or your local tax authority's advice.
12 changes: 6 additions & 6 deletions db/schema.rb
Expand Up @@ -23,8 +23,8 @@
t.string "city"
t.string "state"
t.string "country"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

create_table "orders", :force => true do |t|
Expand All @@ -33,8 +33,8 @@
t.integer "total"
t.boolean "subscription", :default => false, :null => false
t.text "comment"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.boolean "active", :default => true, :null => false
t.datetime "cancelled_at"
t.text "message"
Expand Down Expand Up @@ -64,8 +64,8 @@
t.boolean "company", :default => true
t.string "stripe_plan"
t.string "stripe_customer_id"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

end
5 changes: 5 additions & 0 deletions public/assets/email.css
@@ -1,4 +1,5 @@
html, body {
position: relative;
margin: 0;
padding: 0;
width: 800px;
Expand Down Expand Up @@ -93,6 +94,10 @@ p sup {
p.footnotes {
margin-top: 20px;
}
#invoice .stamp {
position: absolute;
right: 220px;
}

footer {
margin: 40px -20px 0 -20px;
Expand Down
Binary file modified public/images/logos/stripe-stamp-111x103.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 50c85be

Please sign in to comment.