diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php
index 7461c49e..b4f3b338 100644
--- a/Controller/Checkout/Finish.php
+++ b/Controller/Checkout/Finish.php
@@ -106,7 +106,8 @@ public function execute()
}
if ($transaction->isPaid() || ($transaction->isPending() && $pinStatus == null)) {
- $resultRedirect->setPath('checkout/onepage/success', ['_query' => ['utm_nooverride' => '1']]);
+ $successUrl = $this->config->getSuccessPage($payment->getMethod());
+ $resultRedirect->setPath($successUrl, ['_query' => ['utm_nooverride' => '1']]);
// make the cart inactive
$session = $this->checkoutSession;
diff --git a/Model/Config.php b/Model/Config.php
index 0721c40d..6bf3ea09 100644
--- a/Model/Config.php
+++ b/Model/Config.php
@@ -64,6 +64,17 @@ public function getPaymentOptionId($methodCode)
return $this->store->getConfig('payment/' . $methodCode . '/payment_option_id');
}
+ /**
+ * @param $methodCode string
+ * @return string
+ */
+ public function getSuccessPage($methodCode){
+ $success_page = $this->store->getConfig('payment/' . $methodCode . '/custom_success_page');
+ if(empty($success_page)) $success_page = 'checkout/onepage/success';
+
+ return $success_page;
+ }
+
/**
* Configures the sdk with the API token and serviceId
*
diff --git a/etc/adminhtml/paymentmethods/paylink.xml b/etc/adminhtml/paymentmethods/paylink.xml
index 18561157..ce11c5be 100644
--- a/etc/adminhtml/paymentmethods/paylink.xml
+++ b/etc/adminhtml/paymentmethods/paylink.xml
@@ -93,6 +93,15 @@
1
+
+
+ payment/paynl_payment_paylink/custom_success_page
+
+ 1
+
+
\ No newline at end of file