@paypal/checkout-components 5.0.289 → 5.0.290-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypal/checkout-components",
3
- "version": "5.0.289",
3
+ "version": "5.0.290-alpha.0",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,20 +6,34 @@ import {
6
6
  getClientMetadataID,
7
7
  getUserIDToken,
8
8
  getLogger,
9
+ getEnv,
10
+ loadFraudnet,
11
+ getCSPNonce,
9
12
  } from "@paypal/sdk-client/src";
10
13
 
11
14
  import { sendCountMetric } from "./sendCountMetric";
12
15
 
13
16
  // $FlowFixMe
14
- export const getConnectComponent = async (merchantProps) => {
17
+ export const getConnectComponent = async (merchantProps = {}) => {
18
+ const cmid = getClientMetadataID();
19
+ const clientID = getClientID();
20
+ const userIdToken = getUserIDToken();
21
+ const env = getEnv();
22
+ const cspNonce = getCSPNonce();
23
+
24
+ const { collect } = loadFraudnet({
25
+ env,
26
+ clientMetadataID: cmid,
27
+ cspNonce,
28
+ appName: "ppcp-sdk-connect",
29
+ // queryStringParams = {}, // TODO: what do we need here in this case?
30
+ });
31
+
15
32
  sendCountMetric({
16
33
  name: "pp.app.paypal_sdk.connect.init.count",
17
34
  dimensions: {},
18
35
  });
19
36
 
20
- const cmid = getClientMetadataID();
21
- const clientID = getClientID();
22
- const userIdToken = getUserIDToken();
23
37
  const { metadata } = merchantProps;
24
38
 
25
39
  let loadResult = {};
@@ -29,6 +43,7 @@ export const getConnectComponent = async (merchantProps) => {
29
43
  btSdkVersion: "3.97.3-connect-alpha.6.1",
30
44
  minified: true,
31
45
  metadata,
46
+ fraudnet: collect,
32
47
  });
33
48
  } catch (error) {
34
49
  sendCountMetric({