Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
145 lines (141 sloc) 5.6 KB
{% 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 &raquo;</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 &raquo;</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 %}
You can’t perform that action at this time.