@paypal/checkout-components 5.0.279 → 5.0.280

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.279",
3
+ "version": "5.0.280",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,6 +23,7 @@ import {
23
23
  getPartnerAttributionID,
24
24
  getMerchantID,
25
25
  getUserIDToken,
26
+ getClientMetadataID,
26
27
  } from "@paypal/sdk-client/src";
27
28
  import { getRefinedFundingEligibility } from "@paypal/funding-components/src";
28
29
  import {
@@ -55,6 +56,7 @@ type CardFieldsProps = {|
55
56
  nonce: string,
56
57
  logLevel: string,
57
58
  sessionID: string,
59
+ clientMetadataID: string,
58
60
  cardFieldsSessionID: string,
59
61
  debug: boolean,
60
62
  sdkMeta: string,
@@ -205,6 +207,13 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
205
207
  queryParam: true,
206
208
  },
207
209
 
210
+ clientMetadataID: {
211
+ type: "string",
212
+ required: false,
213
+ queryParam: true,
214
+ value: ({ props }) => props.parent.props.clientMetadataID,
215
+ },
216
+
208
217
  createOrder: {
209
218
  type: "function",
210
219
  required: false,
@@ -497,6 +506,17 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
497
506
  queryParam: true,
498
507
  },
499
508
 
509
+ clientMetadataID: {
510
+ type: "string",
511
+ required: false,
512
+ default: ({ props }) => {
513
+ const clientMetadataId = getClientMetadataID();
514
+
515
+ return clientMetadataId ? clientMetadataId : props.sessionID;
516
+ },
517
+ queryParam: true,
518
+ },
519
+
500
520
  createOrder: {
501
521
  type: "function",
502
522
  required: false,