Changeset 1292654
- Timestamp:
- 11/23/2015 01:54:09 PM (10 years ago)
- Location:
- easycontract
- Files:
-
- 1 deleted
- 5 edited
- 10 copied
-
tags/1.0.3wo (copied) (copied from easycontract/trunk)
-
tags/1.0.3wo/ext (copied) (copied from easycontract/trunk/ext)
-
tags/1.0.3wo/ext/santander/changelog.txt (copied) (copied from easycontract/trunk/ext/santander/changelog.txt)
-
tags/1.0.3wo/ext/santander/src/Santander.php (copied) (copied from easycontract/trunk/ext/santander/src/Santander.php)
-
tags/1.0.3wo/ext/santander/src/Santander/base/Logger.php (copied) (copied from easycontract/trunk/ext/santander/src/Santander/base/Logger.php) (2 diffs)
-
tags/1.0.3wo/ext/santander/src/Santander/i18n/Message.php (copied) (copied from easycontract/trunk/ext/santander/src/Santander/i18n/Message.php)
-
tags/1.0.3wo/gateways (copied) (copied from easycontract/trunk/gateways)
-
tags/1.0.3wo/includes (copied) (copied from easycontract/trunk/includes)
-
tags/1.0.3wo/includes/classes/Santander_APIConnector.php (modified) (1 diff)
-
tags/1.0.3wo/readme.txt (copied) (copied from easycontract/trunk/readme.txt) (2 diffs)
-
tags/1.0.3wo/santander.php (copied) (copied from easycontract/trunk/santander.php) (2 diffs)
-
trunk/README.md (deleted)
-
trunk/ext/santander/src/Santander/base/Logger.php (modified) (2 diffs)
-
trunk/includes/classes/Santander_APIConnector.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/santander.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easycontract/tags/1.0.3wo/ext/santander/src/Santander/base/Logger.php
r1279484 r1292654 42 42 43 43 $this->filename = $this->savePath . DIRECTORY_SEPARATOR . $filename; 44 //$this->sendAndDeletePreviousLog();45 44 } 46 45 … … 140 139 } 141 140 } 142 143 /**144 * Send/transfer previous log file to the log handler system and delete it on145 * the server.146 * @return boolean147 */148 public function sendAndDeletePreviousLog() {149 $yesterday = strtotime('-1 day');150 $filename = SANTANDER_LIB_PATH . DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR . strtr($this->filenameTemplate, array('{date}' => date('Ymd', $yesterday)));151 152 if (file_exists($filename)) {153 /**154 * @todo replace mail with ftp or other type of file tranfer155 */156 $from = \Santander::$api->config->getSiteEmailAddress();157 $to = \Santander::$api->config->getLogEmailAddress();158 159 $message = \Swift_Message::newInstance()160 ->setSubject(Message::translate('Log file from {system}', array('system' => \Santander::$api->config->getSiteName()), Language::DEFAULT_LANGUAGE))161 ->setFrom($from)162 ->setTo($to)163 ->attach(\Swift_Attachment::fromPath($filename))164 ->setBody(165 Message::translate(166 'Log file from {yesterday} for {system} is attached in this e-mail.',167 array(168 'yesterday' => date('Y-m-d', $yesterday),169 'system' => \Santander::$api->config->getPlatformName()170 ),171 Language::DEFAULT_LANGUAGE172 )173 );174 175 $transport = \Swift_MailTransport::newInstance();176 $mailer = \Swift_Mailer::newInstance($transport);177 178 if (!$mailer->send($message, $failures)) {179 $this->log(static::LEVEL_ERROR, 'Unable to send log mail', array(180 'from' => $from,181 'to' => $to,182 'rejected' => $failures,183 ));184 185 return FALSE;186 }187 188 @unlink($filename);189 return TRUE;190 }191 192 return TRUE;193 }194 141 } -
easycontract/tags/1.0.3wo/includes/classes/Santander_APIConnector.php
r1279385 r1292654 121 121 122 122 private function _getModuleVersion() { 123 return '1.0. 0wo';123 return '1.0.3wo'; 124 124 } 125 125 -
easycontract/tags/1.0.3wo/readme.txt
r1283245 r1292654 4 4 Requires at least: 4.0 5 5 Tested up to: 4.3.1 6 Stable tag: 1.0. 2wo6 Stable tag: 1.0.3wo 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 21 21 22 22 == Changelog == 23 = 1.0.3wo = 24 * Bug: Return URL did not work when permalinks had another format then ’Default’. 25 * Removed: Santander\base\sendAndDeletePreviousLog() have never been used and is now removed. 26 23 27 = 1.0.2wo = 24 28 * Fix: syntax error in src/Santander/i18n/Message.php. -
easycontract/tags/1.0.3wo/santander.php
r1283259 r1292654 4 4 Plugin URI: https://github.com/SantanderApps/SantanderPaymentProviderWooCommerce 5 5 Description: Integrates Santander Consumer Bank into WooCommerce. 6 Version: 1.0. 2wo6 Version: 1.0.3wo 7 7 Author: Santander 8 8 Author URI: http://santander.consid.se … … 107 107 $santander_log_page_id = get_option( 'santander_log_page' ); 108 108 109 if ( $query->is_main_query() && isset( $_GET['page_id'] ) && $_GET['page_id'] == $checkout_page_id&& isset( $_GET['token'] ) ) {109 if ( $query->is_main_query() && ( ( isset( $query->query['page_id'] ) && $query->query['page_id'] == $checkout_page_id ) || ( isset( $query->queried_object) && $query->queried_object->ID == $checkout_page_id ) ) && isset( $_GET['token'] ) ) { 110 110 $santanderLoan = new Santander_Loan(); 111 111 $santanderLoan->check_result( $_GET['token'] ); 112 112 exit; 113 } elseif ( $query->is_main_query() && isset( $_GET['page_id'] ) && $_GET['page_id'] == $santander_log_page_id) {113 } elseif ( $query->is_main_query() && ( ( isset( $query->query['page_id'] ) && $query->query['page_id'] == $santander_log_page_id ) || ( isset( $query->queried_object) && $query->queried_object->ID == $santander_log_page_id ) ) ) { 114 114 Santander::run( new Santander_APIConnector( new Santander_Loan() ) ); 115 115 print Santander::$logger->getLogFile( ( isset( $_GET['d'] ) ? (int) $_GET['d'] : time() ) ); -
easycontract/trunk/ext/santander/src/Santander/base/Logger.php
r1279484 r1292654 42 42 43 43 $this->filename = $this->savePath . DIRECTORY_SEPARATOR . $filename; 44 //$this->sendAndDeletePreviousLog();45 44 } 46 45 … … 140 139 } 141 140 } 142 143 /**144 * Send/transfer previous log file to the log handler system and delete it on145 * the server.146 * @return boolean147 */148 public function sendAndDeletePreviousLog() {149 $yesterday = strtotime('-1 day');150 $filename = SANTANDER_LIB_PATH . DIRECTORY_SEPARATOR . 'logs' . DIRECTORY_SEPARATOR . strtr($this->filenameTemplate, array('{date}' => date('Ymd', $yesterday)));151 152 if (file_exists($filename)) {153 /**154 * @todo replace mail with ftp or other type of file tranfer155 */156 $from = \Santander::$api->config->getSiteEmailAddress();157 $to = \Santander::$api->config->getLogEmailAddress();158 159 $message = \Swift_Message::newInstance()160 ->setSubject(Message::translate('Log file from {system}', array('system' => \Santander::$api->config->getSiteName()), Language::DEFAULT_LANGUAGE))161 ->setFrom($from)162 ->setTo($to)163 ->attach(\Swift_Attachment::fromPath($filename))164 ->setBody(165 Message::translate(166 'Log file from {yesterday} for {system} is attached in this e-mail.',167 array(168 'yesterday' => date('Y-m-d', $yesterday),169 'system' => \Santander::$api->config->getPlatformName()170 ),171 Language::DEFAULT_LANGUAGE172 )173 );174 175 $transport = \Swift_MailTransport::newInstance();176 $mailer = \Swift_Mailer::newInstance($transport);177 178 if (!$mailer->send($message, $failures)) {179 $this->log(static::LEVEL_ERROR, 'Unable to send log mail', array(180 'from' => $from,181 'to' => $to,182 'rejected' => $failures,183 ));184 185 return FALSE;186 }187 188 @unlink($filename);189 return TRUE;190 }191 192 return TRUE;193 }194 141 } -
easycontract/trunk/includes/classes/Santander_APIConnector.php
r1279385 r1292654 121 121 122 122 private function _getModuleVersion() { 123 return '1.0. 0wo';123 return '1.0.3wo'; 124 124 } 125 125 -
easycontract/trunk/readme.txt
r1283245 r1292654 4 4 Requires at least: 4.0 5 5 Tested up to: 4.3.1 6 Stable tag: 1.0. 2wo6 Stable tag: 1.0.3wo 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 21 21 22 22 == Changelog == 23 = 1.0.3wo = 24 * Bug: Return URL did not work when permalinks had another format then ’Default’. 25 * Removed: Santander\base\sendAndDeletePreviousLog() have never been used and is now removed. 26 23 27 = 1.0.2wo = 24 28 * Fix: syntax error in src/Santander/i18n/Message.php. -
easycontract/trunk/santander.php
r1283259 r1292654 4 4 Plugin URI: https://github.com/SantanderApps/SantanderPaymentProviderWooCommerce 5 5 Description: Integrates Santander Consumer Bank into WooCommerce. 6 Version: 1.0. 2wo6 Version: 1.0.3wo 7 7 Author: Santander 8 8 Author URI: http://santander.consid.se … … 107 107 $santander_log_page_id = get_option( 'santander_log_page' ); 108 108 109 if ( $query->is_main_query() && isset( $_GET['page_id'] ) && $_GET['page_id'] == $checkout_page_id&& isset( $_GET['token'] ) ) {109 if ( $query->is_main_query() && ( ( isset( $query->query['page_id'] ) && $query->query['page_id'] == $checkout_page_id ) || ( isset( $query->queried_object) && $query->queried_object->ID == $checkout_page_id ) ) && isset( $_GET['token'] ) ) { 110 110 $santanderLoan = new Santander_Loan(); 111 111 $santanderLoan->check_result( $_GET['token'] ); 112 112 exit; 113 } elseif ( $query->is_main_query() && isset( $_GET['page_id'] ) && $_GET['page_id'] == $santander_log_page_id) {113 } elseif ( $query->is_main_query() && ( ( isset( $query->query['page_id'] ) && $query->query['page_id'] == $santander_log_page_id ) || ( isset( $query->queried_object) && $query->queried_object->ID == $santander_log_page_id ) ) ) { 114 114 Santander::run( new Santander_APIConnector( new Santander_Loan() ) ); 115 115 print Santander::$logger->getLogFile( ( isset( $_GET['d'] ) ? (int) $_GET['d'] : time() ) );
Note: See TracChangeset
for help on using the changeset viewer.