@paypal/checkout-components 5.0.353 → 5.0.355
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 +1 -1
- package/src/connect/component.jsx +1 -1
- package/src/connect/component.test.js +1 -1
- package/src/lib/appSwitchResume.js +7 -3
- package/src/lib/appSwithResume.test.js +7 -7
- package/src/marks/template.jsx +1 -1
- package/src/ui/buttons/poweredBy.jsx +2 -2
- package/src/ui/buttons/styles/button.js +2 -2
- package/src/ui/buttons/styles/page.js +1 -1
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ const MIN_MINOR_VERSION = 97;
|
|
|
20
20
|
const MIN_PATCH_VERSION = 3;
|
|
21
21
|
export const MIN_BT_VERSION = `${MIN_MAJOR_VERSION}.${MIN_MINOR_VERSION}.${MIN_PATCH_VERSION}-connect-alpha.6.1`; // Minimum for supporting AXO
|
|
22
22
|
|
|
23
|
-
export const DEFAULT_BT_VERSION = `3.
|
|
23
|
+
export const DEFAULT_BT_VERSION = `3.116.2`;
|
|
24
24
|
|
|
25
25
|
export function getSdkVersion(version: string | null): string {
|
|
26
26
|
if (!version) {
|
|
@@ -117,7 +117,7 @@ describe("getConnectComponent: returns ConnectComponent", () => {
|
|
|
117
117
|
await getConnectComponent(mockProps);
|
|
118
118
|
expect(loadAxo).toHaveBeenCalledWith({
|
|
119
119
|
minified: true,
|
|
120
|
-
btSdkVersion: "3.
|
|
120
|
+
btSdkVersion: "3.116.2",
|
|
121
121
|
metadata: undefined,
|
|
122
122
|
platform: "PPCP",
|
|
123
123
|
});
|
|
@@ -24,7 +24,7 @@ function getAppSwitchParamsWebFallback(): AppSwitchResumeParams | null {
|
|
|
24
24
|
new URLSearchParams(window.location.search)
|
|
25
25
|
);
|
|
26
26
|
const {
|
|
27
|
-
buttonSessionID,
|
|
27
|
+
button_session_id: buttonSessionID,
|
|
28
28
|
fundingSource,
|
|
29
29
|
token: orderID,
|
|
30
30
|
PayerID: payerID,
|
|
@@ -76,14 +76,18 @@ export function getAppSwitchResumeParams(): AppSwitchResumeParams | null {
|
|
|
76
76
|
const {
|
|
77
77
|
token,
|
|
78
78
|
PayerID,
|
|
79
|
-
buttonSessionID,
|
|
79
|
+
button_session_id: buttonSessionID,
|
|
80
80
|
billingToken,
|
|
81
81
|
paymentID,
|
|
82
82
|
subscriptionID,
|
|
83
|
-
vaultSetupToken,
|
|
83
|
+
vaultSetupToken: vaultToken,
|
|
84
|
+
approval_token_id: approvalTokenID,
|
|
85
|
+
approval_session_id: approvalSessionID,
|
|
84
86
|
fundingSource,
|
|
85
87
|
} = parseQuery(queryString);
|
|
86
88
|
|
|
89
|
+
const vaultSetupToken = vaultToken || approvalTokenID || approvalSessionID;
|
|
90
|
+
|
|
87
91
|
const params: AppSwitchResumeParams = {
|
|
88
92
|
orderID: token,
|
|
89
93
|
buttonSessionID,
|
|
@@ -26,7 +26,7 @@ describe("app switch resume flow", () => {
|
|
|
26
26
|
|
|
27
27
|
test("should test fetching resume params when parameters are correctly passed", () => {
|
|
28
28
|
vi.spyOn(window, "location", "get").mockReturnValue({
|
|
29
|
-
hash: `#onApprove?
|
|
29
|
+
hash: `#onApprove?button_session_id=${buttonSessionID}&token=${orderID}&fundingSource=${fundingSource}`,
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
const params = getAppSwitchResumeParams();
|
|
@@ -55,7 +55,7 @@ describe("app switch resume flow", () => {
|
|
|
55
55
|
|
|
56
56
|
test("should test null fetching resume params with invalid callback passed", () => {
|
|
57
57
|
vi.spyOn(window, "location", "get").mockReturnValue({
|
|
58
|
-
hash: `#Unknown?
|
|
58
|
+
hash: `#Unknown?button_session_id=${buttonSessionID}&token=${orderID}&fundingSource=${fundingSource}`,
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
const params = getAppSwitchResumeParams();
|
|
@@ -67,7 +67,7 @@ describe("app switch resume flow", () => {
|
|
|
67
67
|
|
|
68
68
|
test("should test fetching multiple resume params when parameters are correctly passed", () => {
|
|
69
69
|
vi.spyOn(window, "location", "get").mockReturnValue({
|
|
70
|
-
hash: `#onApprove?
|
|
70
|
+
hash: `#onApprove?button_session_id=${buttonSessionID}&token=${orderID}&fundingSource=${fundingSource}&billingToken=BA-124&PayerID=PP-payer-122&paymentID=PAY-123&subscriptionID=I-1234&vaultSetupToken=VA-3`,
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
const params = getAppSwitchResumeParams();
|
|
@@ -87,9 +87,9 @@ describe("app switch resume flow", () => {
|
|
|
87
87
|
expect(isAppSwitchResumeFlow()).toEqual(true);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
test("should test onApprove resume params when parameters are passed from web fallback", () => {
|
|
90
|
+
test("should test onApprove resume params when parameters are passed from web fallback with vaultSetupToken", () => {
|
|
91
91
|
vi.spyOn(window, "location", "get").mockReturnValue({
|
|
92
|
-
search: `?
|
|
92
|
+
search: `?button_session_id=${buttonSessionID}&token=${orderID}&fundingSource=${fundingSource}&vaultSetupToken=VA-3&PayerID=PP123456`,
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
const params = getAppSwitchResumeParams();
|
|
@@ -106,9 +106,9 @@ describe("app switch resume flow", () => {
|
|
|
106
106
|
expect(isAppSwitchResumeFlow()).toEqual(true);
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
test("should test onCancel resume params when parameters are passed from web fallback", () => {
|
|
109
|
+
test("should test onCancel resume params when parameters are passed from web fallback with approval_token_id", () => {
|
|
110
110
|
vi.spyOn(window, "location", "get").mockReturnValue({
|
|
111
|
-
search: `?
|
|
111
|
+
search: `?button_session_id=${buttonSessionID}&token=${orderID}&fundingSource=${fundingSource}&approval_token_id=VA-3`,
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
const params = getAppSwitchResumeParams();
|
package/src/marks/template.jsx
CHANGED
|
@@ -78,7 +78,7 @@ export function MarksElement({
|
|
|
78
78
|
<style>
|
|
79
79
|
{`
|
|
80
80
|
.${CLASS.TEXT} {
|
|
81
|
-
font-family:
|
|
81
|
+
font-family: PayPalPlain-Regular, system-ui, -apple-system, Roboto, "Segoe UI", Helvetica-Neue, Helvetica, Arial, sans-serif;
|
|
82
82
|
font-size: 12px;
|
|
83
83
|
vertical-align: middle;
|
|
84
84
|
}
|
|
@@ -15,9 +15,9 @@ const POWERED_BY_PAYPAL_STYLE = `
|
|
|
15
15
|
text-align: center;
|
|
16
16
|
margin: 10px auto;
|
|
17
17
|
height: 14px;
|
|
18
|
-
font-family:
|
|
18
|
+
font-family: PayPalPlain-Regular, system-ui, -apple-system, Roboto, "Segoe UI", Helvetica-Neue, Helvetica, Arial, sans-serif;
|
|
19
19
|
font-size: 11px;
|
|
20
|
-
font-weight:
|
|
20
|
+
font-weight: 400;
|
|
21
21
|
font-style: italic;
|
|
22
22
|
font-stretch: normal;
|
|
23
23
|
color: #7b8388;
|
|
@@ -15,7 +15,7 @@ export const buttonStyle = `
|
|
|
15
15
|
margin: 0;
|
|
16
16
|
background: 0;
|
|
17
17
|
border: 0;
|
|
18
|
-
font-family:
|
|
18
|
+
font-family: PayPalPlain-Regular, system-ui, -apple-system, Roboto, "Segoe UI", Helvetica-Neue, Helvetica, Arial, sans-serif;
|
|
19
19
|
text-transform: none;
|
|
20
20
|
font-weight: 500;
|
|
21
21
|
font-smoothing: antialiased;
|
|
@@ -80,7 +80,7 @@ export const buttonStyle = `
|
|
|
80
80
|
.${CLASS.TAGLINE} {
|
|
81
81
|
max-width: 100%;
|
|
82
82
|
font-size: initial;
|
|
83
|
-
font-weight:
|
|
83
|
+
font-weight: 400;
|
|
84
84
|
display: block;
|
|
85
85
|
text-align: center;
|
|
86
86
|
width: auto;
|
|
@@ -4,7 +4,7 @@ import { CLASS } from "../../../constants";
|
|
|
4
4
|
|
|
5
5
|
export const pageStyle = `
|
|
6
6
|
html, body {
|
|
7
|
-
font-family:
|
|
7
|
+
font-family: PayPalPlain-Regular, system-ui, -apple-system, Roboto, "Segoe UI", Helvetica-Neue, Helvetica, Arial, sans-serif;
|
|
8
8
|
padding: 0;
|
|
9
9
|
margin: 0;
|
|
10
10
|
width: 100%;
|