commit 3fd8b4c7f1956c520787f95d4a6d65e066dab3e2 Author: skirtiadi skirtiadi@giantrabbit.com Date: Wed Sep 30 11:49:09 2020 -0700
Allow cryptocurrency thank you redirect to adopt localOptions
Part of porting the site to lektor site, cryptocurrency page is going to be on the lektor site. To allow flexibility of where people are going to be redirected after the submission, this code is put into place. key pair 'cryptocurrencyThankyouUrl' => '/cryptocurrency/thank-you' needs to be added in $localOptions in private/settings.local.php on the donate server for local settings.
Issue #48280 --- src/CryptocurrencyController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/CryptocurrencyController.php b/src/CryptocurrencyController.php index b49cd79c..65e4542a 100644 --- a/src/CryptocurrencyController.php +++ b/src/CryptocurrencyController.php @@ -86,7 +86,12 @@ class CryptocurrencyController extends BaseController { ); $crmController = new CrmController($this->container); $crmController->sendMessage('Tor\Donation\CryptoIntention', $donationInfo); - return $response->withRedirect('/cryptocurrency/thank-you'); + + $cryptocurrencyThankyouUrl = $this->container->get('settings')->get('cryptocurrencyThankyouUrl'); + if ($cryptocurrencyThankyouUrl === NULL) { + $cryptocurrencyThankyouUrl = '/cryptocurrency/thank-you'; + } + return $response->withRedirect($cryptocurrencyThankyouUrl); }
public function generateTrxnId() {
tor-commits@lists.torproject.org