Skip to content

Commit

Permalink
Sofort 7.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mketronet committed Jan 16, 2018
1 parent 65e6fe6 commit c03ba61
Show file tree
Hide file tree
Showing 23 changed files with 993 additions and 412 deletions.
6 changes: 5 additions & 1 deletion build/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,8 @@

==7.0.1==
*CHANGED: replace SOFORT logo with new one by KLARNA
*CHANGED: update the name of SOFORT
*CHANGED: update the name of SOFORT

==7.0.2==
*CHANGED: updated texts and images
*CHANGED: performance update
2 changes: 1 addition & 1 deletion build/Install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SET
`OXID` = 'trosofortgateway_su',
`OXACTIVE` = 1,
`OXDESC` = 'Sofort.',
`OXDESC_1` = 'Pay now.',
`OXDESC_1` = 'Online bank transfer.',
`OXADDSUM` = 0,
`OXADDSUMTYPE` = 'abs',
`OXADDSUMRULES` = 15,
Expand Down
3 changes: 1 addition & 2 deletions build/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tronet GmbH
tro

==Version==
7.0.1
7.0.2

==Link==
http://www.tronet.media
Expand Down Expand Up @@ -47,7 +47,6 @@ payment => tronet/trosofortueberweisung/application/controllers/trosofortueberwe
oxbasket => tronet/trosofortueberweisung/application/models/trosofortueberweisungoxbasket
oxbasketitem => tronet/trosofortueberweisung/application/models/trosofortueberweisungoxbasketitem
navigation => tronet/trosofortueberweisung/application/controllers/admin/trosofortueberweisung_navigation
oxlist => tronet/trosofortueberweisung/application/models/trosofortueberweisungreleaseoxlist

==Libraries==
SofortLib-PHP-Payment-2.1.2 (/copy_this/tronet/trosofortueberweisung/library/)
Binary file modified build/readme_en.pdf
Binary file not shown.
Binary file modified docs/readme_en.docx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,23 @@ protected function _renderUpdateNotificationFailedMessage($oException)
* @return string
* @author tronet GmbH
* @since 7.0.0
* @version 7.0.2
*/
public function troCheckForChanges()
{
$sTroCheckedChangesFailedMessage = '';
$oSOFORTConfig = oxNew('trosofortueberweisungconfig');
$sDownloadLinkRaw = $oSOFORTConfig->getTroMetaHashLinkRaw();
$sDownloadFile = sprintf($sDownloadLinkRaw, $this->getCurrentVersion());

if ($this->_troUrlExists($sDownloadFile))
{
$oXML = file_get_contents($sDownloadFile);
/** @var trosofortueberweisungcurl $oSOFORTcURL */
$oSOFORTcURL = oxNew('trosofortueberweisungcurl', $sDownloadFile);
$oSOFORTcURL->curlSetOpt(CURLOPT_RETURNTRANSFER, 1);
$oXML = $oSOFORTcURL->curlExec();
$oSOFORTcURL->closeCh();

if ($oXML)
{
$oXml = new \SimpleXMLElement($oXML);
Expand All @@ -208,19 +215,28 @@ public function troCheckForChanges()
}
else
{
if ($oSOFORTcURL->getErrorNumber() > 0)
{
$aErrorCodes = $oSOFORTcURL->getErrorCodes();
$sErrorCodeName = $aErrorCodes[$oSOFORTcURL->getErrorNumber()];
$sLanguageKey = 'TRO_SOFORT_' . $sErrorCodeName;
$sTroCheckedChangesFailedMessage = oxRegistry::getLang()->translateString( $sLanguageKey );
}
$aChangedFiles = array('changedCoreFiles' => 0);
$blTroCheckedChangesFailed = true;
}
}
else
{
$sTroCheckedChangesFailedMessage = oxRegistry::getLang()->translateString('TRO_SOFORT_CURLE_COULDNT_CONNECT');
$aChangedFiles = array('changedCoreFiles' => 0);
$blTroCheckedChangesFailed = true;
}

$this->addTplParam('aTroChangedFiles', $aChangedFiles);
$this->addTplParam('blTroCheckedChanges', true);
$this->addTplParam('blTroCheckedChangesFailed', $blTroCheckedChangesFailed);
$this->addTplParam('sTroCheckedChangesFailedMessage', $sTroCheckedChangesFailedMessage);
}

/**
Expand All @@ -234,10 +250,12 @@ public function troCheckForChanges()
protected function _troUrlExists($sUrl)
{
$aFileHeaders = @get_headers($sUrl);
if($aFileHeaders[0] == 'HTTP/1.1 404 Not Found') {
if ($aFileHeaders[0] == 'HTTP/1.1 404 Not Found')
{
$blUrlExists = false;
}
else {
else
{
$blUrlExists = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public function continueExecute()
*/

// additional check if we really really have a user now
if (!$oUser = $this->getUser())
{
$oUser = $this->getUser();
if (!$oUser) {
return 'user';
}

Expand Down
Loading

0 comments on commit c03ba61

Please sign in to comment.