summaryrefslogtreecommitdiff
path: root/billing/app/views/payments
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-06-11 12:16:13 -0700
committerAzul <azul@leap.se>2013-07-17 10:47:14 +0200
commitd3e4489cc4833c196eeef77f4fe0680c3f7e7a09 (patch)
treeeb71cac652850e60f9a7669aba8beb856a8459ea /billing/app/views/payments
parent888baf7539e131a6201dd6f53a152eeaeb8a0f94 (diff)
More cleanup of billing code.
Diffstat (limited to 'billing/app/views/payments')
-rw-r--r--billing/app/views/payments/_transaction_details.html.haml2
-rw-r--r--billing/app/views/payments/new.html.haml5
2 files changed, 5 insertions, 2 deletions
diff --git a/billing/app/views/payments/_transaction_details.html.haml b/billing/app/views/payments/_transaction_details.html.haml
index 53483d9..030639e 100644
--- a/billing/app/views/payments/_transaction_details.html.haml
+++ b/billing/app/views/payments/_transaction_details.html.haml
@@ -7,7 +7,7 @@
Status:
= transaction.status
Date
- = transaction.created_at
+ = transaction.created_at.strftime("%Y-%m-%d")
- if sub_start = transaction.subscription_details.billing_period_start_date
From subscription which started
= sub_start
diff --git a/billing/app/views/payments/new.html.haml b/billing/app/views/payments/new.html.haml
index d1d0aa9..14f6697 100644
--- a/billing/app/views/payments/new.html.haml
+++ b/billing/app/views/payments/new.html.haml
@@ -1,9 +1,12 @@
%h1
Payment
-- if @result
+- if @result and @result.errors.size > 0
%div{:style => "color: red;"}
= h @result.errors.size
error(s)
+- if @result and @result.transaction.status == 'processor_declined'
+ %div{:style => "color: red;"}
+ Processor Declined
= form_for :transaction, :params => @result && @result.params[:transaction], :errors => @result && @result.errors.for(:transaction), :builder => BraintreeFormHelper::BraintreeFormBuilder, :url => Braintree::TransparentRedirect.url, :html => {:autocomplete => "off"} do |f| #TODO: add helper
= f.label :amount, "Amount"
= f.text_field :amount