@fat-zebra/sdk 1.5.6 → 1.5.7-beta.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/.idea/fatzebra-js.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/applepay/applepaymanager.d.ts +28 -0
- package/dist/applepay/applepaymanager.js +115 -0
- package/dist/click_to_pay/index.js +5 -3
- package/dist/hpp/hpp.d.ts +4 -0
- package/dist/hpp/hpp.js +26 -6
- package/dist/local/fatzebra.js +19684 -0
- package/dist/local/fatzebra.js.map +1 -1
- package/dist/main.js +3 -3
- package/dist/production/fatzebra.css +91 -0
- package/dist/production/fatzebra.js +2 -0
- package/dist/react/ApplePay.d.ts +9 -0
- package/dist/react/ApplePay.js +11 -0
- package/dist/react/{url.d.ts → applePayUrl.d.ts} +2 -2
- package/dist/react/applePayUrl.js +19 -0
- package/dist/sandbox/fatzebra.js +1 -1
- package/dist/sandbox/fatzebra.js.LICENSE.txt +1 -1
- package/dist/sca/cardinal.d.ts +2 -11
- package/dist/sca/cardinal.js +4 -10
- package/dist/sca/index.d.ts +11 -1
- package/dist/sca/index.js +3 -40
- package/dist/sca/scenarios/enrollment.js +14 -2
- package/dist/sca/scenarios/validation.js +3 -3
- package/dist/sca/types/cardinal_types.d.ts +61 -0
- package/dist/sca/types/cardinal_types.js +11 -0
- package/dist/sca/types.d.ts +2 -1
- package/dist/sca/types.js +1 -0
- package/dist/sca/utility/index.d.ts +7 -0
- package/dist/sca/utility/index.js +39 -0
- package/dist/shared/bridge-client.d.ts +5 -1
- package/dist/shared/bridge-client.js +19 -1
- package/dist/shared/envs/local.d.ts +1 -1
- package/dist/shared/envs/local.js +1 -1
- package/dist/shared/types.d.ts +5 -15
- package/dist/shared/types.js +2 -2
- package/dist/src/applepay/applepaymanager.js +279 -0
- package/dist/src/applepay/applepaymanager.js.map +1 -0
- package/dist/src/react/ApplePayButton.js +56 -0
- package/dist/src/react/ApplePayButton.js.map +1 -0
- package/dist/src/react/{url.js → applePayUrl.js} +7 -21
- package/dist/src/react/applePayUrl.js.map +1 -0
- package/dist/src/react/applePayUrl.test.js +57 -0
- package/dist/src/react/applePayUrl.test.js.map +1 -0
- package/dist/src/react/useFatZebra.js +7 -56
- package/dist/src/react/useFatZebra.js.map +1 -1
- package/dist/src/react/useMessage.js +140 -0
- package/dist/src/react/useMessage.js.map +1 -0
- package/dist/src/react/useMessage.test.js +222 -0
- package/dist/src/react/useMessage.test.js.map +1 -0
- package/dist/src/validation/validators/apple-pay-load-params-button-validator.js +19 -0
- package/dist/src/validation/validators/apple-pay-load-params-button-validator.js.map +1 -0
- package/dist/staging/fatzebra.css +91 -0
- package/dist/staging/fatzebra.js +19684 -0
- package/dist/staging/fatzebra.js.map +1 -0
- package/dist/staging/index.html +247 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/paypal/paypal-button.d.ts +0 -31
- package/dist/paypal/paypal-button.js +0 -199
- package/dist/paypal/paypal-checkout.d.ts +0 -21
- package/dist/paypal/paypal-checkout.js +0 -100
- package/dist/paypal/types.d.ts +0 -188
- package/dist/paypal/types.js +0 -5
- package/dist/paypal/validation.d.ts +0 -4
- package/dist/paypal/validation.js +0 -65
- package/dist/react/url.js +0 -33
- package/dist/src/paypal/paypal-button.js +0 -311
- package/dist/src/paypal/paypal-button.js.map +0 -1
- package/dist/src/paypal/paypal-button.test.js +0 -41
- package/dist/src/paypal/paypal-button.test.js.map +0 -1
- package/dist/src/paypal/paypal-checkout.js +0 -111
- package/dist/src/paypal/paypal-checkout.js.map +0 -1
- package/dist/src/paypal/paypal-checkout.test.js +0 -167
- package/dist/src/paypal/paypal-checkout.test.js.map +0 -1
- package/dist/src/paypal/types.js +0 -9
- package/dist/src/paypal/types.js.map +0 -1
- package/dist/src/paypal/validation.js +0 -73
- package/dist/src/paypal/validation.js.map +0 -1
- package/dist/src/react/url.js.map +0 -1
- package/dist/src/react/url.test.js +0 -88
- package/dist/src/react/url.test.js.map +0 -1
package/dist/main.js
CHANGED
|
@@ -62,8 +62,8 @@ export default class FatZebra {
|
|
|
62
62
|
postMessageClient.setEventListeners(handlers);
|
|
63
63
|
}
|
|
64
64
|
verifyCard(params) {
|
|
65
|
+
var _a;
|
|
65
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
var _a;
|
|
67
67
|
const valid = validateVerifyCardParams(params);
|
|
68
68
|
if (!valid) {
|
|
69
69
|
emit(PublicEvent.VALIDATION_ERROR, {
|
|
@@ -77,14 +77,14 @@ export default class FatZebra {
|
|
|
77
77
|
const headless = bridge.load(process.env.PAYNOW_BRIDGE_URL);
|
|
78
78
|
const card = params.paymentMethod.data;
|
|
79
79
|
this.cardDidTokenize(headless, (data) => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
var
|
|
80
|
+
var _b;
|
|
81
81
|
const bin = card.number.substr(0, 6);
|
|
82
82
|
this.sca.run({
|
|
83
83
|
cardToken: data.token,
|
|
84
84
|
customer: params.customer,
|
|
85
85
|
paymentIntent: params.paymentIntent,
|
|
86
86
|
bin,
|
|
87
|
-
challengeWindowSize: (
|
|
87
|
+
challengeWindowSize: (_b = params.options) === null || _b === void 0 ? void 0 : _b.challengeWindowSize,
|
|
88
88
|
});
|
|
89
89
|
}));
|
|
90
90
|
this.tokenizeCard(card, headless);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.checkout-button-wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
height: 200px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.iframe-checkout {
|
|
9
|
+
flex: 1;
|
|
10
|
+
border: none;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
min-height: 0;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
-webkit-overflow-scrolling: touch;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.iframe-foreground,
|
|
19
|
+
.iframe-background {
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.iframe-foreground,
|
|
28
|
+
.iframe-background {
|
|
29
|
+
position: fixed;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.iframe-foreground {
|
|
33
|
+
z-index: -1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.iframe-background {
|
|
37
|
+
background: rgba(0, 0, 0, 0.5);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.iframe-foreground {
|
|
41
|
+
flex-grow: 1;
|
|
42
|
+
top: auto;
|
|
43
|
+
width: 100%;
|
|
44
|
+
max-width: 480px;
|
|
45
|
+
height: 80vh;
|
|
46
|
+
background-color: #ffffff;
|
|
47
|
+
border-radius: 25px 25px 0 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.slide-in .iframe-foreground {
|
|
51
|
+
transform: translateY(100vh);
|
|
52
|
+
transition: transform 0.4s ease, z-index 0.3s ease 0.4s;
|
|
53
|
+
z-index: -1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.slide-in .iframe-background {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
z-index: -1;
|
|
59
|
+
transition: opacity 0.3s ease, z-index 0.3s ease 0.3s;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.slide-in.show .iframe-foreground {
|
|
63
|
+
transform: none;
|
|
64
|
+
transition: transform 0.4s ease;
|
|
65
|
+
z-index: 100;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.slide-in.show .iframe-background {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
z-index: 0;
|
|
71
|
+
transition: opacity 0.3s ease;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media only screen and (min-width: 480px) {
|
|
75
|
+
.iframe-foreground {
|
|
76
|
+
margin: 0 auto;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media only screen and (min-width: 768px) {
|
|
81
|
+
.iframe-foreground {
|
|
82
|
+
margin: 0;
|
|
83
|
+
width: 400px;
|
|
84
|
+
height: 100vh;
|
|
85
|
+
left: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.slide-in .iframe-foreground {
|
|
89
|
+
transform: translateX(-400px);
|
|
90
|
+
}
|
|
91
|
+
}
|