From a24c705ffcab70751677b5c8fded99c316d47cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 26 Oct 2021 16:41:17 +0200 Subject: [PATCH 1/4] Fixes for storing bank details --- app/PaymentDrivers/Stripe/BECS.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/PaymentDrivers/Stripe/BECS.php b/app/PaymentDrivers/Stripe/BECS.php index 8a9007a0e1c3..a0942c997202 100644 --- a/app/PaymentDrivers/Stripe/BECS.php +++ b/app/PaymentDrivers/Stripe/BECS.php @@ -141,8 +141,8 @@ class BECS $method = $this->stripe->getStripePaymentMethod($intent->payment_method); $payment_meta = new \stdClass; - $payment_meta->brand = (string) \sprintf('%s (%s)', $method->sepa_debit->bank_code, ctrans('texts.becs')); - $payment_meta->last4 = (string) $method->sepa_debit->last4; + $payment_meta->brand = (string) \sprintf('%s (%s)', $method->au_becs_debit->bank_code, ctrans('texts.becs')); + $payment_meta->last4 = (string) $method->au_becs_debit->last4; $payment_meta->state = 'authorized'; $payment_meta->type = GatewayType::BECS; From 461e0059bd68c25de7ea5add36287dfa08e175b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 26 Oct 2021 16:41:42 +0200 Subject: [PATCH 2/4] Allow BECS to show only for clients in Australia --- app/PaymentDrivers/StripePaymentDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index 93cc87f8cd85..6ae31452ba21 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -208,7 +208,7 @@ class StripePaymentDriver extends BaseDriver && $this->client->currency() && ($this->client->currency()->code == 'AUD') && isset($this->client->country) - && in_array($this->client->country->iso_3166_3, ["AUS", "DEU"])) + && in_array($this->client->country->iso_3166_3, ['AUS'])) $types[] = GatewayType::BECS; if ($this->client From 654e108b0effbd09389507d9897561d50e6bc302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 26 Oct 2021 16:43:13 +0200 Subject: [PATCH 3/4] Fixes for agreement formatting --- resources/lang/en/texts.php | 2 +- .../portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 441e7382691c..a748f2e9ee92 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -4328,7 +4328,7 @@ $LANG = array( 'giropay_law' => 'By entering your Customer information (such as name, sort code and account number) you (the Customer) agree that this information is given voluntarily.', 'eps' => 'EPS', 'becs' => 'BECS Direct Debit', - '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.', + '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', 'clone_to_expense' => 'Clone to expense', diff --git a/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php b/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php index cf52d7a8b501..6f8b31d373ea 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php @@ -22,7 +22,7 @@
- +
@endcomponent From 1072c36f89491e0d94b76f90baa86a9ad97f7b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 26 Oct 2021 16:44:50 +0200 Subject: [PATCH 4/4] Improve spacing on payment form --- .../ninja2020/gateways/stripe/becs/becs_debit.blade.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php b/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php index 6f8b31d373ea..c808818e0cc8 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/becs/becs_debit.blade.php @@ -12,15 +12,18 @@ -