Add some logic to check for a connected Stripe Account in form

This commit is contained in:
Steve Pettitt
2016-09-18 10:26:31 +01:00
committed by Rob Harrington
parent 8bdf57d0d9
commit b6292e2723
2 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
-# if @enterprise.has_stripe_connection?
-# Display Stripe account details
-# else
%a.stripe-connect{href: 'stripe_connect'}
- if stripe_account = @enterprise.stripe_account
= t :stripe_account_connected
= stripe_account.inspect
.span (Link to disconnect Stripe Acct)
- else
%a.stripe-connect{href: 'stripe_connect'}
.span= t :connect_with_stripe

View File

@@ -72,6 +72,7 @@ Openfoodnetwork::Application.routes.draw do
post :search
get :check_permalink
end
member do
get :shop
@@ -102,6 +103,7 @@ Openfoodnetwork::Application.routes.draw do
get "/stripe_connect", to: "enterprises#stripe_connect"
member do
get :welcome
put :register