Plugin Directory

Changeset 1856685


Ignore:
Timestamp:
04/11/2018 07:48:42 PM (8 years ago)
Author:
ctala
Message:

Adding 1.3.1

Location:
webpayplus-pst
Files:
11 edited
5 copied

Legend:

Unmodified
Added
Removed
  • webpayplus-pst/tags/1.3.1/classes/WC_Gateway_TBKAAS.php

    r1605773 r1856685  
    421421            /*
    422422             * Si el mensaje está validado verifico que la orden sea haya completado.
    423              * Si se completó la marco como completa y agrego los meta datos
     423             * Si se completó y los montos corresponden la marco como completa y agrego los meta datos
    424424             */
     425
     426            $ct_monto = $response->ct_monto;
     427            $monto = round($order->order_total);
     428
     429            if ($ct_monto != $monto) {
     430
     431                Logger::log_me_wp("Montos NO Corresponden");
     432                Logger::log_me_wp("Monto $ct_monto recibido es distinto a monto orden $monto");
     433                $order->update_status('failed', "El pago del pedido no fue exitoso debido a montos distintos");
     434                add_post_meta($order_id, '_order_id_mall', $response->ct_order_id_mall, true);
     435                if ($return) {
     436                    $http_helper->my_http_response_code(200);
     437                }
     438            }
     439            else
     440            {
     441                Logger::log_me_wp("Montos SI Corresponden");
     442            }
     443
     444
    425445            $ct_estado = $response->ct_estado;
    426446            Logger::log_me_wp("ESTADO DE LA ORDEN : $ct_estado");
  • webpayplus-pst/tags/1.3.1/readme.txt

    r1605773 r1856685  
    3636== Changelog ==
    3737
     38
     39= 1.3.1 =
     40* Forced Verification of montos.
     41
     42
    3843= 1.3.0 =
    3944* Added HTTPHelper
  • webpayplus-pst/tags/1.3.1/tbkaas-woo-gateway.php

    r1605773 r1856685  
    44
    55/*
    6   Plugin Name: PagoFácil.org - WebpayPlus
    7   Plugin URI:  http://www.pagofacil.org
    8   Description: Pasarela de Pagos para Woocommerce y Transbank usando WebPayPlus Webservices a través de PagoFacil.org
    9   Version:     1.3.0
     6  Plugin Name: Pago Fácil - WebpayPlus
     7  Plugin URI:  http://www.pagofacil.cl
     8  Description: Pasarela de Pagos para Woocommerce y Transbank usando WebPayPlus Webservices a través de PagoFacil.cl
     9  Version:     1.3.1
    1010  Author:      Cristian Tala Sánchez
    1111  Author URI:  http://www.cristiantala.cl
  • webpayplus-pst/tags/1.3.1/vendor/composer/ClassLoader.php

    r1550323 r1856685  
    5656    private $classMapAuthoritative = false;
    5757    private $missingClasses = array();
     58    private $apcuPrefix;
    5859
    5960    public function getPrefixes()
     
    273274
    274275    /**
     276     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
     277     *
     278     * @param string|null $apcuPrefix
     279     */
     280    public function setApcuPrefix($apcuPrefix)
     281    {
     282        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
     283    }
     284
     285    /**
     286     * The APCu prefix in use, or null if APCu caching is not enabled.
     287     *
     288     * @return string|null
     289     */
     290    public function getApcuPrefix()
     291    {
     292        return $this->apcuPrefix;
     293    }
     294
     295    /**
    275296     * Registers this instance as an autoloader.
    276297     *
     
    314335    public function findFile($class)
    315336    {
    316         // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
    317         if ('\\' == $class[0]) {
    318             $class = substr($class, 1);
    319         }
    320 
    321337        // class map lookup
    322338        if (isset($this->classMap[$class])) {
     
    326342            return false;
    327343        }
     344        if (null !== $this->apcuPrefix) {
     345            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
     346            if ($hit) {
     347                return $file;
     348            }
     349        }
    328350
    329351        $file = $this->findFileWithExtension($class, '.php');
     
    334356        }
    335357
     358        if (null !== $this->apcuPrefix) {
     359            apcu_add($this->apcuPrefix.$class, $file);
     360        }
     361
    336362        if (false === $file) {
    337363            // Remember that this class does not exist.
     
    349375        $first = $class[0];
    350376        if (isset($this->prefixLengthsPsr4[$first])) {
    351             foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
    352                 if (0 === strpos($class, $prefix)) {
    353                     foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
     377            $subPath = $class;
     378            while (false !== $lastPos = strrpos($subPath, '\\')) {
     379                $subPath = substr($subPath, 0, $lastPos);
     380                $search = $subPath.'\\';
     381                if (isset($this->prefixDirsPsr4[$search])) {
     382                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
     383                        $length = $this->prefixLengthsPsr4[$first][$search];
    354384                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
    355385                            return $file;
  • webpayplus-pst/tags/1.3.1/vendor/composer/LICENSE

    r1491276 r1856685  
    11
    2 Copyright (c) 2016 Nils Adermann, Jordi Boggiano
     2Copyright (c) Nils Adermann, Jordi Boggiano
    33
    44Permission is hereby granted, free of charge, to any person obtaining a copy
  • webpayplus-pst/tags/1.3.1/vendor/composer/autoload_real.php

    r1550323 r1856685  
    2424        spl_autoload_unregister(array('ComposerAutoloaderInit119bd6ab147b3fbc112a53a5d852e51a', 'loadClassLoader'));
    2525
    26         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
     26        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    2727        if ($useStaticLoader) {
    2828            require_once __DIR__ . '/autoload_static.php';
  • webpayplus-pst/tags/1.3.1/vendor/composer/installed.json

    r1550323 r1856685  
    1515            "shasum": ""
    1616        },
    17         "time": "2016-12-07 12:57:39",
     17        "time": "2016-12-07T12:57:39+00:00",
    1818        "type": "library",
    1919        "installation-source": "dist",
  • webpayplus-pst/trunk/classes/WC_Gateway_TBKAAS.php

    r1605773 r1856685  
    421421            /*
    422422             * Si el mensaje está validado verifico que la orden sea haya completado.
    423              * Si se completó la marco como completa y agrego los meta datos
     423             * Si se completó y los montos corresponden la marco como completa y agrego los meta datos
    424424             */
     425
     426            $ct_monto = $response->ct_monto;
     427            $monto = round($order->order_total);
     428
     429            if ($ct_monto != $monto) {
     430
     431                Logger::log_me_wp("Montos NO Corresponden");
     432                Logger::log_me_wp("Monto $ct_monto recibido es distinto a monto orden $monto");
     433                $order->update_status('failed', "El pago del pedido no fue exitoso debido a montos distintos");
     434                add_post_meta($order_id, '_order_id_mall', $response->ct_order_id_mall, true);
     435                if ($return) {
     436                    $http_helper->my_http_response_code(200);
     437                }
     438            }
     439            else
     440            {
     441                Logger::log_me_wp("Montos SI Corresponden");
     442            }
     443
     444
    425445            $ct_estado = $response->ct_estado;
    426446            Logger::log_me_wp("ESTADO DE LA ORDEN : $ct_estado");
  • webpayplus-pst/trunk/readme.txt

    r1605773 r1856685  
    3636== Changelog ==
    3737
     38
     39= 1.3.1 =
     40* Forced Verification of montos.
     41
     42
    3843= 1.3.0 =
    3944* Added HTTPHelper
  • webpayplus-pst/trunk/tbkaas-woo-gateway.php

    r1605773 r1856685  
    44
    55/*
    6   Plugin Name: PagoFácil.org - WebpayPlus
    7   Plugin URI:  http://www.pagofacil.org
    8   Description: Pasarela de Pagos para Woocommerce y Transbank usando WebPayPlus Webservices a través de PagoFacil.org
    9   Version:     1.3.0
     6  Plugin Name: Pago Fácil - WebpayPlus
     7  Plugin URI:  http://www.pagofacil.cl
     8  Description: Pasarela de Pagos para Woocommerce y Transbank usando WebPayPlus Webservices a través de PagoFacil.cl
     9  Version:     1.3.1
    1010  Author:      Cristian Tala Sánchez
    1111  Author URI:  http://www.cristiantala.cl
  • webpayplus-pst/trunk/vendor/composer/ClassLoader.php

    r1550323 r1856685  
    5656    private $classMapAuthoritative = false;
    5757    private $missingClasses = array();
     58    private $apcuPrefix;
    5859
    5960    public function getPrefixes()
     
    273274
    274275    /**
     276     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
     277     *
     278     * @param string|null $apcuPrefix
     279     */
     280    public function setApcuPrefix($apcuPrefix)
     281    {
     282        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
     283    }
     284
     285    /**
     286     * The APCu prefix in use, or null if APCu caching is not enabled.
     287     *
     288     * @return string|null
     289     */
     290    public function getApcuPrefix()
     291    {
     292        return $this->apcuPrefix;
     293    }
     294
     295    /**
    275296     * Registers this instance as an autoloader.
    276297     *
     
    314335    public function findFile($class)
    315336    {
    316         // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
    317         if ('\\' == $class[0]) {
    318             $class = substr($class, 1);
    319         }
    320 
    321337        // class map lookup
    322338        if (isset($this->classMap[$class])) {
     
    326342            return false;
    327343        }
     344        if (null !== $this->apcuPrefix) {
     345            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
     346            if ($hit) {
     347                return $file;
     348            }
     349        }
    328350
    329351        $file = $this->findFileWithExtension($class, '.php');
     
    334356        }
    335357
     358        if (null !== $this->apcuPrefix) {
     359            apcu_add($this->apcuPrefix.$class, $file);
     360        }
     361
    336362        if (false === $file) {
    337363            // Remember that this class does not exist.
     
    349375        $first = $class[0];
    350376        if (isset($this->prefixLengthsPsr4[$first])) {
    351             foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
    352                 if (0 === strpos($class, $prefix)) {
    353                     foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
     377            $subPath = $class;
     378            while (false !== $lastPos = strrpos($subPath, '\\')) {
     379                $subPath = substr($subPath, 0, $lastPos);
     380                $search = $subPath.'\\';
     381                if (isset($this->prefixDirsPsr4[$search])) {
     382                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
     383                        $length = $this->prefixLengthsPsr4[$first][$search];
    354384                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
    355385                            return $file;
  • webpayplus-pst/trunk/vendor/composer/LICENSE

    r1491276 r1856685  
    11
    2 Copyright (c) 2016 Nils Adermann, Jordi Boggiano
     2Copyright (c) Nils Adermann, Jordi Boggiano
    33
    44Permission is hereby granted, free of charge, to any person obtaining a copy
  • webpayplus-pst/trunk/vendor/composer/autoload_real.php

    r1550323 r1856685  
    2424        spl_autoload_unregister(array('ComposerAutoloaderInit119bd6ab147b3fbc112a53a5d852e51a', 'loadClassLoader'));
    2525
    26         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
     26        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    2727        if ($useStaticLoader) {
    2828            require_once __DIR__ . '/autoload_static.php';
  • webpayplus-pst/trunk/vendor/composer/installed.json

    r1550323 r1856685  
    1515            "shasum": ""
    1616        },
    17         "time": "2016-12-07 12:57:39",
     17        "time": "2016-12-07T12:57:39+00:00",
    1818        "type": "library",
    1919        "installation-source": "dist",
Note: See TracChangeset for help on using the changeset viewer.