@pixelpay/sdk-core 2.1.0 → 2.1.3-beta.0
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 +22 -0
- package/lib/base/Helpers.d.ts +1 -1
- package/lib/base/Helpers.js +4 -3
- package/lib/base/Helpers.js.map +1 -1
- package/lib/base/RequestBehaviour.d.ts +18 -1
- package/lib/base/RequestBehaviour.js +22 -2
- package/lib/base/RequestBehaviour.js.map +1 -1
- package/lib/base/ServiceBehaviour.d.ts +21 -1
- package/lib/base/ServiceBehaviour.js +95 -28
- package/lib/base/ServiceBehaviour.js.map +1 -1
- package/lib/browser/index.js +3 -3
- package/lib/entities/TransactionResult.d.ts +12 -0
- package/lib/entities/TransactionResult.js +12 -0
- package/lib/entities/TransactionResult.js.map +1 -1
- package/lib/exceptions/FailedEncryptionException.d.ts +2 -0
- package/lib/exceptions/FailedEncryptionException.js +26 -0
- package/lib/exceptions/FailedEncryptionException.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/libraries/CardinalManager.js +8 -8
- package/lib/requests/CardTokenization.d.ts +8 -1
- package/lib/requests/CardTokenization.js +34 -18
- package/lib/requests/CardTokenization.js.map +1 -1
- package/lib/requests/LookupTransaction.d.ts +18 -0
- package/lib/requests/LookupTransaction.js +46 -0
- package/lib/requests/LookupTransaction.js.map +1 -1
- package/lib/requests/PaymentTransaction.d.ts +8 -1
- package/lib/requests/PaymentTransaction.js +26 -13
- package/lib/requests/PaymentTransaction.js.map +1 -1
- package/lib/services/CardinalAuthentication.d.ts +4 -4
- package/lib/services/CardinalAuthentication.js +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/tests/Tokenization.test.ts +12 -8
|
@@ -90,7 +90,7 @@ it('Fail vault card due invalid card', () => {
|
|
|
90
90
|
})
|
|
91
91
|
}, TIMEOUT)
|
|
92
92
|
|
|
93
|
-
it('
|
|
93
|
+
it('Success vault card', () => {
|
|
94
94
|
expect.assertions(5)
|
|
95
95
|
let settings = new Settings();
|
|
96
96
|
settings.setupSandbox();
|
|
@@ -128,7 +128,7 @@ it('Fail show card info', () => {
|
|
|
128
128
|
});
|
|
129
129
|
}, TIMEOUT)
|
|
130
130
|
|
|
131
|
-
it('
|
|
131
|
+
it('Success show card info', async () => {
|
|
132
132
|
expect.assertions(4)
|
|
133
133
|
let settings = new Settings();
|
|
134
134
|
settings.setupSandbox();
|
|
@@ -167,21 +167,25 @@ it('Fail update card', () => {
|
|
|
167
167
|
});
|
|
168
168
|
}, TIMEOUT)
|
|
169
169
|
|
|
170
|
-
it('
|
|
170
|
+
it('Success update card', async () => {
|
|
171
171
|
expect.assertions(4)
|
|
172
172
|
let settings = new Settings();
|
|
173
173
|
settings.setupSandbox();
|
|
174
174
|
|
|
175
175
|
let service: Tokenization = new Tokenization(settings);
|
|
176
|
-
|
|
176
|
+
|
|
177
|
+
let cardTokenization: CardTokenization = new CardTokenization();
|
|
177
178
|
cardTokenization.setCard(getCard());
|
|
178
179
|
cardTokenization.setBilling(getBilling());
|
|
179
180
|
|
|
180
181
|
let response: SuccessResponse = await service.vaultCard(cardTokenization)
|
|
181
182
|
let token = response.getData('token');
|
|
182
183
|
|
|
183
|
-
|
|
184
|
-
|
|
184
|
+
let updateCard: Card = new Card();
|
|
185
|
+
updateCard.number = '5416454316599121';
|
|
186
|
+
cardTokenization.setCard(updateCard);
|
|
187
|
+
|
|
188
|
+
return service.updateCard(token, cardTokenization).then( response => {
|
|
185
189
|
expect(response).toBeInstanceOf(SuccessResponse);
|
|
186
190
|
expect(response.success).toBe(true);
|
|
187
191
|
expect(response.status).toBe(200)
|
|
@@ -207,7 +211,7 @@ it('Fail delete card', () => {
|
|
|
207
211
|
});
|
|
208
212
|
}, TIMEOUT)
|
|
209
213
|
|
|
210
|
-
it('
|
|
214
|
+
it('Success delete card', async () => {
|
|
211
215
|
expect.assertions(4)
|
|
212
216
|
let settings = new Settings();
|
|
213
217
|
settings.setupSandbox();
|
|
@@ -226,4 +230,4 @@ it('Succes delete card', async () => {
|
|
|
226
230
|
expect(response.getData('deleted')).toBe(true);
|
|
227
231
|
expect(response.message).toBe("Información obtenida con exito");
|
|
228
232
|
});
|
|
229
|
-
}, TIMEOUT)
|
|
233
|
+
}, TIMEOUT)
|