Plugin Directory

Changeset 1305079


Ignore:
Timestamp:
12/10/2015 09:07:06 AM (10 years ago)
Author:
ConsidS5
Message:

new version 1.0.6wo

Location:
easycontract
Files:
12 deleted
8 edited
13 copied

Legend:

Unmodified
Added
Removed
  • easycontract/tags/1.0.6wo/ext/santander/src/Santander/i18n/messages/en-GB.php

    r1279385 r1305079  
    5656    'Test Connections' => 'Test connection with web services.',
    5757    '<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",
    5862   
    5963    // Order Comments
     
    6771   
    6872    // 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.',
    6975    'Proceed to Santander' => 'Proceed to Santander',
    7076    '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  
    5656    'Test Connections' => 'Testa kontakt med webbtjänst',
    5757    '<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",
    5862   
    5963    // Order Comments
     
    6771   
    6872    // 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.',
    6975    'Proceed to Santander' => 'Fortsätt till Santander',
    7076    '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  
    3939        // The title to be used for the vertical tabs that can be ordered top to
    4040        // 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.' );
    4245       
    4346        // Displays an image next to the gateway's name on thefrontend
     
    126129                'default' => 'yes',
    127130            ),
     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            ),
    128139        );
    129140       
     
    161172           
    162173            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 );
    163186        }
    164187    }
  • easycontract/tags/1.0.6wo/includes/classes/Santander_APIConnector.php

    r1303710 r1305079  
    7272                return $this->_getReturnUrl();
    7373                break;
     74            case Config::CONFIG_KEY_ACCESS_LOG_EXTERNAL:
     75                return $this->_getAccessLogExternal();
     76                break;
    7477        }
    7578    }
     
    121124   
    122125    private function _getModuleVersion() {
    123         return '1.0.5wo';
     126        return '1.0.6wo';
    124127    }
    125128   
     
    136139        return get_permalink( $checkout_page_id );
    137140    }
     141   
     142    private function _getAccessLogExternal() {
     143        return $this->_gateway->get_option( 'access_log_external' ) == 'yes';
     144    }
    138145}
  • easycontract/tags/1.0.6wo/readme.txt

    r1303710 r1305079  
    44Requires at least: 4.0
    55Tested up to: 4.4
    6 Stable tag: 1.0.5wo
     6Stable tag: 1.0.6wo
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
    99WC requires at least: 2.4.6
    10 WC tested up to: 2.4.11
     10WC tested up to: 2.4.10
    1111
    1212== Description ==
     
    2323
    2424== Changelog ==
     25= 1.0.6wo =
     26* Changed: Better informative texts in checkout.
     27
    2528= 1.0.5wo =
    2629* Bug: Fixes a bug with token that is being incorrect encoded when sent to GetResult().
  • easycontract/tags/1.0.6wo/santander.php

    r1303710 r1305079  
    44Plugin URI: https://github.com/SantanderApps/SantanderPaymentProviderWooCommerce
    55Description: Integrates Santander Consumer Bank into WooCommerce.
    6 Version: 1.0.5wo
     6Version: 1.0.6wo
    77Author: Santander
    88Author URI: http://santander.consid.se
     
    1616    global $user_ID;
    1717   
    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    
    3218    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 );
    4119}
    4220
     
    4523 */
    4624function 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    
    5525    delete_option( 'santander_installation_date' );
    5626}
     
    7444    // Lets add it too WooCommerce
    7545    add_filter( 'woocommerce_payment_gateways', 'santander_add_gateway' );
     46}
     47
     48/**
     49 * This function will run when WP are loaded.
     50 * @return null
     51 */
     52function 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    }
    7663}
    7764
     
    10592function santander_pre_get_posts( $query ) {
    10693    $checkout_page_id = get_option( 'woocommerce_checkout_page_id' );
    107     $santander_log_page_id = get_option( 'santander_log_page' );
    10894   
    10995    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'] ) ) {
     
    11197        $santanderLoan->check_result( $_GET['token'] );
    11298        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    }
    118100}
    119101
     
    140122add_action( 'plugins_loaded', 'santander_init' );
    141123add_action( 'pre_get_posts', 'santander_pre_get_posts' );
     124add_action( 'wp_loaded', 'santander_wp_loaded' );
    142125
    143126// Filter hooks
  • easycontract/trunk/ext/santander/src/Santander/i18n/messages/en-GB.php

    r1279385 r1305079  
    5656    'Test Connections' => 'Test connection with web services.',
    5757    '<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",
    5862   
    5963    // Order Comments
     
    6771   
    6872    // 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.',
    6975    'Proceed to Santander' => 'Proceed to Santander',
    7076    '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  
    5656    'Test Connections' => 'Testa kontakt med webbtjänst',
    5757    '<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",
    5862   
    5963    // Order Comments
     
    6771   
    6872    // 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.',
    6975    'Proceed to Santander' => 'Fortsätt till Santander',
    7076    '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  
    3939        // The title to be used for the vertical tabs that can be ordered top to
    4040        // 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.' );
    4245       
    4346        // Displays an image next to the gateway's name on thefrontend
     
    126129                'default' => 'yes',
    127130            ),
     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            ),
    128139        );
    129140       
     
    161172           
    162173            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 );
    163186        }
    164187    }
  • easycontract/trunk/includes/classes/Santander_APIConnector.php

    r1303710 r1305079  
    7272                return $this->_getReturnUrl();
    7373                break;
     74            case Config::CONFIG_KEY_ACCESS_LOG_EXTERNAL:
     75                return $this->_getAccessLogExternal();
     76                break;
    7477        }
    7578    }
     
    121124   
    122125    private function _getModuleVersion() {
    123         return '1.0.5wo';
     126        return '1.0.6wo';
    124127    }
    125128   
     
    136139        return get_permalink( $checkout_page_id );
    137140    }
     141   
     142    private function _getAccessLogExternal() {
     143        return $this->_gateway->get_option( 'access_log_external' ) == 'yes';
     144    }
    138145}
  • easycontract/trunk/readme.txt

    r1303710 r1305079  
    44Requires at least: 4.0
    55Tested up to: 4.4
    6 Stable tag: 1.0.5wo
     6Stable tag: 1.0.6wo
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
    99WC requires at least: 2.4.6
    10 WC tested up to: 2.4.11
     10WC tested up to: 2.4.10
    1111
    1212== Description ==
     
    2323
    2424== Changelog ==
     25= 1.0.6wo =
     26* Changed: Better informative texts in checkout.
     27
    2528= 1.0.5wo =
    2629* Bug: Fixes a bug with token that is being incorrect encoded when sent to GetResult().
  • easycontract/trunk/santander.php

    r1303710 r1305079  
    44Plugin URI: https://github.com/SantanderApps/SantanderPaymentProviderWooCommerce
    55Description: Integrates Santander Consumer Bank into WooCommerce.
    6 Version: 1.0.5wo
     6Version: 1.0.6wo
    77Author: Santander
    88Author URI: http://santander.consid.se
     
    1616    global $user_ID;
    1717   
    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    
    3218    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 );
    4119}
    4220
     
    4523 */
    4624function 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    
    5525    delete_option( 'santander_installation_date' );
    5626}
     
    7444    // Lets add it too WooCommerce
    7545    add_filter( 'woocommerce_payment_gateways', 'santander_add_gateway' );
     46}
     47
     48/**
     49 * This function will run when WP are loaded.
     50 * @return null
     51 */
     52function 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    }
    7663}
    7764
     
    10592function santander_pre_get_posts( $query ) {
    10693    $checkout_page_id = get_option( 'woocommerce_checkout_page_id' );
    107     $santander_log_page_id = get_option( 'santander_log_page' );
    10894   
    10995    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'] ) ) {
     
    11197        $santanderLoan->check_result( $_GET['token'] );
    11298        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    }
    118100}
    119101
     
    140122add_action( 'plugins_loaded', 'santander_init' );
    141123add_action( 'pre_get_posts', 'santander_pre_get_posts' );
     124add_action( 'wp_loaded', 'santander_wp_loaded' );
    142125
    143126// Filter hooks
Note: See TracChangeset for help on using the changeset viewer.