Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare release 1.9.0 #237

Merged
merged 81 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
e430565
docs: fix url for badges
mastudillot Mar 19, 2024
f3e9718
docs: replace release badge from travis to github
mastudillot Mar 19, 2024
e1e4ead
docs: update docker links
mastudillot Mar 19, 2024
b929d30
docs: fix typo
mastudillot Mar 19, 2024
1fcf77e
docs: improve docker list description
mastudillot Mar 19, 2024
672cc80
refactor: implement log controller
mastudillot Mar 19, 2024
3b22115
style: format file
mastudillot Mar 19, 2024
874a9b9
feat: add log file selector
mastudillot Mar 19, 2024
ced5d10
refactor: remove unnecessary div
mastudillot Mar 19, 2024
a97b2b3
feat: remove log state
mastudillot Mar 19, 2024
b6ff951
feat: remove log count
mastudillot Mar 19, 2024
e9030d5
feat: remove log list
mastudillot Mar 19, 2024
ddebe2f
feat: remove last document name
mastudillot Mar 19, 2024
7758dee
refactor: remove div
mastudillot Mar 19, 2024
567c668
refactor: remove if when folder has logs
mastudillot Mar 19, 2024
da8d6b6
feat: move log selector to log info section
mastudillot Mar 19, 2024
60f4486
feat: add protection when there are no log files
mastudillot Mar 19, 2024
10862c3
feat: update log file title
mastudillot Mar 19, 2024
6e7da08
refactor: remove unnecessary ids
mastudillot Mar 19, 2024
f1552d2
Merge pull request #223 from TransbankDevelopers/docs/update-readme-l…
mastudillot Mar 19, 2024
e8e8c36
style: split long lines
mastudillot Mar 19, 2024
2c19f1f
fix: sonar issues
mastudillot Mar 19, 2024
d19d17b
feat: disable component when there are no logs
mastudillot Mar 20, 2024
5e130b5
refactor: remove redundant null check
mastudillot Mar 20, 2024
c8de4b1
feat: add select property
mastudillot Mar 20, 2024
ce3cff5
Merge pull request #224 from TransbankDevelopers/feat/allow-select-lo…
mastudillot Mar 20, 2024
5c16ad8
feat: add suffix when card added in integration
mastudillot May 23, 2024
1aa0c91
feat: show cards based on the environment
mastudillot May 24, 2024
8fba09e
refactor: remove unused parameter
mastudillot May 24, 2024
33148b2
feat: update webpay gateway description
mastudillot May 24, 2024
c15e0cc
Merge pull request #229 from TransbankDevelopers/feat/update-webpay-d…
mastudillot May 24, 2024
1e9cd44
Merge pull request #228 from TransbankDevelopers/feat/show-cards-base…
mastudillot May 24, 2024
8ca7848
fix: add try catch in scheduled_subscription_payment method
mastudillot May 24, 2024
a704c59
refactor: remove dead code
mastudillot May 24, 2024
e251ff3
Merge pull request #230 from TransbankDevelopers/fix/exception-when-p…
mastudillot May 27, 2024
bc2872a
fix: remove deprecated hook
mastudillot May 28, 2024
cc2e1f9
chore: add woocommerce as a dependency
mastudillot May 28, 2024
a56c52b
Merge pull request #231 from TransbankDevelopers/fix/wc-payment-gatea…
mastudillot May 28, 2024
b2d3ee6
Merge pull request #232 from TransbankDevelopers/chore/add-woocommerc…
mastudillot May 28, 2024
6e65070
refactor: reorder methods positions
mastudillot May 28, 2024
c46ab65
refactor: add method checkOrderCanBePaid
mastudillot May 28, 2024
5a8b4fb
refactor: add method checkUserIsLoggedIn
mastudillot May 28, 2024
3ee9ba8
feat: update getWcPaymentToken to accept payment token id
mastudillot May 29, 2024
ed870c5
refactor: change method getAmountForAuthorize to getTotalAmountFromOrder
mastudillot May 29, 2024
0bf20d7
refactor: change method setAfterPaymentOrderStatus to setOrderAsComplete
mastudillot May 29, 2024
206b12e
docs: add doc to getTotalAmountFromOrder method
mastudillot May 29, 2024
d13c5a1
feat: add method emptyCart
mastudillot May 29, 2024
ead6945
feat: add method setOrderAsFailed
mastudillot May 29, 2024
57d048a
refactor: change method add_order_notes to getOrderNotesFromAuthorize…
mastudillot May 29, 2024
0ac170f
feat: add method handleInscription
mastudillot May 29, 2024
763d4fb
feat: add property shouldThrowException
mastudillot May 29, 2024
8827d7f
feat: add method handleAuthorization
mastudillot May 29, 2024
cc8aa8a
feat: add method handleRequest
mastudillot May 29, 2024
147a001
refactor: implement method handleRequest
mastudillot May 29, 2024
79293d2
docs: add docs for method handleAuthorization
mastudillot May 29, 2024
d34ae0e
docs: add docs for method handleInscription
mastudillot May 29, 2024
b09edc8
docs: add docs for method handleRequest
mastudillot May 29, 2024
3a5e10e
refactor: implement new flow for subscription authorizations
mastudillot May 29, 2024
86b877b
refactor: remove authorizeTransaction method
mastudillot May 29, 2024
aaf2549
fix: check if exception is defined in finally block
mastudillot May 29, 2024
dec3071
fix: pass token to authorize in scheduled_subscription_payment
mastudillot May 29, 2024
d560959
feat: add log when finish subscription authorization
mastudillot May 29, 2024
5ba9c65
feat: add log when finish oneclick payment
mastudillot May 29, 2024
51798b3
feat: add log when authorization throw exception
mastudillot May 29, 2024
a96db6c
feat: translate logs to spanish
mastudillot May 29, 2024
6f6a5fd
refactor: rename method get_saved_payment_methods_list to getOneclick…
mastudillot May 29, 2024
9207d62
Merge pull request #233 from TransbankDevelopers/refactor/improve-aut…
mastudillot May 29, 2024
ca3eec5
refactor: replace echo for short php tag
mastudillot May 28, 2024
c247064
fix: use echo to construct HTML
mastudillot May 28, 2024
14825f4
Merge pull request #234 from TransbankDevelopers/fix/kiuwan-issues
mastudillot May 29, 2024
d1c30dc
fix: use correct method in payment token filters
mastudillot May 29, 2024
8ac1add
Merge pull request #235 from TransbankDevelopers/fix/paymnet-token-cl…
mastudillot May 29, 2024
39e5434
fix: use custom variable instead $_POST
mastudillot May 29, 2024
3e9cf1c
feat: sanitize data from payment form
mastudillot May 29, 2024
b0dd55b
refactor: rename method handleRequest to handleOneclickPayment
mastudillot May 29, 2024
1c4fd68
Merge pull request #236 from TransbankDevelopers/fix/kiuwan-report
mastudillot May 29, 2024
312a62a
docs: update changelog
mastudillot May 29, 2024
b389dc3
chore: update woocommerce tested up version
mastudillot May 29, 2024
47c62c0
docs: add upgrade notice
mastudillot May 30, 2024
d591805
chore: update wordpress tested up version
mastudillot May 30, 2024
391b9c5
docs: fix typo
mastudillot May 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/transbankdevelopers/transbank-plugin-woocommerce-webpay)](https://github.com/TransbankDevelopers/transbank-plugin-woocommerce-webpay/releases/latest)
[![GitHub](https://img.shields.io/github/license/transbankdevelopers/transbank-plugin-woocommerce-webpay)](LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/transbankdevelopers/transbank-plugin-woocommerce-webpay)](https://github.com/TransbankDevelopers/transbank-plugin-woocommerce-webpay/graphs/contributors)
[![Build Status](https://travis-ci.org/TransbankDevelopers/transbank-plugin-woocommerce-webpay.svg?branch=master)](https://travis-ci.org/TransbankDevelopers/transbank-plugin-woocommerce-webpay)
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/transbankdevelopers/transbank-plugin-woocommerce-webpay-rest)](https://github.com/TransbankDevelopers/transbank-plugin-woocommerce-webpay-rest/releases/latest)
[![GitHub](https://img.shields.io/github/license/transbankdevelopers/transbank-plugin-woocommerce-webpay-rest)](LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/transbankdevelopers/transbank-plugin-woocommerce-webpay-rest)](https://github.com/TransbankDevelopers/transbank-plugin-woocommerce-webpay-rest/graphs/contributors)
[![Release](https://github.com/TransbankDevelopers/transbank-plugin-woocommerce-webpay-rest/actions/workflows/release.yml/badge.svg)](https://github.com/TransbankDevelopers/transbank-plugin-woocommerce-webpay-rest/actions/workflows/release.yml)

# Transbank Woocommerce Webpay Plugin
Plugin oficial de Webpay para WooCommerce
Expand Down Expand Up @@ -45,11 +45,13 @@ Para cumplir estas dependencias, debes instalar [Composer](https://getcomposer.o

Para apoyar el levantamiento rápido de un ambiente de desarrollo, hemos creado la especificación de contenedores a través de Docker Compose.

Para testear los ejemplos estos estan disponibles en:
- [WooCommerce 3.4.0 con php 7.1](./docker-woocommerce-php7.1)
- [WooCommerce 3.6.3 con php 7.2](./docker-woocommerce-php7.2)
- [WooCommerce 3.9.1 con php 7.3](./docker-woocommerce-php7.3)
- [WooCommerce 3.9.1 con php 7.4](./docker-woocommerce-php7.4)
Para probar el plugin, ponemos a disposición los siguientes contenedores:
- [WooCommerce 6.0 con php 7.4](./docker-woocommerce-php7.4-wp6.0.0-wc2.6.0-woo6.0.0)
- [WooCommerce 6.5 con php 7.4](./docker-woocommerce-php7.4-wp6.0.0-wc2.6.0-woo6.5.0)
- [WooCommerce 8.1 con php 8.2](./docker-woocommerce-php8.2-wp6.4.1-wc2.9.0-woo8.1.0)
- [WooCommerce 8.2 con php 8.2](./docker-woocommerce-php8.2-wp6.4.1-wc2.9.0-woo8.2.0)
- [WooCommerce 8.3 con php 8.2](./docker-woocommerce-php8.2-wp6.4.1-wc2.9.0-woo8.3.0)
- [WooCommerce 8.5 con php 8.2](./docker-woocommerce-php8.2-wp6.4.1-wc2.9.0-woo8.5.0)

Si necesitas subir el plugin a Woocommerce y obtienes un error por que no se puede mover el archivo a `wp-contentent` entonces ejecuta

Expand Down Expand Up @@ -116,7 +118,7 @@ Con eso Travis CI generará automáticamente una nueva versión del plugin y act

2️⃣ - El pr debe tener 2 o mas aprobaciones para hacer el merge

3️⃣ - si un commit revierte un commit anterior debera comenzar con "revert:" seguido con texto del commit anterior
3️⃣ - si un commit revierte un commit anterior deberá comenzar con "revert:" seguido con texto del commit anterior

## Pull Request

Expand Down
2 changes: 1 addition & 1 deletion plugin/css/tbk.css
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
display: grid;
grid-template-columns: 20px 200px 1fr;
grid-gap: 5px;
align-items: flex-start;
align-items: center;
overflow: hidden;
}

Expand Down
20 changes: 19 additions & 1 deletion plugin/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: TransbankDevelopers
Tags: transbank, webpay, oneclick, webpay plus, rest, chile
Requires at least: 5.3
Tested up to: 6.4
Tested up to: 6.5.3
Requires PHP: 7.4
Stable tag: VERSION_REPLACE_HERE
License: 3-Clause BSD License
Expand All @@ -14,6 +14,15 @@ Recibe pagos en línea con tarjetas de crédito, débito y prepago en tu WooComm
Recibe pagos en línea con tarjetas de crédito, débito y prepago en tu WooCommerce a través de Webpay Plus y Webpay Oneclick

== Changelog ==
= 1.9.0 =
* Se agrega la opción de poder seleccionar el archivo log en la sección de registros del menú de configuración.
* Se agrega la funcionalidad para que se muestren las tarjetas registradas de Oneclick dependiendo del entorno.
* Se agrega el sufijo [Test] a las tarjetas registradas con Oneclick en entorno de integración.
* Se agrega como dependencia el plugin de WooCommerce.
* Se actualiza el título del producto Webpay pasando de Transbank Webpay Plus a Webpay Plus.
* Se arregla un problema que impedía capturar las excepciones cuando se autorizaba una suscripción.
* Se elimina un hook deprecado que provocaba errores de instalación en algunos entornos.

= 1.8.0 =
* Se corrige un problema con el contenido del archivo log que provocaba que se desborde.
* Se agrega la funcionalidad para cambiar la descripción de los medios de pago desde la configuración del plugin.
Expand Down Expand Up @@ -154,6 +163,15 @@ Arreglado:
* Initial release.

== Upgrade Notice ==
= 1.9.0 =
* Se agrega la opción de poder seleccionar el archivo log en la sección de registros del menú de configuración.
* Se agrega la funcionalidad para que se muestren las tarjetas registradas de Oneclick dependiendo del entorno.
* Se agrega el sufijo [Test] a las tarjetas registradas con Oneclick en entorno de integración.
* Se agrega como dependencia el plugin de WooCommerce.
* Se actualiza el título del producto Webpay pasando de Transbank Webpay Plus a Webpay Plus.
* Se arregla un problema que impedía capturar las excepciones cuando se autorizaba una suscripción.
* Se elimina un hook deprecado que provocaba errores de instalación en algunos entornos.

= 1.8.0 =
* Se corrige un problema con el contenido del archivo log que provocaba que se desborde.
* Se agrega la funcionalidad para cambiar la descripción de los medios de pago desde la configuración del plugin.
Expand Down
52 changes: 52 additions & 0 deletions plugin/src/Controllers/LogController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

namespace Transbank\WooCommerce\WebpayRest\Controllers;

use Transbank\Plugin\Helpers\PluginLogger;
use Transbank\WooCommerce\WebpayRest\Utils\Template;
use Transbank\WooCommerce\WebpayRest\Helpers\TbkFactory;

class LogController
{

private Template $template;
private PluginLogger $log;

public function __construct()
{
$this->template = new Template();
$this->log = TbkFactory::createLogger();
}
public function show()
{
$summary = $this->log->getInfo();
$logFile = basename($summary['last']);

if (isset($_GET['log_file'])) {
$isLogFileNameValid = $this->validateLogFileName($_GET['log_file'], $summary['logs']);

if ($isLogFileNameValid) {
$logFile = $_GET['log_file'];
}
}

$logDetail = $this->log->getLogDetail($logFile);
$folderHasLogs = $summary['length'] > 0;

$this->template->render('admin/log.php', [
'resume' => $summary,
'lastLog' => $logDetail,
'folderHasLogs' => $folderHasLogs
]);
}

private function validateLogFileName(String $logFileName, array $logFiles): bool
{
foreach ($logFiles as $logData) {
if (in_array($logFileName, $logData)) {
return true;
}
}
return false;
}
}
Loading
Loading