@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.
Files changed (37) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/lib/base/Helpers.d.ts +1 -1
  3. package/lib/base/Helpers.js +4 -3
  4. package/lib/base/Helpers.js.map +1 -1
  5. package/lib/base/RequestBehaviour.d.ts +18 -1
  6. package/lib/base/RequestBehaviour.js +22 -2
  7. package/lib/base/RequestBehaviour.js.map +1 -1
  8. package/lib/base/ServiceBehaviour.d.ts +21 -1
  9. package/lib/base/ServiceBehaviour.js +95 -28
  10. package/lib/base/ServiceBehaviour.js.map +1 -1
  11. package/lib/browser/index.js +3 -3
  12. package/lib/entities/TransactionResult.d.ts +12 -0
  13. package/lib/entities/TransactionResult.js +12 -0
  14. package/lib/entities/TransactionResult.js.map +1 -1
  15. package/lib/exceptions/FailedEncryptionException.d.ts +2 -0
  16. package/lib/exceptions/FailedEncryptionException.js +26 -0
  17. package/lib/exceptions/FailedEncryptionException.js.map +1 -0
  18. package/lib/index.d.ts +2 -0
  19. package/lib/index.js +2 -0
  20. package/lib/index.js.map +1 -1
  21. package/lib/libraries/CardinalManager.js +8 -8
  22. package/lib/requests/CardTokenization.d.ts +8 -1
  23. package/lib/requests/CardTokenization.js +34 -18
  24. package/lib/requests/CardTokenization.js.map +1 -1
  25. package/lib/requests/LookupTransaction.d.ts +18 -0
  26. package/lib/requests/LookupTransaction.js +46 -0
  27. package/lib/requests/LookupTransaction.js.map +1 -1
  28. package/lib/requests/PaymentTransaction.d.ts +8 -1
  29. package/lib/requests/PaymentTransaction.js +26 -13
  30. package/lib/requests/PaymentTransaction.js.map +1 -1
  31. package/lib/services/CardinalAuthentication.d.ts +4 -4
  32. package/lib/services/CardinalAuthentication.js +3 -3
  33. package/lib/version.d.ts +1 -1
  34. package/lib/version.js +1 -1
  35. package/lib/version.js.map +1 -1
  36. package/package.json +1 -1
  37. 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('Succes vault card', () => {
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('Succes show card info', async () => {
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('Succes update card', async () => {
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
- let cardTokenization: CardTokenization = new CardTokenization();
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
- cardTokenization.setCard(getCard('5416454316599121'));
184
- return service.updateCard(token, cardTokenization).then( response => {
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('Succes delete card', async () => {
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)