1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Added Canadian payment fees

This commit is contained in:
Hillel Coren 2017-04-02 22:07:25 +03:00
parent 02c8a76ee3
commit 627aaa7e01

View File

@ -42,16 +42,17 @@
@if (WEPAY_ENABLE_CANADA)
<div id="wepay-country">
{!! Former::radios('country')
->radios([
trans('texts.united_states') => ['value' => 'US'],
trans('texts.canada') => ['value' => 'CA'],
]) !!}
{!! Former::radios('country')
->radios([
trans('texts.united_states') => ['value' => 'US'],
trans('texts.canada') => ['value' => 'CA'],
]) !!}
</div>
<div id="wepay-accept-debit">
{!! Former::checkbox('debit_cards')
->text(trans('texts.accept_debit_cards'))
->value(1) !!}
{!! Former::checkbox('debit_cards')
->text(trans('texts.accept_debit_cards'))
->value(1) !!}
</div>
@endif
@ -77,7 +78,73 @@
['link'=>'<a id="wepay-tos-link" href="https://go.wepay.com/terms-of-service-us" target="_blank">'.trans('texts.wepay_tos_link_text').'</a>']
))->value('true')
->inlineHelp('standard_fees_apply') !!}
</div>
</div>
<center>
<table id="canadaFees" width="80%" style="border: solid 1px black;display:none;margin-bottom:40px">
<tr style="border: solid 1px black">
<th colspan="2" style="text-align:center;padding: 4px">
Fees Disclosure Box
</th>
</tr>
<tr style="border: solid 1px black;vertical-align:top">
<td style="border-left: solid 1px black; padding: 8px">
<h4>Payment Card Type</h4>
(These are the most common domestically issued card types
and processing methods. They do not represent all the
possible fees and variations that are charged to the
merchants.)
</td>
<td style="padding: 8px">
<h4>Processing Method: Card Not Present</h4>
(Means that the card/device was not
electronically read. Generally, the card
information is manually key-entered, e.g. online
payment)
</td>
</tr>
@foreach ([
'Visa Consumer Credit',
'Visa Infinite',
'Visa Infinite Privilege',
'Visa Business',
'Visa Business Premium',
'Visa Corporate',
'Visa Prepaid',
'Visa Debit',
'MasterCard Consumer Credit',
'MasterCard World',
'MasterCard World Elite',
'MasterCard Business/Corporate',
'MasterCard Debit',
'MasterCard Prepaid',
'American Express',
] as $type)
<tr>
<td style="border-left: solid 1px black;padding-left:8px;padding-top:4px;">
{{ $type }}
</td>
<td style="text-align:center">
2.9% + CA$0.30
</td>
</tr>
@endforeach
<tr style="border: solid 1px black;">
<th colspan="2" style="text-align:center;padding: 4px">
Other Fees Disclosure Box
</td>
</tr>
<tr style="border: solid 1px black;">
<td style="border-left: solid 1px black;padding-left:8px;padding-top:4px;">
Chargeback
</td>
<td style="text-align:center">
CA$15.00
</td>
</tr>
</table>
</center>
</div>
<br/>
@ -98,9 +165,10 @@
$('#wepay-country input').change(handleCountryChange)
function handleCountryChange(){
var country = $('#wepay-country input:checked').val();
if(country) {
if (country) {
$('#wepay-accept-debit').toggle(country == 'CA');
$('#wepay-tos-link').attr('href', 'https://go.wepay.com/terms-of-service-' + country.toLowerCase());
$('#canadaFees').toggle(country == 'CA');
}
}
handleCountryChange();