payment-token-efi 3.0.4 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/README.md +12 -3
- package/assets/img/local-identificador-de-conta.png +0 -0
- package/dist/payment-token-efi-cjs.min.js +2 -2
- package/dist/payment-token-efi-esm.min.js +2 -2
- package/dist/payment-token-efi-umd.min.js +2 -2
- package/dist/payment-token-efi.min.js +2 -2
- package/examples/app-angular.ts +2 -0
- package/examples/app-browser.html +2 -0
- package/examples/app-react.js +2 -0
- package/examples/app-react.tsx +2 -0
- package/examples/app-vue.vue +2 -0
- package/examples/webview-react-native.js +117 -0
- package/index.html +72 -31
- package/package.json +1 -1
- package/types/payment-token-efi.d.ts +2 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
[Release 3.1.1](https://github.com/efipay/js-payment-token-efi/releases/tag/3.1.1) (2025-01-28)
|
|
5
|
+
----------------------------------------------------------------------------------------------
|
|
6
|
+
* Adicionado validação se o ambiente possui DOM
|
|
7
|
+
* Otimização e melhores tratativas de erro
|
|
8
|
+
|
|
9
|
+
[Release 3.1.0](https://github.com/efipay/js-payment-token-efi/releases/tag/3.1.0) (2024-12-04)
|
|
10
|
+
----------------------------------------------------------------------------------------------
|
|
11
|
+
* Adicionado campos nome e documento do titular
|
|
12
|
+
|
|
13
|
+
[Release 3.0.4](https://github.com/efipay/js-payment-token-efi/releases/tag/3.0.4) (2024-11-22)
|
|
14
|
+
----------------------------------------------------------------------------------------------
|
|
15
|
+
* Melhorias para evitar fingerprint bloqueado
|
|
16
|
+
|
|
17
|
+
[Release 3.0.3](https://github.com/efipay/js-payment-token-efi/releases/tag/3.0.3) (2024-07-18)
|
|
18
|
+
----------------------------------------------------------------------------------------------
|
|
19
|
+
* Validação de método inexistente
|
|
20
|
+
|
|
21
|
+
[Release 3.0.2](https://github.com/efipay/js-payment-token-efi/releases/tag/3.0.2) (2024-07-18)
|
|
22
|
+
----------------------------------------------------------------------------------------------
|
|
23
|
+
* Novas correções em tipagem typescript
|
|
24
|
+
|
|
25
|
+
[Release 3.0.1](https://github.com/efipay/js-payment-token-efi/releases/tag/3.0.1) (2024-07-18)
|
|
26
|
+
----------------------------------------------------------------------------------------------
|
|
27
|
+
* Correção em tipagem typescript
|
|
28
|
+
|
|
29
|
+
[Release 3.0.0](https://github.com/efipay/js-payment-token-efi/releases/tag/3.0.0) (2024-07-18)
|
|
30
|
+
----------------------------------------------------------------------------------------------
|
|
31
|
+
* Refatorado chamada das funções
|
|
32
|
+
* Adicionado tipagem para typescript
|
|
33
|
+
* Removida compatibilidade com cjs
|
|
34
|
+
* Adicionado exemplos de utilização
|
|
35
|
+
|
|
36
|
+
[Release 2.1.0](https://github.com/efipay/js-payment-token-efi/releases/tag/2.1.0) (2023-07-05)
|
|
37
|
+
----------------------------------------------------------------------------------------------
|
|
38
|
+
* Ajustes para funcionamento em sandbox.
|
|
39
|
+
|
|
40
|
+
[Release 2.0.2](https://github.com/efipay/js-payment-token-efi/releases/tag/2.0.2) (2023-06-27)
|
|
41
|
+
----------------------------------------------------------------------------------------------
|
|
42
|
+
* Correção em validação bandeira
|
|
43
|
+
|
|
44
|
+
[Release 2.0.1](https://github.com/efipay/js-payment-token-efi/releases/tag/2.0.1) (2023-06-26)
|
|
45
|
+
----------------------------------------------------------------------------------------------
|
|
46
|
+
* Atualização da documentação
|
|
47
|
+
|
|
48
|
+
[Release 2.0.0](https://github.com/efipay/js-payment-token-efi/releases/tag/2.0.0) (2023-06-26)
|
|
49
|
+
----------------------------------------------------------------------------------------------
|
|
50
|
+
* Melhorias e módulo cjs
|
|
51
|
+
|
|
52
|
+
[Release 1.1.5](https://github.com/efipay/js-payment-token-efi/releases/tag/1.1.5) (2023-06-14)
|
|
53
|
+
----------------------------------------------------------------------------------------------
|
|
54
|
+
* Novas validações número cartão e cvv
|
|
55
|
+
|
|
56
|
+
[Release 1.1.5](https://github.com/efipay/js-payment-token-efi/releases/tag/1.1.5) (2023-06-14)
|
|
57
|
+
----------------------------------------------------------------------------------------------
|
|
58
|
+
* Novas validações número cartão e cvv
|
|
59
|
+
|
|
60
|
+
[Release 1.1.4](https://github.com/efipay/js-payment-token-efi/releases/tag/1.1.4) (2023-06-14)
|
|
61
|
+
----------------------------------------------------------------------------------------------
|
|
62
|
+
* Validações número cartão e cvv
|
|
63
|
+
|
|
64
|
+
[Release 1.1.3](https://github.com/efipay/js-payment-token-efi/releases/tag/1.1.3) (2023-06-08)
|
|
65
|
+
----------------------------------------------------------------------------------------------
|
|
66
|
+
* Validação ambiente em debug
|
|
67
|
+
|
|
68
|
+
[Release 1.1.2](https://github.com/efipay/js-payment-token-efi/releases/tag/1.1.2) (2023-06-06)
|
|
69
|
+
----------------------------------------------------------------------------------------------
|
|
70
|
+
* Criado package.json
|
|
71
|
+
|
|
72
|
+
[Release 1.1.1](https://github.com/efipay/js-payment-token-efi/releases/tag/1.1.1) (2023-06-01)
|
|
73
|
+
----------------------------------------------------------------------------------------------
|
|
74
|
+
* Melhores resultados em debug
|
|
75
|
+
|
|
76
|
+
[Release 1.1.0](https://github.com/efipay/js-payment-token-efi/releases/tag/1.1.0) (2023-05-31)
|
|
77
|
+
----------------------------------------------------------------------------------------------
|
|
78
|
+
* Adicionado fingerprint
|
|
79
|
+
|
|
80
|
+
[Release 1.0.0](https://github.com/efipay/js-payment-token-efi/releases/tag/1.0.0) (2023-05-10)
|
|
81
|
+
----------------------------------------------------------------------------------------------
|
|
82
|
+
* Initial release
|
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ Realize o [download da biblioteca](https://raw.githubusercontent.com/efipay/js-p
|
|
|
47
47
|
```
|
|
48
48
|
- **Importação por CDN**
|
|
49
49
|
```html
|
|
50
|
-
<script src="https://cdn.jsdelivr.net/
|
|
50
|
+
<script src="https://cdn.jsdelivr.net/npm/payment-token-efi/dist/payment-token-efi-umd.min.js"></script>
|
|
51
51
|
```
|
|
52
52
|
_**Obs**: neste tipo de aplicação, utilize o módulo **umd**._
|
|
53
53
|
|
|
@@ -88,6 +88,10 @@ const EfiPay = require("payment-token-efi");
|
|
|
88
88
|
```
|
|
89
89
|
_**Obs**: Esta biblioteca não é compatível no backend em Node.js_
|
|
90
90
|
|
|
91
|
+
### **Frameworks com WebView (React Native e outros)**
|
|
92
|
+
|
|
93
|
+
Para aplicações que não possuem DOM nativo, como React Native, Ionic, Swift, e outros frameworks similares, é necessário utilizar um componente WebView para executar a biblioteca. O WebView permite que a biblioteca funcione corretamente, pois fornece um ambiente DOM para sua execução. [Disponibilizamos aqui](https://raw.githubusercontent.com/efipay/js-payment-token-efi/main/examples/webview-react-native.js) um exemplo de demonstração com React Native.
|
|
94
|
+
|
|
91
95
|
### **Tipagens TypeScript**
|
|
92
96
|
|
|
93
97
|
Se você estiver utilizando TypeScript, quando você instalar a biblioteca **payment-token-efi**, o TypeScript deve ser capaz de encontrar os tipos automaticamente localizados em `types/payment-token-efi.d.ts`
|
|
@@ -100,7 +104,8 @@ Este script oferece três funções para manipulação de dados de cartão de cr
|
|
|
100
104
|
|
|
101
105
|
Para utilizar esse script, é necessário passar o código **Identificador de Conta** (payee_code) como parâmetro para gerar o payment_token dos dados do cartão de crédito. Você pode obter essa informação em sua conta digital, no menu `API > Introdução > Identificador de Conta`. <a href='https://s3.amazonaws.com/gerencianet-pub-prod-1/printscreen/2023/03/08/matheus.rodrigues/24fa15-dda30019-a643-409e-8813-c7cc68adcc40.png' target='_blank'>Veja onde encontrar</a>.
|
|
102
106
|
|
|
103
|
-
|
|
107
|
+
Neste repositório, você encontra exemplos para usar a biblioteca. Confira esses exemplos [clicando aqui](https://github.com/efipay/js-payment-token-efi/tree/main/examples).
|
|
108
|
+
|
|
104
109
|
|
|
105
110
|
### **Identificar a bandeira**
|
|
106
111
|
|
|
@@ -192,6 +197,8 @@ Para utilizar esse script, é necessário passar o código **Identificador de Co
|
|
|
192
197
|
| - | cvv | string | Sim |
|
|
193
198
|
| - | expirationMonth `'MM'` | string | Sim |
|
|
194
199
|
| - | expirationYear `'YYYY'` | string | Sim |
|
|
200
|
+
| - | holderName `'Nome impresso no cartão'` | string | Não |
|
|
201
|
+
| - | holderDocument `CPF ou CPNJ` | string | Não |
|
|
195
202
|
| - | reuse | boolean | Não |
|
|
196
203
|
| debugger | Depurador de código | boolean | Não |
|
|
197
204
|
|
|
@@ -202,13 +209,15 @@ Para utilizar esse script, é necessário passar o código **Identificador de Co
|
|
|
202
209
|
try {
|
|
203
210
|
const result = await EfiPay.CreditCard
|
|
204
211
|
.setAccount("Identificador_de_conta_aqui")
|
|
205
|
-
.setEnvironment("production")
|
|
212
|
+
.setEnvironment("production")
|
|
206
213
|
.setCreditCardData({
|
|
207
214
|
brand: "visa",
|
|
208
215
|
number: "4485785674290087",
|
|
209
216
|
cvv: "123",
|
|
210
217
|
expirationMonth: "05",
|
|
211
218
|
expirationYear: "2029",
|
|
219
|
+
holderName: "Gorbadoc Oldbuck",
|
|
220
|
+
holderDocument: "94271564656",
|
|
212
221
|
reuse: false,
|
|
213
222
|
})
|
|
214
223
|
.getPaymentToken();
|
|
Binary file
|