 
     render_payment_methods: ->
 
+    render_error: ->
+        if @state.error
+            <ErrorDisplay error={@state.error} onClose={=>@setState(error:'')} />
+
     render: ->
         <Panel header={@render_header()}>
-            {@render_add_payment_method() if @state.adding_payment_method}
+            {@render_error()}
+            {@render_add_payment_method() if @state.state in ['add_new', 'submit']}
             {@render_payment_methods()}
         </Panel>
 

        </Row>

    render_add_payment_method_button: ->
        if @state.adding_payment_method
            return
        <Button onClick={@add_payment_method} bsStyle='primary' style={float: "right"}>
            <Icon name="plus-circle" /> Add Payment Method...
        </Button>


        x = misc.copy(@state.new_payment_info)
        x[field] = value ? @refs[ref].getValue()
        @setState(new_payment_info: x)

    render_input_card_number: ->
        <Input ref="input_card_number" type="text" size="20" placeholder="1234 5678 9012 3456"
