@pixelpay/sdk-core 2.0.4 → 2.0.6
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 +11 -0
- package/CONTRIBUTING.md +8 -0
- package/README.md +0 -7
- package/index.html +33 -8
- package/lib/assets/formats.json +982 -0
- package/lib/base/Helpers.d.ts +3 -3
- package/lib/base/Helpers.js +4 -4
- package/lib/base/Helpers.js.map +1 -1
- package/lib/browser/index.js +3 -3
- package/lib/exceptions/RunningTransactionException.d.ts +2 -0
- package/lib/exceptions/RunningTransactionException.js +26 -0
- package/lib/exceptions/RunningTransactionException.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/libraries/CardinalManager.js +2 -2
- package/lib/libraries/CardinalManager.js.map +1 -1
- package/lib/requests/LookupTransaction.d.ts +1 -3
- package/lib/requests/LookupTransaction.js +7 -16
- package/lib/requests/LookupTransaction.js.map +1 -1
- package/lib/requests/SaleTransaction.d.ts +25 -0
- package/lib/requests/SaleTransaction.js +33 -1
- package/lib/requests/SaleTransaction.js.map +1 -1
- package/lib/requests/VoidTransaction.d.ts +4 -0
- package/lib/requests/VoidTransaction.js +4 -0
- package/lib/requests/VoidTransaction.js.map +1 -1
- package/lib/resources/Locations.d.ts +7 -0
- package/lib/resources/Locations.js +13 -0
- package/lib/resources/Locations.js.map +1 -1
- package/lib/services/CardinalAuthentication.d.ts +8 -0
- package/lib/services/CardinalAuthentication.js +17 -6
- package/lib/services/CardinalAuthentication.js.map +1 -1
- package/lib/services/Transaction.d.ts +12 -0
- package/lib/services/Transaction.js +35 -4
- package/lib/services/Transaction.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -1
- package/tests/Locations.test.ts +7 -2
- package/tests/Transaction.test.ts +24 -34
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ El formato se basa en [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
5
5
|
y este proyecto se adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
Tipos de cambios: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
|
|
7
7
|
|
|
8
|
+
## [v2.0.6] - 2023-06-09
|
|
9
|
+
### Added
|
|
10
|
+
- Se agregan campos de cuotas y puntos
|
|
11
|
+
- Se agrega firma de transacciones de anulación
|
|
12
|
+
- Se agrega función para obtener listado de formatos de teléfono y zip
|
|
13
|
+
|
|
14
|
+
## [v2.0.5] - 2022-12-13
|
|
15
|
+
### Fixed
|
|
16
|
+
- Mitigar enviar dos transacciones de manera concurrente
|
|
17
|
+
- Si se desea enviar más de una transacción concurrentemente, llamar el método `Transaction.withConcurrency`
|
|
18
|
+
|
|
8
19
|
## [v2.0.4] - 2022-11-04
|
|
9
20
|
### Fixed
|
|
10
21
|
- Arreglar eventos de Cardinal duplicándose en algunos casos
|
package/CONTRIBUTING.md
ADDED
package/README.md
CHANGED
|
@@ -47,10 +47,3 @@ Ejemplo HTML con Angular:
|
|
|
47
47
|
</body>
|
|
48
48
|
</html>
|
|
49
49
|
```
|
|
50
|
-
|
|
51
|
-
## ¿Como publicar?
|
|
52
|
-
|
|
53
|
-
- Cambiar version de release en package.json
|
|
54
|
-
- Agregar al CHANGELOG.md las descripciones del cambio
|
|
55
|
-
- Crear un commit con los cambios y publicar
|
|
56
|
-
- Ejecutar `npm publish --access public`
|
package/index.html
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
</div>
|
|
70
70
|
<div class="row">
|
|
71
71
|
<div class="column">
|
|
72
|
-
<button name="loading" class="w-100">
|
|
72
|
+
<button name="loading" class="w-100">Without Loading</button>
|
|
73
73
|
</div>
|
|
74
74
|
<div class="column">
|
|
75
75
|
<button name="status" class="w-100">Payment Status</button>
|
|
@@ -102,10 +102,26 @@
|
|
|
102
102
|
</select>
|
|
103
103
|
</fieldset>
|
|
104
104
|
|
|
105
|
-
<
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
<div class="row">
|
|
106
|
+
<div class="column">
|
|
107
|
+
<fieldset>
|
|
108
|
+
<legend>Currency</legend>
|
|
109
|
+
<select name="currency" id="currency">
|
|
110
|
+
<option selected value="HNL">L</option>
|
|
111
|
+
<option value="USD">$</option>
|
|
112
|
+
<option value="NIO">C$</option>
|
|
113
|
+
<option value="GTQ">Q.</option>
|
|
114
|
+
<option value="CRC">₡</option>
|
|
115
|
+
</select>
|
|
116
|
+
</fieldset>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="column">
|
|
119
|
+
<fieldset>
|
|
120
|
+
<legend>Amount</legend>
|
|
121
|
+
<input type="number" name="amount" value="1.00">
|
|
122
|
+
</fieldset>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
109
125
|
|
|
110
126
|
<div class="row">
|
|
111
127
|
<div class="column">
|
|
@@ -211,7 +227,7 @@
|
|
|
211
227
|
function getOrder() {
|
|
212
228
|
const order = new Models.Order();
|
|
213
229
|
order.id = document.querySelector('input[name="uuid"]').value || 'TEST-1234';
|
|
214
|
-
order.currency = '
|
|
230
|
+
order.currency = document.querySelector('select[name="currency"]').value;
|
|
215
231
|
order.amount = parseFloat(document.querySelector('input[name=amount]').value);
|
|
216
232
|
order.customer_name = 'Jhon Doe';
|
|
217
233
|
order.customer_email = 'jhondoe@pixel.hn';
|
|
@@ -230,8 +246,17 @@
|
|
|
230
246
|
document.querySelector('input[name=card_number]').value = card_selected;
|
|
231
247
|
}
|
|
232
248
|
|
|
233
|
-
document.querySelector('button[name=loading]').onclick = () => {
|
|
234
|
-
|
|
249
|
+
document.querySelector('button[name=loading]').onclick = (event) => {
|
|
250
|
+
const button = event.target;
|
|
251
|
+
const main = document.querySelector('main');
|
|
252
|
+
|
|
253
|
+
if (main.hasAttribute('without-sdk-loading')) {
|
|
254
|
+
main.removeAttribute('without-sdk-loading');
|
|
255
|
+
button.innerText = 'Without Loading';
|
|
256
|
+
} else {
|
|
257
|
+
main.setAttribute('without-sdk-loading', '');
|
|
258
|
+
button.innerText = 'With Loading';
|
|
259
|
+
}
|
|
235
260
|
}
|
|
236
261
|
|
|
237
262
|
document.querySelector('button[name=sale]').onclick = () => {
|