2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 {* This template is used for adding/configuring Payment Processors used by a particular site/domain. *}
27 <h3>{if $action eq 1}{ts}New Payment Processor{/ts}{elseif $action eq 2}{ts}Edit Payment Processor{/ts}{else}{ts}Delete Payment Processor{/ts}{/if}</h3>
28 <div class="crm-block crm-form-block crm-paymentProcessor-form-block">
29 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
32 <div class="messages status no-popup">
33 <div class="icon inform-icon"></div>
34 {$deleteMessage|escape}
37 <table class="form-layout-compressed">
38 {* This works for the fields managed from the EntityFields trait - see RelationshipType.tpl for end goal in this tpl *}
39 {foreach from=$entityFields item=fieldSpec}
40 {assign var=fieldName value=$fieldSpec.name}
41 <tr class="crm-{$entityInClassFormat}-form-block-{$fieldName}">
42 {include file="CRM/Core/Form/Field.tpl"}
46 <tr class="crm-paymentProcessor-form-block-financial_account">
47 <td class="label">{$form.financial_account_id.label}</td>
49 {if $financialAccount}
50 {$form.financial_account_id.html}
52 {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialAccount' q="reset=1"}{/capture}
53 {ts 1=$ftUrl}There are no financial accounts configured with Financial Account Type 'Asset' Type. <a href='%1'>Click here</a> if you want to configure financial accounts for your site.{/ts}
57 <tr class="crm-paymentProcessor-form-block-payment-instrument-id">
58 <td class="label">{$form.payment_instrument_id.label}</td><td>{$form.payment_instrument_id.html}</td>
60 <tr class="crm-paymentProcessor-form-block-is_active">
61 <td></td><td>{$form.is_active.html} {$form.is_active.label}</td>
63 <tr class="crm-paymentProcessor-form-block-is_default">
64 <td></td><td>{$form.is_default.html} {$form.is_default.label}</td>
66 <tr class="crm-paymentProcessor-form-block-accept_credit_cards">
67 <td class="label">{$form.accept_credit_cards.label}</td><td>{$form.accept_credit_cards.html}<br />
68 <span class="description">{ts}Select Credit Card Types that this payment processor can accept{/ts}</span></td>
72 <legend>{ts}Processor Details for Live Payments{/ts}</legend>
73 <table class="form-layout-compressed">
74 <tr class="crm-paymentProcessor-form-block-user_name">
75 <td class="label">{$form.user_name.label}</td><td>{$form.user_name.html} {help id=$ppTypeName|cat:'-live-user-name' title=$form.user_name.label}</td>
78 <tr class="crm-paymentProcessor-form-block-password">
79 <td class="label">{$form.password.label}</td><td>{$form.password.html} {help id=$ppTypeName|cat:'-live-password' title=$form.password.label}</td>
83 <tr class="crm-paymentProcessor-form-block-signature">
84 <td class="label">{$form.signature.label}</td><td>{$form.signature.html} {help id=$ppTypeName|cat:'-live-signature' title=$form.signature.label}</td>
88 <tr class="crm-paymentProcessor-form-block-subject">
89 <td class="label">{$form.subject.label}</td><td>{$form.subject.html} {help id=$ppTypeName|cat:'-live-subject' title=$form.subject.label}</td>
92 <tr class="crm-paymentProcessor-form-block-url_site">
93 <td class="label">{$form.url_site.label}</td><td>{$form.url_site.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-site' title=$form.url_site.label}</td>
96 <tr class="crm-paymentProcessor-form-block-url_api">
97 <td class="label">{$form.url_api.label}</td><td>{$form.url_api.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-api' title=$form.url_api.label}</td>
101 <tr class="crm-paymentProcessor-form-block-url_recur">
102 <td class="label">{$form.url_recur.label}</td><td>{$form.url_recur.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-recur' title=$form.url_recur.label}</td>
105 {if $form.url_button}
106 <tr class="crm-paymentProcessor-form-block-url_button">
107 <td class="label">{$form.url_button.label}</td><td>{$form.url_button.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-button' title=$form.url_button.label}</td>
114 <legend>{ts}Processor Details for Test Payments{/ts}</legend>
115 <table class="form-layout-compressed">
116 <tr class="crm-paymentProcessor-form-block-test_user_name">
117 <td class="label">{$form.test_user_name.label}</td><td>{$form.test_user_name.html} {help id=$ppTypeName|cat:'-test-user-name' title=$form.test_user_name.label}</td></tr>
118 {if $form.test_password}
119 <tr class="crm-paymentProcessor-form-block-test_password">
120 <td class="label">{$form.test_password.label}</td><td>{$form.test_password.html} {help id=$ppTypeName|cat:'-test-password' title=$form.test_password.label}</td>
123 {if $form.test_signature}
124 <tr class="crm-paymentProcessor-form-block-test_signature">
125 <td class="label">{$form.test_signature.label}</td><td>{$form.test_signature.html} {help id=$ppTypeName|cat:'-test-signature' title=$form.test_signature.label}</td>
128 {if $form.test_subject}
129 <tr class="crm-paymentProcessor-form-block-test_subject">
130 <td class="label">{$form.test_subject.label}</td><td>{$form.test_subject.html} {help id=$ppTypeName|cat:'-test-subject' title=$form.test_subject.label}</td>
133 <tr class="crm-paymentProcessor-form-block-test_url_site">
134 <td class="label">{$form.test_url_site.label}</td><td>{$form.test_url_site.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-site' title=$form.test_url_site.label}</td>
136 {if $form.test_url_api}
137 <tr class="crm-paymentProcessor-form-block-test_url_api">
138 <td class="label">{$form.test_url_api.label}</td><td>{$form.test_url_api.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-api' title=$form.test_url_api.label}</td>
142 <tr class="crm-paymentProcessor-form-block-test_url_recur">
143 <td class="label">{$form.test_url_recur.label}</td><td>{$form.test_url_recur.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-recur' title=$form.test_url_recur.label}</td>
146 {if $form.test_url_button}
147 <tr class="crm-paymentProcessor-form-block-test_url_button">
148 <td class="label">{$form.test_url_button.label}</td><td>{$form.test_url_button.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-button' title=$form.test_url_button.label}</td>
153 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
157 {if $action eq 1 or $action eq 2}
158 <script type="text/javascript">
160 function reload(refresh) {
161 var paymentProcessorType = cj("#payment_processor_type_id");
162 var url = {/literal}"{$refreshURL}"{literal} + "&pp=" + paymentProcessorType.val();
163 paymentProcessorType.closest('form').attr('data-warn-changes', 'false');
164 window.location.href = url;