Commit 3a92c0d2 authored by Stefan Busemann's avatar Stefan Busemann
Browse files

[BUGFIX] load configuration of typoscript

parent 35cdd5fa
......@@ -121,7 +121,7 @@ class DonationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
{
$account = $this->accountRepository->findByUid($this->settings['payPalAccount']);
$this->view->assign('account', $account);
$this->view->assign('actionUrl', $this->getConfigurationOption('paypal.action'));
$this->view->assign('actionUrl', $this->settings['paypal']['action']);
if ($GLOBALS['TSFE']->fe_user && $GLOBALS['TSFE']->fe_user->user['uid']) {
$userId = $GLOBALS['TSFE']->fe_user->user['uid'];
} else {
......@@ -164,9 +164,11 @@ class DonationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
$verified = $this->ipnService->verify($parameters, $this->getConfigurationOption('paypal.action'));
if (!$verified) {
$this->addFlashMessage('Payment verification failed','Paypal transaction',\TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
return;
}
if (!$this->ipnService->isNewCompletedTransaction($parameters, $this->donationRepository)) {
$this->addFlashMessage('isNewCompletedTransaction == false','Paypal transaction',\TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
return;
}
$donation = $this->ipnService->createDonation($parameters);
......@@ -174,7 +176,7 @@ class DonationController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
$this->sendNotificationMail($donation);
$this->sendThankyouMail($donation);
//@TODO recurring, test address data
//@TODO recuddderring, test address data
}
/**
......
plugin.tx_donation_donorlist {
plugin.tx_donation_form{
view {
templateRootPath = EXT:t3o_donation/Resources/Private/Templates/
partialRootPath = EXT:t3o_donation/Resources/Private/Partials/
......@@ -7,4 +7,6 @@ plugin.tx_donation_donorlist {
persistence {
storagePid =
}
}
\ No newline at end of file
}
plugin.tx_donation_list < plugin.tx_donation_form
plugin.tx_t3odonation_donorlist {
plugin.tx_t3odonation_form {
view {
templateRootPath = {$plugin.tx_t3odonation_donorlist.view.templateRootPath}
partialRootPath = {$plugin.tx_t3odonation_donorlist.view.partialRootPath}
layoutRootPath = {$plugin.tx_t3odonation_donorlist.view.layoutRootPath}
templateRootPath = {$plugin.tx_t3odonation_form.view.templateRootPath}
partialRootPath = {$plugin.tx_t3odonation_form.view.partialRootPath}
layoutRootPath = {$plugin.tx_t3odonation_form.view.layoutRootPath}
}
persistence {
storagePid = {$plugin.tx_t3odonation_donorlist.persistence.storagePid}
storagePid = {$plugin.tx_t3odonation_form.persistence.storagePid}
}
}
\ No newline at end of file
settings {
paypal {
action = https://www.sandbox.paypal.com/cgi-bin/webscr
}
}
}
plugin.tx_t3odonation_list < plugin.tx_t3odonation_form
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment