From d3e4489cc4833c196eeef77f4fe0680c3f7e7a09 Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 11 Jun 2013 12:16:13 -0700 Subject: More cleanup of billing code. --- billing/app/views/payments/new.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'billing/app/views/payments/new.html.haml') 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 -- cgit v1.2.3