Changeset 1305079
- Timestamp:
- 12/10/2015 09:07:06 AM (10 years ago)
- Location:
- easycontract
- Files:
-
- 12 deleted
- 8 edited
- 13 copied
-
tags/1.0.6wo (copied) (copied from easycontract/trunk)
-
tags/1.0.6wo/ext (copied) (copied from easycontract/trunk/ext)
-
tags/1.0.6wo/ext/santander/changelog.txt (copied) (copied from easycontract/trunk/ext/santander/changelog.txt)
-
tags/1.0.6wo/ext/santander/doc (deleted)
-
tags/1.0.6wo/ext/santander/example (deleted)
-
tags/1.0.6wo/ext/santander/extras (deleted)
-
tags/1.0.6wo/ext/santander/src/Santander.php (copied) (copied from easycontract/trunk/ext/santander/src/Santander.php)
-
tags/1.0.6wo/ext/santander/src/Santander/base/Api.php (copied) (copied from easycontract/trunk/ext/santander/src/Santander/base/Api.php)
-
tags/1.0.6wo/ext/santander/src/Santander/base/Logger.php (copied) (copied from easycontract/trunk/ext/santander/src/Santander/base/Logger.php)
-
tags/1.0.6wo/ext/santander/src/Santander/i18n/Message.php (copied) (copied from easycontract/trunk/ext/santander/src/Santander/i18n/Message.php)
-
tags/1.0.6wo/ext/santander/src/Santander/i18n/messages/en-GB.php (modified) (2 diffs)
-
tags/1.0.6wo/ext/santander/src/Santander/i18n/messages/sv-SE.php (modified) (2 diffs)
-
tags/1.0.6wo/ext/santander/src/ext/ping/.git (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/ping/.gitignore (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/ping/.travis.yml (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/ping/JJG/PingTest.php (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/ping/LICENSE.md (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/ping/README.md (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/ping/Resources (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/ping/composer.json (deleted)
-
tags/1.0.6wo/ext/santander/src/ext/swiftmailer (deleted)
-
tags/1.0.6wo/gateways (copied) (copied from easycontract/trunk/gateways)
-
tags/1.0.6wo/gateways/santander-loan.php (copied) (copied from easycontract/trunk/gateways/santander-loan.php) (3 diffs)
-
tags/1.0.6wo/includes (copied) (copied from easycontract/trunk/includes)
-
tags/1.0.6wo/includes/classes/Santander_APIConnector.php (copied) (copied from easycontract/trunk/includes/classes/Santander_APIConnector.php) (3 diffs)
-
tags/1.0.6wo/readme.txt (copied) (copied from easycontract/trunk/readme.txt) (2 diffs)
-
tags/1.0.6wo/santander.php (copied) (copied from easycontract/trunk/santander.php) (7 diffs)
-
trunk/ext/santander/src/Santander/i18n/messages/en-GB.php (modified) (2 diffs)
-
trunk/ext/santander/src/Santander/i18n/messages/sv-SE.php (modified) (2 diffs)
-
trunk/gateways/santander-loan.php (modified) (3 diffs)
-
trunk/includes/classes/Santander_APIConnector.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/santander.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easycontract/tags/1.0.6wo/ext/santander/src/Santander/i18n/messages/en-GB.php
r1279385 r1305079 56 56 'Test Connections' => 'Test connection with web services.', 57 57 '<strong>Note:</strong> Only available when "Set Module Environment" is unchecked.' => '<strong>Note:</strong> Only available when "Set Module Environment" is unchecked.', 58 'Support Logs' => 'Support Logs', 59 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.' => 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.', 60 "New order status" => "New order status", 61 "Status of order when order created, but before it has been processed by Santander Consumer Bank" => "Status of order when order created, but before it has been processed by Santander Consumer Bank", 58 62 59 63 // Order Comments … … 67 71 68 72 // Checkout 73 'Monthly instalment' => 'Monthly instalment', 74 'You will be redirected to Santander´s webpage for credit application after placing order.' => 'You will be redirected to Santander´s webpage for credit application after placing order.', 69 75 'Proceed to Santander' => 'Proceed to Santander', 70 76 'The customer was redirected from Santander Consumer Bank\'s web site back to the shop.' => 'The customer was redirected from Santander Consumer Bank\'s web site back to the shop.', -
easycontract/tags/1.0.6wo/ext/santander/src/Santander/i18n/messages/sv-SE.php
r1279385 r1305079 56 56 'Test Connections' => 'Testa kontakt med webbtjänst', 57 57 '<strong>Note:</strong> Only available when "Set Module Environment" is unchecked.' => '<strong>Obs:</strong> Endast tillgänglig då "Sätt module-läge" är urmarkerad.', 58 'Support Logs' => 'Logga information', 59 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.' => 'Santanders plugin loggar alla anslutningar till och från Santanders webbtjänster. Du kan välja bort att dessa loggar automatiskt samlas in av Santander och kan därmed välja att manuellt skicka loggfil när du kontaktar Santanders kundtjänst. Loggfiler sparas i: {logdir}', 60 "New order status" => "Status vid ny order", 61 "Status of order when order created, but before it has been processed by Santander Consumer Bank" => "Status på order när order skapas, men innan den har behandlats av Santander Consumer Bank", 58 62 59 63 // Order Comments … … 67 71 68 72 // Checkout 73 'Monthly instalment' => 'Delbetalning', 74 'You will be redirected to Santander´s webpage for credit application after placing order.' => 'Du kommer att skickas till Santanders hemsida för kreditansökan när du har placerat din order.', 69 75 'Proceed to Santander' => 'Fortsätt till Santander', 70 76 'The customer was redirected from Santander Consumer Bank\'s web site back to the shop.' => 'Kunden skickades från Santander Consumer Banks webbsida tillbaka till butiken.', -
easycontract/tags/1.0.6wo/gateways/santander-loan.php
r1303710 r1305079 39 39 // The title to be used for the vertical tabs that can be ordered top to 40 40 // bottom 41 $this->title = Santander::$api->_( 'Santander Consumer Bank' ); 41 $this->title = Santander::$api->_( 'Monthly instalment' ); 42 43 // The description for this Payment Gateway, shown in the checkout 44 $this->description = Santander::$api->_( 'You will be redirected to Santander´s webpage for credit application after placing order.' ); 42 45 43 46 // Displays an image next to the gateway's name on thefrontend … … 126 129 'default' => 'yes', 127 130 ), 131 132 'access_log_external' => array( 133 'title' => Santander::$api->_( 'Support Logs' ), 134 'label' => Santander::$api->_( 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.', array( 'logdir' => _santander_get_plugin_path() . 'ext/santander/src/runtime/log' ) ), 135 'desc_tip' => Santander::$api->_( 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.', array( 'logdir' => _santander_get_plugin_path() . 'ext/santander/src/runtime/log' ) ), 136 'type' => 'checkbox', 137 'default' => 'no', 138 ), 128 139 ); 129 140 … … 161 172 162 173 add_action( 'admin_notices', array( $this, 'admin_notice' ) ); 174 } 175 } 176 177 public function process_admin_options() { 178 if ( parent::process_admin_options() && $this->sanitized_fields['access_log_external'] == 'yes' ) { 179 // Inform Santander that log access is allowed 180 $headers = 'From: ' . Santander::$api->config->getSiteName() . ' <' . Santander::$api->config->getSiteEmailAddress() . '>' . "\r\n"; 181 $link = get_bloginfo( 'wpurl' ); 182 $link .= ( substr( $link, 0, -1 ) != '/' ? '/' : '' ); 183 $link .= ( strpos( $link, '?' ) === FALSE ? '?' : '&' ) . 'santanderlog={date}'; 184 $email_text = 'The log file is located at ' . $link; 185 wp_mail( 'santander@consid.se', 'New installation', $email_text, $headers ); 163 186 } 164 187 } -
easycontract/tags/1.0.6wo/includes/classes/Santander_APIConnector.php
r1303710 r1305079 72 72 return $this->_getReturnUrl(); 73 73 break; 74 case Config::CONFIG_KEY_ACCESS_LOG_EXTERNAL: 75 return $this->_getAccessLogExternal(); 76 break; 74 77 } 75 78 } … … 121 124 122 125 private function _getModuleVersion() { 123 return '1.0. 5wo';126 return '1.0.6wo'; 124 127 } 125 128 … … 136 139 return get_permalink( $checkout_page_id ); 137 140 } 141 142 private function _getAccessLogExternal() { 143 return $this->_gateway->get_option( 'access_log_external' ) == 'yes'; 144 } 138 145 } -
easycontract/tags/1.0.6wo/readme.txt
r1303710 r1305079 4 4 Requires at least: 4.0 5 5 Tested up to: 4.4 6 Stable tag: 1.0. 5wo6 Stable tag: 1.0.6wo 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html 9 9 WC requires at least: 2.4.6 10 WC tested up to: 2.4.1 110 WC tested up to: 2.4.10 11 11 12 12 == Description == … … 23 23 24 24 == Changelog == 25 = 1.0.6wo = 26 * Changed: Better informative texts in checkout. 27 25 28 = 1.0.5wo = 26 29 * Bug: Fixes a bug with token that is being incorrect encoded when sent to GetResult(). -
easycontract/tags/1.0.6wo/santander.php
r1303710 r1305079 4 4 Plugin URI: https://github.com/SantanderApps/SantanderPaymentProviderWooCommerce 5 5 Description: Integrates Santander Consumer Bank into WooCommerce. 6 Version: 1.0. 5wo6 Version: 1.0.6wo 7 7 Author: Santander 8 8 Author URI: http://santander.consid.se … … 16 16 global $user_ID; 17 17 18 $page = array(19 'post_type' => 'page',20 'post_content' => '',21 'post_parent' => 0,22 'post_author' => $user_ID,23 'post_status' => 'publish',24 'post_title' => 'Santander Log',25 );26 $page = apply_filters( 'santander_add_new_page', $page, 'teams' );27 $page_id = wp_insert_post( $page );28 if ( $page_id > 0 ) {29 add_option( 'santander_log_page', $page_id );30 }31 32 18 add_option( 'santander_installation_date', date( 'Y-m-d H:i' ) ); 33 34 include_once( 'gateways/santander-loan.php' );35 Santander::run( new Santander_APIConnector( new Santander_Loan() ) );36 $headers = 'From: ' . Santander::$api->config->getSiteName() . ' <' . Santander::$api->config->getSiteEmailAddress() . '>' . "\r\n";37 $link = get_permalink( get_option( 'santander_log_page' ) );38 $link .= ( strpos( $link, '?' ) === FALSE ? '?' : '&' ) . 'd={date}';39 $email_text = 'The log file is located at ' . $link;40 wp_mail( 'santander@consid.se', 'New installation', $email_text, $headers );41 19 } 42 20 … … 45 23 */ 46 24 function santander_deactivate() { 47 $log_page_id = get_option( 'santander_log_page' );48 49 if ( $log_page_id ) {50 wp_delete_post( $log_page_id, TRUE );51 delete_option( 'santander_log_page' );52 unset( $log_page_id );53 }54 55 25 delete_option( 'santander_installation_date' ); 56 26 } … … 74 44 // Lets add it too WooCommerce 75 45 add_filter( 'woocommerce_payment_gateways', 'santander_add_gateway' ); 46 } 47 48 /** 49 * This function will run when WP are loaded. 50 * @return null 51 */ 52 function santander_wp_loaded() { 53 // Output the requested log file 54 if ( isset( $_GET['santanderlog'] ) ) { 55 Santander::run( new Santander_APIConnector( new Santander_Loan() ) ); 56 57 if ( Santander::$api->config->getAccessLogExternal() ) { 58 print Santander::$logger->getLogFile( ( isset( $_GET['santanderlog'] ) ? (int) $_GET['santanderlog'] : date('Ymd') ) ); 59 } 60 61 exit; 62 } 76 63 } 77 64 … … 105 92 function santander_pre_get_posts( $query ) { 106 93 $checkout_page_id = get_option( 'woocommerce_checkout_page_id' ); 107 $santander_log_page_id = get_option( 'santander_log_page' );108 94 109 95 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'] ) ) { … … 111 97 $santanderLoan->check_result( $_GET['token'] ); 112 98 exit; 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 Santander::run( new Santander_APIConnector( new Santander_Loan() ) ); 115 print Santander::$logger->getLogFile( ( isset( $_GET['d'] ) ? (int) $_GET['d'] : time() ) ); 116 exit; 117 } 99 } 118 100 } 119 101 … … 140 122 add_action( 'plugins_loaded', 'santander_init' ); 141 123 add_action( 'pre_get_posts', 'santander_pre_get_posts' ); 124 add_action( 'wp_loaded', 'santander_wp_loaded' ); 142 125 143 126 // Filter hooks -
easycontract/trunk/ext/santander/src/Santander/i18n/messages/en-GB.php
r1279385 r1305079 56 56 'Test Connections' => 'Test connection with web services.', 57 57 '<strong>Note:</strong> Only available when "Set Module Environment" is unchecked.' => '<strong>Note:</strong> Only available when "Set Module Environment" is unchecked.', 58 'Support Logs' => 'Support Logs', 59 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.' => 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.', 60 "New order status" => "New order status", 61 "Status of order when order created, but before it has been processed by Santander Consumer Bank" => "Status of order when order created, but before it has been processed by Santander Consumer Bank", 58 62 59 63 // Order Comments … … 67 71 68 72 // Checkout 73 'Monthly instalment' => 'Monthly instalment', 74 'You will be redirected to Santander´s webpage for credit application after placing order.' => 'You will be redirected to Santander´s webpage for credit application after placing order.', 69 75 'Proceed to Santander' => 'Proceed to Santander', 70 76 'The customer was redirected from Santander Consumer Bank\'s web site back to the shop.' => 'The customer was redirected from Santander Consumer Bank\'s web site back to the shop.', -
easycontract/trunk/ext/santander/src/Santander/i18n/messages/sv-SE.php
r1279385 r1305079 56 56 'Test Connections' => 'Testa kontakt med webbtjänst', 57 57 '<strong>Note:</strong> Only available when "Set Module Environment" is unchecked.' => '<strong>Obs:</strong> Endast tillgänglig då "Sätt module-läge" är urmarkerad.', 58 'Support Logs' => 'Logga information', 59 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.' => 'Santanders plugin loggar alla anslutningar till och från Santanders webbtjänster. Du kan välja bort att dessa loggar automatiskt samlas in av Santander och kan därmed välja att manuellt skicka loggfil när du kontaktar Santanders kundtjänst. Loggfiler sparas i: {logdir}', 60 "New order status" => "Status vid ny order", 61 "Status of order when order created, but before it has been processed by Santander Consumer Bank" => "Status på order när order skapas, men innan den har behandlats av Santander Consumer Bank", 58 62 59 63 // Order Comments … … 67 71 68 72 // Checkout 73 'Monthly instalment' => 'Delbetalning', 74 'You will be redirected to Santander´s webpage for credit application after placing order.' => 'Du kommer att skickas till Santanders hemsida för kreditansökan när du har placerat din order.', 69 75 'Proceed to Santander' => 'Fortsätt till Santander', 70 76 'The customer was redirected from Santander Consumer Bank\'s web site back to the shop.' => 'Kunden skickades från Santander Consumer Banks webbsida tillbaka till butiken.', -
easycontract/trunk/gateways/santander-loan.php
r1303710 r1305079 39 39 // The title to be used for the vertical tabs that can be ordered top to 40 40 // bottom 41 $this->title = Santander::$api->_( 'Santander Consumer Bank' ); 41 $this->title = Santander::$api->_( 'Monthly instalment' ); 42 43 // The description for this Payment Gateway, shown in the checkout 44 $this->description = Santander::$api->_( 'You will be redirected to Santander´s webpage for credit application after placing order.' ); 42 45 43 46 // Displays an image next to the gateway's name on thefrontend … … 126 129 'default' => 'yes', 127 130 ), 131 132 'access_log_external' => array( 133 'title' => Santander::$api->_( 'Support Logs' ), 134 'label' => Santander::$api->_( 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.', array( 'logdir' => _santander_get_plugin_path() . 'ext/santander/src/runtime/log' ) ), 135 'desc_tip' => Santander::$api->_( 'For a better support experience Santander´s plugin logs all connections to and from Santander´s web services. You have the option to opt-out of these logs being automatically collected by Santander and can therefore choose to manually send in a log file when contacting Santander support services. Log files are located: {logdir}.', array( 'logdir' => _santander_get_plugin_path() . 'ext/santander/src/runtime/log' ) ), 136 'type' => 'checkbox', 137 'default' => 'no', 138 ), 128 139 ); 129 140 … … 161 172 162 173 add_action( 'admin_notices', array( $this, 'admin_notice' ) ); 174 } 175 } 176 177 public function process_admin_options() { 178 if ( parent::process_admin_options() && $this->sanitized_fields['access_log_external'] == 'yes' ) { 179 // Inform Santander that log access is allowed 180 $headers = 'From: ' . Santander::$api->config->getSiteName() . ' <' . Santander::$api->config->getSiteEmailAddress() . '>' . "\r\n"; 181 $link = get_bloginfo( 'wpurl' ); 182 $link .= ( substr( $link, 0, -1 ) != '/' ? '/' : '' ); 183 $link .= ( strpos( $link, '?' ) === FALSE ? '?' : '&' ) . 'santanderlog={date}'; 184 $email_text = 'The log file is located at ' . $link; 185 wp_mail( 'santander@consid.se', 'New installation', $email_text, $headers ); 163 186 } 164 187 } -
easycontract/trunk/includes/classes/Santander_APIConnector.php
r1303710 r1305079 72 72 return $this->_getReturnUrl(); 73 73 break; 74 case Config::CONFIG_KEY_ACCESS_LOG_EXTERNAL: 75 return $this->_getAccessLogExternal(); 76 break; 74 77 } 75 78 } … … 121 124 122 125 private function _getModuleVersion() { 123 return '1.0. 5wo';126 return '1.0.6wo'; 124 127 } 125 128 … … 136 139 return get_permalink( $checkout_page_id ); 137 140 } 141 142 private function _getAccessLogExternal() { 143 return $this->_gateway->get_option( 'access_log_external' ) == 'yes'; 144 } 138 145 } -
easycontract/trunk/readme.txt
r1303710 r1305079 4 4 Requires at least: 4.0 5 5 Tested up to: 4.4 6 Stable tag: 1.0. 5wo6 Stable tag: 1.0.6wo 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html 9 9 WC requires at least: 2.4.6 10 WC tested up to: 2.4.1 110 WC tested up to: 2.4.10 11 11 12 12 == Description == … … 23 23 24 24 == Changelog == 25 = 1.0.6wo = 26 * Changed: Better informative texts in checkout. 27 25 28 = 1.0.5wo = 26 29 * Bug: Fixes a bug with token that is being incorrect encoded when sent to GetResult(). -
easycontract/trunk/santander.php
r1303710 r1305079 4 4 Plugin URI: https://github.com/SantanderApps/SantanderPaymentProviderWooCommerce 5 5 Description: Integrates Santander Consumer Bank into WooCommerce. 6 Version: 1.0. 5wo6 Version: 1.0.6wo 7 7 Author: Santander 8 8 Author URI: http://santander.consid.se … … 16 16 global $user_ID; 17 17 18 $page = array(19 'post_type' => 'page',20 'post_content' => '',21 'post_parent' => 0,22 'post_author' => $user_ID,23 'post_status' => 'publish',24 'post_title' => 'Santander Log',25 );26 $page = apply_filters( 'santander_add_new_page', $page, 'teams' );27 $page_id = wp_insert_post( $page );28 if ( $page_id > 0 ) {29 add_option( 'santander_log_page', $page_id );30 }31 32 18 add_option( 'santander_installation_date', date( 'Y-m-d H:i' ) ); 33 34 include_once( 'gateways/santander-loan.php' );35 Santander::run( new Santander_APIConnector( new Santander_Loan() ) );36 $headers = 'From: ' . Santander::$api->config->getSiteName() . ' <' . Santander::$api->config->getSiteEmailAddress() . '>' . "\r\n";37 $link = get_permalink( get_option( 'santander_log_page' ) );38 $link .= ( strpos( $link, '?' ) === FALSE ? '?' : '&' ) . 'd={date}';39 $email_text = 'The log file is located at ' . $link;40 wp_mail( 'santander@consid.se', 'New installation', $email_text, $headers );41 19 } 42 20 … … 45 23 */ 46 24 function santander_deactivate() { 47 $log_page_id = get_option( 'santander_log_page' );48 49 if ( $log_page_id ) {50 wp_delete_post( $log_page_id, TRUE );51 delete_option( 'santander_log_page' );52 unset( $log_page_id );53 }54 55 25 delete_option( 'santander_installation_date' ); 56 26 } … … 74 44 // Lets add it too WooCommerce 75 45 add_filter( 'woocommerce_payment_gateways', 'santander_add_gateway' ); 46 } 47 48 /** 49 * This function will run when WP are loaded. 50 * @return null 51 */ 52 function santander_wp_loaded() { 53 // Output the requested log file 54 if ( isset( $_GET['santanderlog'] ) ) { 55 Santander::run( new Santander_APIConnector( new Santander_Loan() ) ); 56 57 if ( Santander::$api->config->getAccessLogExternal() ) { 58 print Santander::$logger->getLogFile( ( isset( $_GET['santanderlog'] ) ? (int) $_GET['santanderlog'] : date('Ymd') ) ); 59 } 60 61 exit; 62 } 76 63 } 77 64 … … 105 92 function santander_pre_get_posts( $query ) { 106 93 $checkout_page_id = get_option( 'woocommerce_checkout_page_id' ); 107 $santander_log_page_id = get_option( 'santander_log_page' );108 94 109 95 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'] ) ) { … … 111 97 $santanderLoan->check_result( $_GET['token'] ); 112 98 exit; 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 Santander::run( new Santander_APIConnector( new Santander_Loan() ) ); 115 print Santander::$logger->getLogFile( ( isset( $_GET['d'] ) ? (int) $_GET['d'] : time() ) ); 116 exit; 117 } 99 } 118 100 } 119 101 … … 140 122 add_action( 'plugins_loaded', 'santander_init' ); 141 123 add_action( 'pre_get_posts', 'santander_pre_get_posts' ); 124 add_action( 'wp_loaded', 'santander_wp_loaded' ); 142 125 143 126 // Filter hooks
Note: See TracChangeset
for help on using the changeset viewer.