diff --git a/src/Payment/Method/Santander.php b/src/Payment/Method/Santander.php index 0a4e127..17883e7 100644 --- a/src/Payment/Method/Santander.php +++ b/src/Payment/Method/Santander.php @@ -24,9 +24,10 @@ public function evaluateCompletion(EvaluationResultFactory $resultFactory): Eval } if (!$this->acceptTos) { - return $resultFactory->createErrorMessageEvent() + $errorMessageEvent = $resultFactory->createErrorMessageEvent() ->withMessage(__('TOS not accepted')) ->withCustomEvent('payment:method:error'); + return $resultFactory->createValidation('validateSantanderAcceptTos')->withFailureResult($errorMessageEvent); } diff --git a/src/view/frontend/layout/hyva_checkout_index_index.xml b/src/view/frontend/layout/hyva_checkout_index_index.xml new file mode 100644 index 0000000..c13c361 --- /dev/null +++ b/src/view/frontend/layout/hyva_checkout_index_index.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/src/view/frontend/templates/validate-santander-accept-tos.phtml b/src/view/frontend/templates/validate-santander-accept-tos.phtml new file mode 100644 index 0000000..f96b555 --- /dev/null +++ b/src/view/frontend/templates/validate-santander-accept-tos.phtml @@ -0,0 +1,8 @@ +