From b7e105aa6e0fc356aadfc410cf707a9a56c0bae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:31:18 +0200 Subject: [PATCH 01/15] Scaffold `Bancontact` --- app/PaymentDrivers/Mollie/Bancontact.php | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/PaymentDrivers/Mollie/Bancontact.php diff --git a/app/PaymentDrivers/Mollie/Bancontact.php b/app/PaymentDrivers/Mollie/Bancontact.php new file mode 100644 index 000000000000..2755df9b233f --- /dev/null +++ b/app/PaymentDrivers/Mollie/Bancontact.php @@ -0,0 +1,28 @@ + Date: Fri, 24 Sep 2021 23:31:42 +0200 Subject: [PATCH 02/15] Define `Bancontact` constant --- app/Models/GatewayType.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Models/GatewayType.php b/app/Models/GatewayType.php index 5be577bb6a6c..fff2ff227fb0 100644 --- a/app/Models/GatewayType.php +++ b/app/Models/GatewayType.php @@ -25,6 +25,7 @@ class GatewayType extends StaticModel const APPLE_PAY = 8; const SEPA = 9; const CREDIT = 10; + const BANCONTACT = 12; public function gateway() { From a876794badb042a6bfd6f6987467b98bd817f6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:32:17 +0200 Subject: [PATCH 03/15] Add `Bancontact` to Gateway --- app/Models/Gateway.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Models/Gateway.php b/app/Models/Gateway.php index 4414a685c9b0..cf44d88e9e62 100644 --- a/app/Models/Gateway.php +++ b/app/Models/Gateway.php @@ -90,6 +90,7 @@ class Gateway extends StaticModel case 7: return [ GatewayType::CREDIT_CARD => ['refund' => false, 'token_billing' => true], // Mollie + GatewayType::BANCONTACT => ['refund' => false, 'token_billing' => false], ]; case 15: return [GatewayType::PAYPAL => ['refund' => true, 'token_billing' => false]]; //Paypal From bb2d920e04814e03ec3a99d0f5274b1a05152bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:36:17 +0200 Subject: [PATCH 04/15] Add `Bancontact` to MolliePaymentDriver --- app/PaymentDrivers/MolliePaymentDriver.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/PaymentDrivers/MolliePaymentDriver.php b/app/PaymentDrivers/MolliePaymentDriver.php index 1bffcca72cdf..4611e325bfbf 100644 --- a/app/PaymentDrivers/MolliePaymentDriver.php +++ b/app/PaymentDrivers/MolliePaymentDriver.php @@ -24,6 +24,7 @@ use App\Models\Payment; use App\Models\PaymentHash; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Mollie\Bancontact; use App\PaymentDrivers\Mollie\CreditCard; use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\Validator; @@ -64,6 +65,7 @@ class MolliePaymentDriver extends BaseDriver */ public static $methods = [ GatewayType::CREDIT_CARD => CreditCard::class, + GatewayType::BANCONTACT => Bancontact::class, ]; const SYSTEM_LOG_TYPE = SystemLog::TYPE_MOLLIE; @@ -84,6 +86,7 @@ class MolliePaymentDriver extends BaseDriver $types = []; $types[] = GatewayType::CREDIT_CARD; + $types[] = GatewayType::BANCONTACT; return $types; } From 00a5c9882c367a12d25e745a408710db8428c694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:36:40 +0200 Subject: [PATCH 05/15] Initialize MollieApiClient --- app/PaymentDrivers/Mollie/Bancontact.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/PaymentDrivers/Mollie/Bancontact.php b/app/PaymentDrivers/Mollie/Bancontact.php index 2755df9b233f..50488495b99e 100644 --- a/app/PaymentDrivers/Mollie/Bancontact.php +++ b/app/PaymentDrivers/Mollie/Bancontact.php @@ -15,9 +15,19 @@ namespace App\PaymentDrivers\Mollie; use App\Http\Requests\Request; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; use App\PaymentDrivers\Common\MethodInterface; +use App\PaymentDrivers\MolliePaymentDriver; class Bancontact implements MethodInterface { + protected MolliePaymentDriver $mollie; + + public function __construct(MolliePaymentDriver $mollie) + { + $this->mollie = $mollie; + + $this->mollie->init(); + } + public function authorizeView(array $data) { } public function authorizeResponse(Request $request) { } From 20fa79d51ad6d725a850960b51f8f25602a4e104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:38:33 +0200 Subject: [PATCH 06/15] Authorization --- app/PaymentDrivers/Mollie/Bancontact.php | 24 +++++++++++++++++-- resources/lang/en/texts.php | 1 + .../mollie/bancontact/authorize.blade.php | 8 +++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 resources/views/portal/ninja2020/gateways/mollie/bancontact/authorize.blade.php diff --git a/app/PaymentDrivers/Mollie/Bancontact.php b/app/PaymentDrivers/Mollie/Bancontact.php index 50488495b99e..38dc27ce39b5 100644 --- a/app/PaymentDrivers/Mollie/Bancontact.php +++ b/app/PaymentDrivers/Mollie/Bancontact.php @@ -16,6 +16,8 @@ use App\Http\Requests\Request; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\MolliePaymentDriver; +use Illuminate\Http\RedirectResponse; +use Illuminate\View\View; class Bancontact implements MethodInterface { @@ -28,9 +30,27 @@ class Bancontact implements MethodInterface $this->mollie->init(); } - public function authorizeView(array $data) { } + /** + * Show the authorization page for Bancontact. + * + * @param array $data + * @return View + */ + public function authorizeView(array $data): View + { + return render('gateways.mollie.bancontact.authorize', $data); + } - public function authorizeResponse(Request $request) { } + /** + * Handle the authorization for Bancontact. + * + * @param Request $request + * @return RedirectResponse + */ + public function authorizeResponse(Request $request): RedirectResponse + { + return redirect()->route('client.payment_methods.index'); + } public function paymentView(array $data) { } diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 04f3816d3927..bb078c1f043b 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -4313,6 +4313,7 @@ $LANG = array( 'unable_to_verify_payment_method' => 'Unable to verify payment method.', 'generic_gateway_error' => 'Gateway configuration error. Please check your credentials.', 'my_documents' => 'My documents', + 'payment_method_cannot_be_preauthorized' => 'This payment method cannot be preauthorized.', ); return $LANG; diff --git a/resources/views/portal/ninja2020/gateways/mollie/bancontact/authorize.blade.php b/resources/views/portal/ninja2020/gateways/mollie/bancontact/authorize.blade.php new file mode 100644 index 000000000000..7d739d29532d --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/mollie/bancontact/authorize.blade.php @@ -0,0 +1,8 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Bancontact', 'card_title' => +'Bancontact']) + +@section('gateway_content') + @component('portal.ninja2020.components.general.card-element-single') + {{ __('texts.payment_method_cannot_be_preauthorized') }} + @endcomponent +@endsection \ No newline at end of file From 33b6c05d41b094198304f327c0cea8f04385cb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:39:58 +0200 Subject: [PATCH 07/15] Add new `PaymentType` --- app/Models/PaymentType.php | 1 + ...213858_add_bancontact_to_payment_types.php | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 database/migrations/2021_09_24_213858_add_bancontact_to_payment_types.php diff --git a/app/Models/PaymentType.php b/app/Models/PaymentType.php index b6b28cd4c8f1..dcb82f5f0508 100644 --- a/app/Models/PaymentType.php +++ b/app/Models/PaymentType.php @@ -42,6 +42,7 @@ class PaymentType extends StaticModel const SEPA = 29; const GOCARDLESS = 30; const CRYPTO = 31; + const BANCONTACT = 36; public static function parseCardType($cardName) { diff --git a/database/migrations/2021_09_24_213858_add_bancontact_to_payment_types.php b/database/migrations/2021_09_24_213858_add_bancontact_to_payment_types.php new file mode 100644 index 000000000000..a4daab9c6821 --- /dev/null +++ b/database/migrations/2021_09_24_213858_add_bancontact_to_payment_types.php @@ -0,0 +1,26 @@ +id = 35; + $type->name = 'Bancontact'; + $type->gateway_type_id = GatewayType::BANCONTACT; + + $type->save(); + } +} From 3de65175b7b7ac6a6f1f88da54f8f61d40086e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:46:16 +0200 Subject: [PATCH 08/15] Payments --- app/PaymentDrivers/Mollie/Bancontact.php | 162 ++++++++++++++++++++++- 1 file changed, 160 insertions(+), 2 deletions(-) diff --git a/app/PaymentDrivers/Mollie/Bancontact.php b/app/PaymentDrivers/Mollie/Bancontact.php index 38dc27ce39b5..53199e8eee55 100644 --- a/app/PaymentDrivers/Mollie/Bancontact.php +++ b/app/PaymentDrivers/Mollie/Bancontact.php @@ -12,8 +12,15 @@ namespace App\PaymentDrivers\Mollie; +use App\Exceptions\PaymentFailed; use App\Http\Requests\Request; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; +use App\Jobs\Mail\PaymentFailureMailer; +use App\Jobs\Util\SystemLogger; +use App\Models\GatewayType; +use App\Models\Payment; +use App\Models\PaymentType; +use App\Models\SystemLog; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\MolliePaymentDriver; use Illuminate\Http\RedirectResponse; @@ -52,7 +59,158 @@ class Bancontact implements MethodInterface return redirect()->route('client.payment_methods.index'); } - public function paymentView(array $data) { } + /** + * Show the payment page for Bancontact. + * + * @param array $data + * @return Redirector|RedirectResponse + */ + public function paymentView(array $data) + { + $this->mollie->payment_hash + ->withData('gateway_type_id', GatewayType::BANCONTACT) + ->withData('client_id', $this->mollie->client->id); - public function paymentResponse(PaymentResponseRequest $request) { } + try { + $payment = $this->mollie->gateway->payments->create([ + 'method' => 'bancontact', + 'amount' => [ + 'currency' => $this->mollie->client->currency()->code, + 'value' => $this->mollie->convertToMollieAmount((float) $this->mollie->payment_hash->data->amount_with_fee), + ], + 'description' => \sprintf('Invoices: %s', collect($data['invoices'])->pluck('invoice_number')), + 'redirectUrl' => route('client.payments.response', [ + 'company_gateway_id' => $this->mollie->company_gateway->id, + 'payment_hash' => $this->mollie->payment_hash->hash, + 'payment_method_id' => GatewayType::BANCONTACT, + ]), + 'webhookUrl' => $this->mollie->company_gateway->webhookUrl(), + 'metadata' => [ + 'client_id' => $this->mollie->client->hashed_id, + ], + ]); + + $this->mollie->payment_hash->withData('payment_id', $payment->id); + + return redirect( + $payment->getCheckoutUrl() + ); + } catch (\Mollie\Api\Exceptions\ApiException | \Exception $exception) { + return $this->processUnsuccessfulPayment($exception); + } + } + + /** + * Handle unsuccessful payment. + * + * @param Exception $exception + * @throws PaymentFailed + * @return void + */ + public function processUnsuccessfulPayment(\Exception $exception): void + { + PaymentFailureMailer::dispatch( + $this->mollie->client, + $exception->getMessage(), + $this->mollie->client->company, + $this->mollie->payment_hash->data->amount_with_fee + ); + + SystemLogger::dispatch( + $exception->getMessage(), + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_FAILURE, + SystemLog::TYPE_MOLLIE, + $this->mollie->client, + $this->mollie->client->company, + ); + + throw new PaymentFailed($exception->getMessage(), $exception->getCode()); + } + + + /** + * Handle the payments for the KBC. + * + * @param PaymentResponseRequest $request + * @return mixed + */ + public function paymentResponse(PaymentResponseRequest $request) + { + if (!\property_exists($this->mollie->payment_hash->data, 'payment_id')) { + return $this->processUnsuccessfulPayment( + new PaymentFailed('Whoops, something went wrong. Missing required [payment_id] parameter. Please contact administrator. Reference hash: ' . $this->mollie->payment_hash->hash) + ); + } + + try { + $payment = $this->mollie->gateway->payments->get( + $this->mollie->payment_hash->data->payment_id + ); + + if ($payment->status === 'paid') { + return $this->processSuccessfulPayment($payment); + } + + if ($payment->status === 'open') { + return $this->processOpenPayment($payment); + } + + if ($payment->status === 'failed') { + return $this->processUnsuccessfulPayment( + new PaymentFailed(ctrans('texts.status_failed')) + ); + } + + return $this->processUnsuccessfulPayment( + new PaymentFailed(ctrans('texts.status_voided')) + ); + } catch (\Mollie\Api\Exceptions\ApiException | \Exception $exception) { + return $this->processUnsuccessfulPayment($exception); + } + } + + /** + * Handle the successful payment for Bancontact. + * + * @param string $status + * @param ResourcesPayment $payment + * @return RedirectResponse + */ + public function processSuccessfulPayment(\Mollie\Api\Resources\Payment $payment, string $status = 'paid'): RedirectResponse + { + $data = [ + 'gateway_type_id' => GatewayType::BANCONTACT, + 'amount' => array_sum(array_column($this->mollie->payment_hash->invoices(), 'amount')) + $this->mollie->payment_hash->fee_total, + 'payment_type' => PaymentType::BANCONTACT, + 'transaction_reference' => $payment->id, + ]; + + $payment_record = $this->mollie->createPayment( + $data, + $status === 'paid' ? Payment::STATUS_COMPLETED : Payment::STATUS_PENDING + ); + + SystemLogger::dispatch( + ['response' => $payment, 'data' => $data], + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_SUCCESS, + SystemLog::TYPE_MOLLIE, + $this->mollie->client, + $this->mollie->client->company, + ); + + return redirect()->route('client.payments.show', ['payment' => $this->mollie->encodePrimaryKey($payment_record->id)]); + } + + /** + * Handle 'open' payment status for Bancontact. + * + * @param ResourcesPayment $payment + * @return RedirectResponse + */ + public function processOpenPayment(\Mollie\Api\Resources\Payment $payment): RedirectResponse + { + return $this->processSuccessfulPayment($payment, 'open'); + } } From 9d460527523f15142aa3808ecfbde7c603daf523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:47:02 +0200 Subject: [PATCH 09/15] Scaffold BancontactTest --- .../Gateways/Mollie/BancontactTest.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php diff --git a/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php new file mode 100644 index 000000000000..9a2c536819bb --- /dev/null +++ b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php @@ -0,0 +1,40 @@ +driver->manage()->deleteAllCookies(); + } + + $this->disableCompanyGateways(); + + CompanyGateway::where('gateway_key', '1bd651fb213ca0c9d66ae3c336dc77e8')->restore(); + + $this->browse(function (Browser $browser) { + $browser + ->visit(new Login()) + ->auth(); + }); + } +} From a6564e321bd3b0c0f8b031921027c397a65e36e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:48:24 +0200 Subject: [PATCH 10/15] Tests: Successful payments --- .../Gateways/Mollie/BancontactTest.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php index 9a2c536819bb..4133c7c4934c 100644 --- a/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php +++ b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php @@ -17,7 +17,7 @@ use Laravel\Dusk\Browser; use Tests\DuskTestCase; use Tests\Browser\Pages\ClientPortal\Login; -class Bancontact extends DuskTestCase +class BancontactTest extends DuskTestCase { protected function setUp(): void { @@ -37,4 +37,20 @@ class Bancontact extends DuskTestCase ->auth(); }); } + + public function testSuccessfulPayment(): void + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('Undefined.') + ->waitForText('Test profile') + ->radio('final_state', 'paid') + ->press('Continue') + ->waitForText('Details of the payment') + ->assertSee('Completed'); + }); + } } From 79637d18d28ff79a493623fd2f8504a85dac30be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:48:58 +0200 Subject: [PATCH 11/15] Tests: Pending/open payments --- app/Models/CompanyGateway.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Models/CompanyGateway.php b/app/Models/CompanyGateway.php index 5be23f8a6a6d..90f15049f7aa 100644 --- a/app/Models/CompanyGateway.php +++ b/app/Models/CompanyGateway.php @@ -377,6 +377,7 @@ class CompanyGateway extends BaseModel public function webhookUrl() { + return 'https://invoiceninja.com'; return route('payment_webhook', ['company_key' => $this->company->company_key, 'company_gateway_id' => $this->hashed_id]); } From 29e006f950be957c2069d5a0ce01a4affe6e24b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 24 Sep 2021 23:51:39 +0200 Subject: [PATCH 12/15] Tests: Failed/canceled payments --- app/Models/CompanyGateway.php | 1 - .../Gateways/Mollie/BancontactTest.php | 46 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/app/Models/CompanyGateway.php b/app/Models/CompanyGateway.php index 90f15049f7aa..5be23f8a6a6d 100644 --- a/app/Models/CompanyGateway.php +++ b/app/Models/CompanyGateway.php @@ -377,7 +377,6 @@ class CompanyGateway extends BaseModel public function webhookUrl() { - return 'https://invoiceninja.com'; return route('payment_webhook', ['company_key' => $this->company->company_key, 'company_gateway_id' => $this->hashed_id]); } diff --git a/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php index 4133c7c4934c..9b5d79ef39c4 100644 --- a/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php +++ b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php @@ -53,4 +53,50 @@ class BancontactTest extends DuskTestCase ->assertSee('Completed'); }); } + + public function testOpenPayments(): void + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('Undefined.') + ->waitForText('Test profile') + ->radio('final_state', 'open') + ->press('Continue') + ->waitForText('Details of the payment') + ->assertSee('Pending'); + }); + } + + public function testFailedPayment(): void + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('Undefined.') + ->waitForText('Test profile') + ->radio('final_state', 'failed') + ->press('Continue') + ->waitForText('Failed.'); + }); + } + + public function testCancelledTest(): void + { + $this->browse(function (Browser $browser) { + $browser + ->visitRoute('client.invoices.index') + ->click('@pay-now') + ->press('Pay Now') + ->clickLink('Undefined.') + ->waitForText('Test profile') + ->radio('final_state', 'canceled') + ->press('Continue') + ->waitForText('Cancelled.'); + }); + } } From d4aef8da097722910dd6f2faf6fafbbdbe0a10a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Sun, 26 Sep 2021 21:10:13 +0200 Subject: [PATCH 13/15] Add translation for Bancontact --- resources/lang/en/texts.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index a7de19c42014..14df4963a7c2 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -4315,6 +4315,7 @@ $LANG = array( 'my_documents' => 'My documents', 'payment_method_cannot_be_preauthorized' => 'This payment method cannot be preauthorized.', 'kbc_cbc' => 'KBC/CBC', + 'bancontact' => 'Bancontact', ); return $LANG; From 6b8235999d0cf60319fcbb626a4562695f88fddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Sun, 26 Sep 2021 21:10:41 +0200 Subject: [PATCH 14/15] Add Bancontact to GatewayType --- app/Models/GatewayType.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Models/GatewayType.php b/app/Models/GatewayType.php index 3224d1b8024a..6435db19b0ef 100644 --- a/app/Models/GatewayType.php +++ b/app/Models/GatewayType.php @@ -71,6 +71,9 @@ class GatewayType extends StaticModel case self::KBC: return ctrans('texts.kbc_cbc'); break; + case self::BANCONTACT: + return ctrans('texts.bancontact'); + break; default: return 'Undefined.'; From 1849f2cc242e7ddd32d52294fbfcf6bf97e2ebff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Sun, 26 Sep 2021 21:12:37 +0200 Subject: [PATCH 15/15] Update tests --- .../ClientPortal/Gateways/Mollie/BancontactTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php index 9b5d79ef39c4..659a8cae6594 100644 --- a/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php +++ b/tests/Browser/ClientPortal/Gateways/Mollie/BancontactTest.php @@ -45,7 +45,7 @@ class BancontactTest extends DuskTestCase ->visitRoute('client.invoices.index') ->click('@pay-now') ->press('Pay Now') - ->clickLink('Undefined.') + ->clickLink('Bancontact') ->waitForText('Test profile') ->radio('final_state', 'paid') ->press('Continue') @@ -61,7 +61,7 @@ class BancontactTest extends DuskTestCase ->visitRoute('client.invoices.index') ->click('@pay-now') ->press('Pay Now') - ->clickLink('Undefined.') + ->clickLink('Bancontact') ->waitForText('Test profile') ->radio('final_state', 'open') ->press('Continue') @@ -77,7 +77,7 @@ class BancontactTest extends DuskTestCase ->visitRoute('client.invoices.index') ->click('@pay-now') ->press('Pay Now') - ->clickLink('Undefined.') + ->clickLink('Bancontact') ->waitForText('Test profile') ->radio('final_state', 'failed') ->press('Continue') @@ -92,7 +92,7 @@ class BancontactTest extends DuskTestCase ->visitRoute('client.invoices.index') ->click('@pay-now') ->press('Pay Now') - ->clickLink('Undefined.') + ->clickLink('Bancontact') ->waitForText('Test profile') ->radio('final_state', 'canceled') ->press('Continue')