diff --git a/readme.txt b/readme.txt
index 0e184090..55fe460f 100644
--- a/readme.txt
+++ b/readme.txt
@@ -11,7 +11,7 @@ Tested up to: 6.4
WC requires at least: 3.0.0
WC tested up to: 8.6.1
Requires PHP: 5.6
-Stable Tag: 1.2.9
+Stable Tag: 1.3.0
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -40,6 +40,11 @@ Para dúvidas e suporte técnico, entre em contato com a equipe Vindi através d
== Changelog ==
+= 1.3.0 - 06/05/2024 =
+-Lançamento da versão de patch.
+- **Melhoria:** Refatoração nas funções de processamento de webhooks
+- **Correção:** Atualização de expressões regulares para identificação de bandeiras de cartão
+
= 1.2.9 - 18/04/2024 =
-Lançamento da versão de patch.
- **Correção:** Utilização da função save durante atualização de metadados com HPOS
diff --git a/src/assets/images/card/hipercard.svg b/src/assets/images/card/hipercard.svg
index f6db55af..1ea5a3e5 100644
--- a/src/assets/images/card/hipercard.svg
+++ b/src/assets/images/card/hipercard.svg
@@ -1,5 +1 @@
-
-
+
\ No newline at end of file
diff --git a/src/assets/js/brands.js b/src/assets/js/brands.js
index 962bec76..6622ca29 100644
--- a/src/assets/js/brands.js
+++ b/src/assets/js/brands.js
@@ -63,16 +63,16 @@ class Brands {
getCard(card) {
const brandsRegex = {
- mastercard: new RegExp("^(5[1-5]\\d{0,2}|22[2-9]\\d{0,1}|2[3-7]\\d{0,2})\\d{0,12}"),
- visa: new RegExp("^4\\d{0,15}"),
+ mastercard: new RegExp("^5[1-5][0-9]{14}$"),
+ visa: new RegExp("^4[0-9]{12}(?:[0-9]{3})?$"),
elo: new RegExp(
"^(4011(78|79)|43(1274|8935)|45(1416|7393|763(1|2))|50(4175|6699|67[0-7][0-9]|9000)|50(9[0-9][0-9][0-9])|627780|63(6297|6368)|650(03([^4])|04([0-9])|05(0|1)|05([7-9])|06([0-9])|07([0-9])|08([0-9])|4([0-3][0-9]|8[5-9]|9[0-9])|5([0-9][0-9]|3[0-8])|9([0-6][0-9]|7[0-8])|7([0-2][0-9])|541|700|720|727|901)|65165([2-9])|6516([6-7][0-9])|65500([0-9])|6550([0-5][0-9])|655021|65505([6-7])|6516([8-9][0-9])|65170([0-4]))\\d{0,15}"
),
- hipercard: new RegExp("^(38[0-9]{17}|60[0-9]{14})\\d{0,15}"),
+ hipercard: new RegExp("^606282|^3841(?:[0|4|6]{1})0"),
jcb: new RegExp("^(?:2131|1800|35[0-9]{3})[0-9]{11}$"),
- diners_club: new RegExp("3(?:0([0-5]|9)|[689]\\d?)\\d{0,11}"),
- discover: new RegExp("^(?:6011|65\\d{0,2}|64[4-9]\\d?)\\d{0,12}"),
- american_express: new RegExp("^3[47]\\d{0,13}"),
+ diners_club: new RegExp("^3(?:0[0-5]|[68][0-9])[0-9]{11}$"),
+ discover: new RegExp("^6(?:011|5[0-9]{2})[0-9]{12}$"),
+ american_express: new RegExp("^3[47][0-9]{13}$"),
aura: new RegExp("^((?!504175))^((?!5067))(^50[0-9])"),
};
diff --git a/src/utils/DefinitionVariables.php b/src/utils/DefinitionVariables.php
index 572eef97..1c9e0a0d 100644
--- a/src/utils/DefinitionVariables.php
+++ b/src/utils/DefinitionVariables.php
@@ -1,6 +1,6 @@