-
Notifications
You must be signed in to change notification settings - Fork 33
/
bank.html
144 lines (141 loc) · 5.6 KB
/
bank.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{% extends "saas/base_dashboard.html" %}
{% block saas_title %}
<i class="fa fa-money"></i> {% trans organization=organization.printable_name %}{{organization}} Payment Processor{% endtrans %}
{% endblock %}
{% block saas_content %}
<div class="row">
{% if bank_name and bank_name != 'N/A' %}
<div class="col-sm-6">
<div class="card">
<div class="card-header text-white bg-primary">
Connected Processor
</div>
<div class="card-body">
<p class="card-text">
You will be able to create charges and payout funds with this processor.
</p>
<div>
<dl class="dl-horizontal">
<dt>{% trans %}Institution{% endtrans %}</dt>
<dd class="bank-name">
<span>{{bank_name}}</span>
</dd>
</dl>
<dl class="dl-horizontal">
<dt>{% trans %}Account Number{% endtrans %}</dt>
<dd class="last4">
<span>{{last4}}</span>
</dd>
</dl>
</div>
{% if urls.provider.deauthorize_processor %}
<button id="de-authorize-btn" class="btn btn-danger"
data-toggle="modal" data-target="#de-authorize">{% trans %}De-authorize{% endtrans %}</button>
{% endif %}
</div>
</div>
</div>
{% else %}
{% if urls.authorize_processor %}
<div class="col-sm-6">
<div class="card">
<div class="card-header text-white bg-primary">
Stripe Live Account
</div>
<div class="card-body">
<h5 class="card-title">Connect your Stripe account for production</h5>
<p class="card-text">
You will be able to create real charges on valid credit cards.
</p>
<p class="card-text">
If you already have a Stripe account, we recommend that you first login into
your Stripe account before clicking the button below.
</p>
<p class="card-text text-right">
<a href="https://stripe.com/login/" target="_blank">Login to Stripe »</a>
</p>
<a class="text-center" href="{{urls.authorize_processor}}">
<img class="img-fluid" src="{{'static/img/stripe-connect-blue-on-light2x.png'|djasset}}" />
</a>
</div>
</div>
</div>
{% endif %}
{% if urls.authorize_processor_test %}
<div class="col-sm-6">
<div class="card">
<div class="card-header">
Stripe Test Account
</div>
<div class="card-body">
<h5 class="card-title">Connect your Stripe account for staging</h5>
<p class="card-text">
You will be able to create test charges using
<a href="https://stripe.com/docs/testing#cards" target="_blank">Stripe test credit cards</a>.
</p>
<p class="card-text">
If you already have a Stripe account, we recommend that you first login into
your Stripe account before clicking the button below.
</p>
<p class="card-text text-right">
<a href="https://stripe.com/login/" target="_blank">Login to Stripe »</a>
</p>
<a class="text-center" href="{{urls.authorize_processor_test}}">
<img class="img-fluid" src="{{'static/img/stripe-connect-light-on-light2x.png'|djasset}}" />
</a>
</div>
</div>
</div>
{% endif %}
{% if not (urls.authorize_processor or urls.authorize_processor_test) %}
{# dealing with a misconfigured platform #}
<div class="col-sm-6">
<div class="card">
<div class="card-header text-white bg-warning">
<i class="fa fa-exclamation-triangle"></i> Configure Settings
</div>
<div class="card-body">
<p class="card-text">
The configuration variables STRIPE_CLIENT_ID, STRIPE_PUB_KEY
and STRIPE_PRIV_KEY are invalid. You will need to retrieve
the StripeConnect ClientID, and the pair of publishable/private
API keys for your Stripe account on
<a href="https://stripe.com/" target="_blank">stripe.com</a>.
</p>
<p class="card-text">
Once you have those keys, write them in the <em>credentials</em>
configuration file and restart the server.
</p>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>
<div id="de-authorize" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="de-authorize" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
{% trans %}De-authorize{% endtrans %} ...
</div>
<div class="modal-body">
{% trans %}Please confirm you want to de-authorize access to your Stripe account. This will prevent you from charging customers.{% endtrans %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-dismiss="modal">{% trans %}Cancel{% endtrans %}</button>
<form style="display:inline-block;" method="post" action="{{urls.provider.deauthorize_processor}}">
<input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}">
<input type="hidden" name="stripeToken" value="{% trans %}OOPS{% endtrans %}" />
<button id="de-authorize-action-btn" type="submit"
class="btn btn-danger btn-ok">{% trans %}De-authorize{% endtrans %}</button>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
{% block saas_lead_help %}
{% trans organization=organization.printable_name %}Connect a payment processor to create charges on behalf of {{organization}}.{% endtrans %}
{% endblock %}