@paypal/checkout-components 5.0.404-alpha-e012ebc.0 → 5.0.404-alpha-7c92db0.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/dist/button.js +1 -1
- package/dist/test/button.js +1 -1
- package/package.json +3 -3
- package/src/funding/paylater/config.jsx +29 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paypal/checkout-components",
|
|
3
|
-
"version": "5.0.404-alpha-
|
|
3
|
+
"version": "5.0.404-alpha-7c92db0.0",
|
|
4
4
|
"description": "PayPal Checkout components, for integrating checkout products.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"screenshot-server": "babel-node ./test/percy/server/index.js"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": "
|
|
45
|
-
"npm": "8"
|
|
44
|
+
"node": ">=18",
|
|
45
|
+
"npm": ">=8"
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"src/",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import type
|
|
4
|
+
import { getLogger, type FundingEligibilityType } from "@paypal/sdk-client/src";
|
|
5
5
|
import { FUNDING, type LocaleType } from "@paypal/sdk-constants/src";
|
|
6
6
|
import { node, Style } from "@krakenjs/jsx-pragmatic/src";
|
|
7
7
|
import {
|
|
@@ -30,6 +30,14 @@ function getLabelText(
|
|
|
30
30
|
|
|
31
31
|
let labelText;
|
|
32
32
|
|
|
33
|
+
// Log entry to track all invocations
|
|
34
|
+
getLogger().info("paylater_get_label_text_called", {
|
|
35
|
+
paylater_eligible: paylater?.products?.paylater?.eligible,
|
|
36
|
+
paylater_variant: paylater?.products?.paylater?.variant,
|
|
37
|
+
payIn4_eligible: paylater?.products?.payIn4?.eligible,
|
|
38
|
+
locale_lang: lang,
|
|
39
|
+
});
|
|
40
|
+
|
|
33
41
|
if (
|
|
34
42
|
paylater?.products?.paylater?.eligible &&
|
|
35
43
|
paylater?.products?.paylater?.variant === "DE"
|
|
@@ -42,6 +50,14 @@ function getLabelText(
|
|
|
42
50
|
paylater?.products?.paylater?.variant === "AT"
|
|
43
51
|
) {
|
|
44
52
|
labelText = "Später Bezahlen";
|
|
53
|
+
|
|
54
|
+
// CRITICAL: This proves the alpha code is executing
|
|
55
|
+
getLogger().info("paylater_austria_variant_executed", {
|
|
56
|
+
variant: "AT",
|
|
57
|
+
labelText: "Später Bezahlen",
|
|
58
|
+
checkout_components_version: "5.0.404-alpha-ef17c97.0",
|
|
59
|
+
locale_lang: lang,
|
|
60
|
+
});
|
|
45
61
|
}
|
|
46
62
|
|
|
47
63
|
if (
|
|
@@ -72,6 +88,12 @@ function getLabelText(
|
|
|
72
88
|
|
|
73
89
|
if (paylater?.products?.payIn4?.eligible) {
|
|
74
90
|
labelText = "Pay in 4";
|
|
91
|
+
|
|
92
|
+
// ADD: Log if payIn4 is overwriting previous label
|
|
93
|
+
getLogger().info("paylater_payin4_label_set", {
|
|
94
|
+
labelText: "Pay in 4",
|
|
95
|
+
payIn4_eligible: true,
|
|
96
|
+
});
|
|
75
97
|
}
|
|
76
98
|
|
|
77
99
|
if (
|
|
@@ -81,6 +103,12 @@ function getLabelText(
|
|
|
81
103
|
labelText = shouldApplyRebrandedStyles ? "4X" : "4X PayPal";
|
|
82
104
|
}
|
|
83
105
|
|
|
106
|
+
// Log final result
|
|
107
|
+
getLogger().info("paylater_label_final_result", {
|
|
108
|
+
labelText: labelText || "Pay Later",
|
|
109
|
+
variant: paylater?.products?.paylater?.variant,
|
|
110
|
+
});
|
|
111
|
+
|
|
84
112
|
return labelText;
|
|
85
113
|
}
|
|
86
114
|
|