skyflow-js 1.9.1 → 1.12.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 CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.12.0] - 2022-02-24
6
+
7
+ Added
8
+ - `requestId` in error logs and error responses
9
+ - add autocomplete for collect elements
10
+ ## [1.11.0] - 2022-02-08
11
+
12
+ ### Added
13
+ - `replaceText` option for `RevealElement`
14
+
15
+ ## [1.10.0] - 2022-01-25
16
+
17
+ ### Added
18
+ - `formatRegex` option for `RevealElement`
5
19
 
6
20
  ## [1.9.1] - 2022-01-11
7
21
 
package/README.md CHANGED
@@ -871,6 +871,7 @@ const revealElement = {
871
871
  label: "string", //optional, label for the form element
872
872
  altText: "string" //optional, string that is shown before reveal, will show token if altText is not provided
873
873
  }
874
+
874
875
  ```
875
876
  `Note`:
876
877
  - `token` is optional only if it is being used in invokeConnection()
@@ -1242,6 +1243,8 @@ Please ensure that the paths configured in the responseXML are present in the ac
1242
1243
 
1243
1244
  // step 1
1244
1245
  const skyflowClient = skyflow.init({
1246
+ vaultID: '<vault_ID>', // optional
1247
+ vaultURL: '<vault_URL>', // optional
1245
1248
  getBearerToken: '<helperFunc>'
1246
1249
  });
1247
1250
 
@@ -1256,10 +1259,16 @@ const cardNumberElement = collectContainer.create({
1256
1259
  })
1257
1260
  cardNumberElement.mount("#cardNumber")
1258
1261
 
1259
- const expiryDateElement = collectContainer.create({
1260
- type: skyflow.ElementType.EXPIRATION_DATE
1262
+ const expiryMonthElement = revealContainer.create({
1263
+ token: "<expiry_month_token>"
1261
1264
  })
1262
- expiryDateElement.mount("#expirationDate")
1265
+ expiryMonthElement.mount("#expirationMonth")
1266
+
1267
+ const expiryYearElement = revealContainer.create({
1268
+ token: "<expiry_year_token>"
1269
+ })
1270
+ expiryYearElement.mount("#expirationYear")
1271
+
1263
1272
 
1264
1273
  const cvvElement = revealContainer.create({
1265
1274
  altText: "###",
@@ -1268,7 +1277,8 @@ cvvElement.mount("#cvv")
1268
1277
 
1269
1278
  //step 4
1270
1279
  const cardNumberID = cardNumberElement.getID() // to get element ID
1271
- const expiryDateID = expiryDateElement.getID()
1280
+ const expiryMonthID = expiryDateElement.getID()
1281
+ const expiryYearID = expiryYearElement.getID()
1272
1282
  const cvvElementID = cvvElement.getID()
1273
1283
 
1274
1284
  // step 5
@@ -1281,9 +1291,12 @@ const requestXML = `<soapenv:Envelope>
1281
1291
  <CardNumber>
1282
1292
  <Skyflow>${cardNumberID}</Skyflow>
1283
1293
  </CardNumber>
1284
- <ExpiryDate>
1285
- <Skyflow>${expiryDateID}</Skyflow>
1286
- </ExpiryDate>
1294
+ <ExpiryMonth>
1295
+ <Skyflow>${expiryMonthID}</Skyflow>
1296
+ </ExpiryMonth>
1297
+ <ExpiryYear>
1298
+ <Skyflow>${expiryYearID}</Skyflow>
1299
+ </ExpiryYear>
1287
1300
  </GenerateCVV>
1288
1301
  </soapenv:Body>
1289
1302
  </soapenv:Envelope>`
@@ -1363,8 +1376,9 @@ Sample Response on failure:
1363
1376
  }
1364
1377
  ```
1365
1378
 
1366
- `Note`: In responseXML we provide the tags that needs to be rendered in UI and stripped out from the actual response.
1367
- 1. For uniquely identifiable tag, we can give the elementID within a skyflow tag directly corresponding to the actual value.
1368
- Please refer to the CVV tag in the above example. Here, we wish to strip the actual value present within the CVV tag.
1369
- 2. For arrays, since we have multiple tags with the same name, we will need to provide identifiers to uniquely identify the required tag.
1370
- Please refer to HeaderItem tag. Here, we have provided NodeId within the Name tag which acts as an identifier and we wish to strip the actual value present in the Value tag.
1379
+ `Note`:
1380
+ - In responseXML we provide the tags that needs to be rendered in UI and stripped out from the actual response.
1381
+ 1. For uniquely identifiable tag, we can give the elementID within a skyflow tag directly corresponding to the actual value.
1382
+ Please refer to the CVV tag in the above example. Here, we wish to strip the actual value present within the CVV tag.
1383
+ 2. For arrays, since we have multiple tags with the same name, we will need to provide identifiers to uniquely identify the required tag.
1384
+ Please refer to HeaderItem tag. Here, we have provided NodeId within the Name tag which acts as an identifier and we wish to strip the actual value present in the Value tag.