diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php
index 3c3dfb61..7e5b5f76 100644
--- a/Controller/Checkout/Finish.php
+++ b/Controller/Checkout/Finish.php
@@ -159,7 +159,13 @@ public function execute()
}
$this->deactivateCart($order, $payOrderId);
} elseif ($bPending) {
- $resultRedirect->setPath(Config::PENDING_PAY);
+ $successUrl = Config::FINISH_STANDARD;
+ if ($this->config->getPendingPage()) {
+ $successUrl = Config::PENDING_PAY;
+ } elseif ($this->config->sendEcommerceAnalytics()) {
+ $successUrl = Config::FINISH_PAY;
+ }
+ $resultRedirect->setPath($successUrl, ['_query' => ['utm_nooverride' => '1']]);
$this->deactivateCart($order, $payOrderId);
} else {
$cancelMessage = $bDenied ? __('Payment denied') : __('Payment canceled');
diff --git a/Model/Config.php b/Model/Config.php
index 8da52ebf..d1df6254 100755
--- a/Model/Config.php
+++ b/Model/Config.php
@@ -329,6 +329,14 @@ public function sendEcommerceAnalytics()
return $this->store->getConfig('payment/paynl/google_analytics_ecommerce') == 1;
}
+ /**
+ * @return boolean
+ */
+ public function getPendingPage()
+ {
+ return $this->store->getConfig('payment/paynl/pay_pending_page') == 1;
+ }
+
/**
* @param string $methodCode
* @return string
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index 58eb7ad9..54e313d7 100644
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -21,7 +21,7 @@
Paynl\Payment\Block\Adminhtml\Render\Credentials
-
+
here. Not registered at PAY? Sign up here!]]>
@@ -190,6 +190,12 @@
Paynl\Payment\Model\Config\Source\GoogleAnalyticspayment/paynl/google_analytics_ecommerce
+
+
+
+ Paynl\Payment\Model\Config\Source\OffOn
+ payment/paynl/pay_pending_page
+
diff --git a/etc/config.xml b/etc/config.xml
index 6d849048..3a7d67c6 100755
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -11,6 +11,7 @@
11Order
+ 10
diff --git a/i18n/en_US.csv b/i18n/en_US.csv
index 8adb56b0..62fd4447 100644
--- a/i18n/en_US.csv
+++ b/i18n/en_US.csv
@@ -135,3 +135,4 @@
"You are up to date with the latest version","You are up to date with the latest version"
"There is a new version available (","There is a new version available ("
"PAY. - This payment has been flagged as possibly fraudulent. Please verify this transaction in the Pay. portal.","PAY. - This payment has been flagged as possibly fraudulent. Please verify this transaction in the Pay. portal."
+"Select whether you want to use the PAY. thank you page when transaction is pending.","Select whether you want to use the PAY. thank you page when transaction is pending."
diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv
index c40f2e44..02f9922d 100644
--- a/i18n/nl_NL.csv
+++ b/i18n/nl_NL.csv
@@ -183,3 +183,4 @@
"You are up to date with the latest version","U bent up to date met de laatste versie"
"There is a new version available (","Er is een nieuwe versie beschikbaar ("
"PAY. - This payment has been flagged as possibly fraudulent. Please verify this transaction in the Pay. portal.","PAY. - Deze betaling is gemarkeerd als mogelijk frauduleus. Controleer deze transactie in het Pay. portaal."
+"Select whether you want to use the PAY. thank you page when transaction is pending.","Selecteer of u gebruik wilt maken van de PAY. bedankpagina wanneer de transactie in behandeling is."