Add translation for error message

This commit is contained in:
Lars Kusch 2023-01-20 09:01:37 +01:00
parent 3629caad34
commit 8cb650dd60
4 changed files with 11 additions and 5 deletions

View File

@ -4300,6 +4300,7 @@ $LANG = array(
'becs' => 'BECS Direct Debit',
'bacs' => 'BACS Direct Debit',
'payment_type_BACS' => 'BACS Direct Debit',
'missing_payment_method' => 'Please add a payment method first, before trying to pay.',
'becs_mandate' => 'By providing your bank account details, you agree to this <a class="underline" href="https://stripe.com/au-becs-dd-service-agreement/legal">Direct Debit Request and the Direct Debit Request service agreement</a>, and authorise Stripe Payments Australia Pty Ltd ACN 160 180 343 Direct Debit User ID number 507156 (“Stripe”) to debit your account through the Bulk Electronic Clearing System (BECS) on behalf of :company (the “Merchant”) for any amounts separately communicated to you by the Merchant. You certify that you are either an account holder or an authorised signatory on the account listed above.',
'you_need_to_accept_the_terms_before_proceeding' => 'You need to accept the terms before proceeding.',
'direct_debit' => 'Direct Debit',

View File

@ -62,9 +62,11 @@ class ProcessBACS {
})
);}
else{
this.errors.textContent = "Please add a payment method first, before trying to pay the invoice.";
this.errors.textContent = document.querySelector(
'meta[name=translation-payment-method-required]'
).content;
this.errors.hidden = false;
this.payNowButton.disabled = false;
this.payNowButton.disabled = true;
this.payNowButton.querySelector('span').classList.remove('hidden');
this.payNowButton.querySelector('svg').classList.add('hidden');
}}

View File

@ -62,9 +62,11 @@ class ProcessBACS {
})
);}
else{
this.errors.textContent = "Please add a payment method first, before trying to pay the invoice.";
this.errors.textContent = document.querySelector(
'meta[name=translation-payment-method-required]'
).content;
this.errors.hidden = false;
this.payNowButton.disabled = false;
this.payNowButton.disabled = true;
this.payNowButton.querySelector('span').classList.remove('hidden');
this.payNowButton.querySelector('svg').classList.add('hidden');
}}

View File

@ -8,6 +8,7 @@
<meta name="stripe-publishable-key" content="{{ $gateway->company_gateway->getPublishableKey() }}">
@endif
<meta name="only-authorization" content="">
<meta name="translation-payment-method-required" content="{{ ctrans('texts.missing_payment_method') }}">
@endsection
@section('gateway_content')