diff --git a/lang/en/texts.php b/lang/en/texts.php index ac74fe95f352..d6272c281d5c 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -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 Direct Debit Request and the Direct Debit Request service agreement, 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', @@ -4909,7 +4910,7 @@ $LANG = array( 'export_company' => 'Create company backup', 'backup' => 'Backup', 'notification_purchase_order_created_body' => 'The following purchase_order :purchase_order was created for vendor :vendor for :amount.', - 'notification_purchase_order_created_subject' => 'Purchase Order :purchase_order was created for :vendor', + 'notification_purchase_order_created_subject' => 'Purchase Order :purchase_order was created for :vendor', 'notification_purchase_order_sent_subject' => 'Purchase Order :purchase_order was sent to :vendor', 'notification_purchase_order_sent' => 'The following vendor :vendor was emailed Purchase Order :purchase_order for :amount.', 'subscription_blocked' => 'This product is a restricted item, please contact the vendor for further information.', diff --git a/public/js/clients/payments/stripe-bacs.js b/public/js/clients/payments/stripe-bacs.js index f0ea7c92750a..a67c9057c588 100644 --- a/public/js/clients/payments/stripe-bacs.js +++ b/public/js/clients/payments/stripe-bacs.js @@ -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'); }} diff --git a/resources/js/clients/payments/stripe-bacs.js b/resources/js/clients/payments/stripe-bacs.js index f0ea7c92750a..a67c9057c588 100644 --- a/resources/js/clients/payments/stripe-bacs.js +++ b/resources/js/clients/payments/stripe-bacs.js @@ -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'); }} diff --git a/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php index 1a7f09531136..895d09fdae92 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php @@ -8,6 +8,7 @@ @endif + @endsection @section('gateway_content')