@paypal/checkout-components 5.0.310 → 5.0.311
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
|
@@ -54,6 +54,7 @@ type IndividualButtonProps = {|
|
|
|
54
54
|
i: number,
|
|
55
55
|
nonce: string,
|
|
56
56
|
userIDToken: ?string,
|
|
57
|
+
customerId: ?string,
|
|
57
58
|
personalization: ?Personalization,
|
|
58
59
|
content: ?ContentType,
|
|
59
60
|
tagline: ?boolean,
|
|
@@ -78,6 +79,7 @@ export function Button({
|
|
|
78
79
|
flow,
|
|
79
80
|
vault,
|
|
80
81
|
userIDToken,
|
|
82
|
+
customerId,
|
|
81
83
|
personalization,
|
|
82
84
|
onClick = noop,
|
|
83
85
|
content,
|
|
@@ -206,7 +208,7 @@ export function Button({
|
|
|
206
208
|
flow === BUTTON_FLOW.VAULT_WITHOUT_PURCHASE) &&
|
|
207
209
|
(instrument ||
|
|
208
210
|
(__WEB__ &&
|
|
209
|
-
userIDToken &&
|
|
211
|
+
(userIDToken || customerId) &&
|
|
210
212
|
(fundingSource === FUNDING.PAYPAL || fundingSource === FUNDING.VENMO)))
|
|
211
213
|
) {
|
|
212
214
|
labelNode = (
|
|
@@ -172,6 +172,7 @@ export function Buttons(props: ButtonsProps): ElementNode {
|
|
|
172
172
|
onShippingOptionsChange,
|
|
173
173
|
personalization,
|
|
174
174
|
userIDToken,
|
|
175
|
+
customerId,
|
|
175
176
|
content,
|
|
176
177
|
flow,
|
|
177
178
|
experiment,
|
|
@@ -291,6 +292,7 @@ export function Buttons(props: ButtonsProps): ElementNode {
|
|
|
291
292
|
onShippingOptionsChange={onShippingOptionsChange}
|
|
292
293
|
onClick={onClick}
|
|
293
294
|
userIDToken={userIDToken}
|
|
295
|
+
customerId={customerId}
|
|
294
296
|
personalization={personalization}
|
|
295
297
|
tagline={tagline}
|
|
296
298
|
commit={commit}
|
package/src/ui/buttons/props.js
CHANGED
|
@@ -467,6 +467,7 @@ export type RenderButtonProps = {|
|
|
|
467
467
|
onShippingOptionsChange: ?OnShippingOptionsChange,
|
|
468
468
|
personalization: ?Personalization,
|
|
469
469
|
clientAccessToken: ?string,
|
|
470
|
+
customerId: ?string,
|
|
470
471
|
content?: ContentType,
|
|
471
472
|
flow: $Values<typeof BUTTON_FLOW>,
|
|
472
473
|
experiment: Experiment,
|
|
@@ -521,6 +522,7 @@ export type ButtonProps = {|
|
|
|
521
522
|
onShippingAddressChange: ?OnShippingAddressChange,
|
|
522
523
|
onShippingOptionsChange: ?OnShippingOptionsChange,
|
|
523
524
|
clientAccessToken?: ?string,
|
|
525
|
+
customerId?: ?string,
|
|
524
526
|
nonce: string,
|
|
525
527
|
merchantID?: $ReadOnlyArray<string>,
|
|
526
528
|
merchantRequestedPopupsDisabled: ?boolean,
|
|
@@ -568,6 +570,7 @@ export type ButtonPropsInputs = {
|
|
|
568
570
|
onShippingOptionsChange: ?Function,
|
|
569
571
|
personalization?: Personalization,
|
|
570
572
|
clientAccessToken?: ?string,
|
|
573
|
+
customerId?: ?string,
|
|
571
574
|
wallet?: ?Wallet,
|
|
572
575
|
csp: {|
|
|
573
576
|
nonce: string,
|
|
@@ -842,6 +845,7 @@ export function normalizeButtonProps(
|
|
|
842
845
|
onShippingOptionsChange,
|
|
843
846
|
personalization,
|
|
844
847
|
clientAccessToken,
|
|
848
|
+
customerId,
|
|
845
849
|
content,
|
|
846
850
|
wallet,
|
|
847
851
|
flow = BUTTON_FLOW.PURCHASE,
|
|
@@ -947,6 +951,7 @@ export function normalizeButtonProps(
|
|
|
947
951
|
experiment,
|
|
948
952
|
vault,
|
|
949
953
|
userIDToken,
|
|
954
|
+
customerId,
|
|
950
955
|
applePay,
|
|
951
956
|
applePaySupport,
|
|
952
957
|
supportsPopups,
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getCSPNonce,
|
|
20
20
|
getBuyerCountry,
|
|
21
21
|
getClientAccessToken,
|
|
22
|
+
getCustomerId,
|
|
22
23
|
getPlatform,
|
|
23
24
|
getPartnerAttributionID,
|
|
24
25
|
getCorrelationID,
|
|
@@ -336,6 +337,13 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
336
337
|
value: getClientAccessToken,
|
|
337
338
|
},
|
|
338
339
|
|
|
340
|
+
customerId: {
|
|
341
|
+
type: "string",
|
|
342
|
+
required: false,
|
|
343
|
+
queryParam: true,
|
|
344
|
+
value: getCustomerId,
|
|
345
|
+
},
|
|
346
|
+
|
|
339
347
|
clientID: {
|
|
340
348
|
type: "string",
|
|
341
349
|
value: getClientID,
|