@pixelpay/sdk-core 2.2.1 → 2.2.3

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/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.2.1";
1
+ declare const _default: "2.2.3";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '2.2.1';
3
+ exports.default = '2.2.3';
4
4
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixelpay/sdk-core",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "PixelPay SDK toolkit",
5
5
  "main": "lib/index.js",
6
6
  "browser": "lib/browser/index.js",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "scripts": {
24
24
  "clean": "shx rm -rf _bundles lib lib-esm dist",
25
+ "test": "jest",
25
26
  "build": "npm run clean && node version.js && tsc && npx mix --production",
26
27
  "dev": "browser-sync start --server --files 'lib/*.*'",
27
28
  "prepublishOnly": "npm run build"
@@ -6,6 +6,9 @@ test('Location countires', () => {
6
6
 
7
7
  test('Location states', () => {
8
8
  expect(Locations.statesList("HN")["HN-CR"]).toBe("Cortes")
9
+ expect(Locations.statesList("GT")["GT-01"]).toBe("Guatemala")
10
+ expect(Locations.statesList("NI")["NI-AN"]).toBe("Costa Caribe Norte")
11
+ expect(Locations.statesList("GB")["GB-LAN"]).toBe("Lancashire")
9
12
  });
10
13
 
11
14
  test('Location formats', () => {
@@ -110,6 +110,33 @@ it('Success vault card', () => {
110
110
  })
111
111
  }, TIMEOUT)
112
112
 
113
+ it('Success vault card with inherited signature', () => {
114
+ expect.assertions(5)
115
+
116
+ let settings = new Settings();
117
+ const sdk = "sdk-ionic";
118
+ const sdk_version = "2.0.1";
119
+
120
+ settings.sdk = sdk;
121
+ settings.sdk_version = sdk_version;
122
+
123
+ settings.setupSandbox();
124
+
125
+ let service: Tokenization = new Tokenization(settings);
126
+ let cardTokenization: CardTokenization = new CardTokenization();
127
+ cardTokenization.setCard(getCard());
128
+ cardTokenization.setBilling(getBilling());
129
+
130
+ return service.vaultCard(cardTokenization).then( response => {
131
+ expect(response).toBeInstanceOf(SuccessResponse);
132
+ expect(response.success).toBe(true);
133
+ expect(response.status).toBe(200)
134
+ expect(response.getData("mask")).toBe("411111******1111")
135
+ let token: String = response.getData('token');
136
+ expect(token.substring(0,2)).toBe("T-")
137
+ })
138
+ }, TIMEOUT)
139
+
113
140
  it('Fail show card info', () => {
114
141
  expect.assertions(4)
115
142
  let settings = new Settings();