@koomipay/react 1.0.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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/components/CheckoutContainer.js +249 -0
- package/dist/components/Label.js +13 -0
- package/dist/config/index.js +34 -0
- package/dist/index.js +7 -0
- package/dist/koomipay.css +2 -0
- package/dist/lib/client.js +98 -0
- package/dist/types/components/CheckoutContainer.d.ts +51 -0
- package/dist/types/components/Label.d.ts +8 -0
- package/dist/types/config/index.d.ts +10 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/client.d.ts +30 -0
- package/dist/types/utils/format.d.ts +2 -0
- package/dist/utils/format.js +20 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Koomi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# @koomipay/react
|
|
2
|
+
|
|
3
|
+
React components for
|
|
4
|
+
[Koomipay B2B payment service][koomipay-portal]
|
|
5
|
+
|
|
6
|
+
## Requirements
|
|
7
|
+
|
|
8
|
+
The minimum supported version of React is v18.2.0. If you use an older version,
|
|
9
|
+
upgrade React to use this library.
|
|
10
|
+
|
|
11
|
+
## Getting started
|
|
12
|
+
|
|
13
|
+
- [Try live demo here][live-demo]
|
|
14
|
+
|
|
15
|
+
### Minimal example
|
|
16
|
+
|
|
17
|
+
First, install [@koomipay/react][koomipay-npm].
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install @koomipay/react --save
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Using component `CheckoutContainer`
|
|
24
|
+
|
|
25
|
+
Before you setup checkout page, you should get api key from [Koomipay][koomipay-portal]
|
|
26
|
+
```jsx
|
|
27
|
+
import React from 'react';
|
|
28
|
+
import ReactDOM from 'react-dom';
|
|
29
|
+
import { createClient, CheckoutComponent } from '@koomipay/react';
|
|
30
|
+
|
|
31
|
+
const koomipay = createClient({
|
|
32
|
+
apiKey: 'your_test_key', // should put to process.env
|
|
33
|
+
env: 'test',
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
function Checkout() {
|
|
37
|
+
const [submitting, setSubmitting] = useState(false)
|
|
38
|
+
const [valid, setValid] = useState(false)
|
|
39
|
+
const [paymentData, setPaymentData] = useState(false)
|
|
40
|
+
|
|
41
|
+
async function handleSubmit(event) {
|
|
42
|
+
event.preventDefault()
|
|
43
|
+
if (submitting) return false
|
|
44
|
+
setSubmitting(true)
|
|
45
|
+
try {
|
|
46
|
+
const response = await koomipay.instantCheckout({
|
|
47
|
+
orderID: `Order #01`,
|
|
48
|
+
paymentMethod: paymentData,
|
|
49
|
+
amount: {
|
|
50
|
+
currency: "SGD",
|
|
51
|
+
price: 100,
|
|
52
|
+
},
|
|
53
|
+
items: [{
|
|
54
|
+
productID: 'product_01',
|
|
55
|
+
productName: 'Product 01',
|
|
56
|
+
quantity: 1,
|
|
57
|
+
price: 100,
|
|
58
|
+
}]
|
|
59
|
+
returnUrl: document.location.origin + `/checkout`,
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
if (response?.data?.success) {
|
|
63
|
+
window.location.href = "/checkout/success"
|
|
64
|
+
return null
|
|
65
|
+
}
|
|
66
|
+
} catch (error) {
|
|
67
|
+
console.log(error)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
setSubmitting(false)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<form onSubmit={handleSubmit}>
|
|
75
|
+
<CheckoutContainer
|
|
76
|
+
client={koomipay}
|
|
77
|
+
amount={{
|
|
78
|
+
currency: "SGD",
|
|
79
|
+
price: 100,
|
|
80
|
+
}}
|
|
81
|
+
onValid={setValid}
|
|
82
|
+
onChange={setPaymentData}
|
|
83
|
+
/>
|
|
84
|
+
<button type="submit" disabled={!valid || submitting}>
|
|
85
|
+
Pay
|
|
86
|
+
</button>
|
|
87
|
+
</form>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
ReactDOM.render(<Checkout />, document.body)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### TypeScript support
|
|
97
|
+
|
|
98
|
+
React Koomipay is packaged with TypeScript declarations. Some types are pulled
|
|
99
|
+
from [`@koomipay/react`][koomipay-npm]—be sure to add
|
|
100
|
+
`@koomipay/react` as a dependency to your project for full TypeScript support.
|
|
101
|
+
|
|
102
|
+
### Contributing
|
|
103
|
+
|
|
104
|
+
If you would like to contribute to React Stripe.js, please make sure to read our
|
|
105
|
+
[contributor guidelines](CONTRIBUTING.md).
|
|
106
|
+
|
|
107
|
+
[koomipay-portal]: https://pay-demo.koomi.app
|
|
108
|
+
[live-demo]: https://store-demo.koomi.app
|
|
109
|
+
[koomipay-npm]: https://www.npmjs.com/package/@koomipay/react
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckoutContainer = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var axios_1 = tslib_1.__importDefault(require("axios"));
|
|
8
|
+
var adyen_web_1 = tslib_1.__importDefault(require("@adyen/adyen-web"));
|
|
9
|
+
var format_1 = require("../utils/format");
|
|
10
|
+
var Label_1 = tslib_1.__importDefault(require("./Label"));
|
|
11
|
+
function resolveLogoUrl(url, config) {
|
|
12
|
+
return "".concat(config.assetHost, "/").concat(url);
|
|
13
|
+
}
|
|
14
|
+
function CheckoutCardLogo(_a) {
|
|
15
|
+
var active = _a.active, logoUrl = _a.logoUrl, client = _a.client;
|
|
16
|
+
var config = client.getConfig();
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: (0, format_1.classNames)({
|
|
18
|
+
"h-10": true,
|
|
19
|
+
"grayscale opacity-30": !active,
|
|
20
|
+
}) }, { children: (0, jsx_runtime_1.jsx)("img", { className: "object-contain w-full h-full", src: resolveLogoUrl(logoUrl, config) }) })));
|
|
21
|
+
}
|
|
22
|
+
function CheckoutInputField(_a) {
|
|
23
|
+
var field = _a.field, focus = _a.focus, valids = _a.valids, errors = _a.errors;
|
|
24
|
+
var fieldError = !!errors && errors[field];
|
|
25
|
+
var valid = !!valids && valids[field];
|
|
26
|
+
var filled = fieldError != null;
|
|
27
|
+
var errorMessage = !!filled && fieldError.errorMessage;
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: "relative mb-4" }, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, format_1.classNames)({
|
|
29
|
+
"h-12 border px-3 py-1.5 rounded-md overflow-hidden": true,
|
|
30
|
+
"border-gray-200": !focus && !filled,
|
|
31
|
+
"bg-green-50 border-green-700": !!valid,
|
|
32
|
+
"bg-red-50 border-red-500": !focus && !!filled && !valid,
|
|
33
|
+
"bg-blue-50 border-blue-500 ring-2 ring-blue-200": !!focus,
|
|
34
|
+
}), "data-cse": field }), !!valid && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "absolute top-0 bottom-0 flex items-center text-green-700 right-3" }, { children: (0, jsx_runtime_1.jsxs)("svg", tslib_1.__assign({ className: "w-6 h-6", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0z", fill: "none" }), (0, jsx_runtime_1.jsx)("path", { d: "M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" })] })) }))), !!errorMessage && (0, jsx_runtime_1.jsx)("p", tslib_1.__assign({ className: "mt-1.5 text-red-500 text-sm leading-tight" }, { children: errorMessage }))] })));
|
|
35
|
+
}
|
|
36
|
+
function GrabPayComponent(_a) {
|
|
37
|
+
var active = _a.active, paymentMethod = _a.paymentMethod, onValid = _a.onValid, onChange = _a.onChange;
|
|
38
|
+
(0, react_1.useEffect)(function () {
|
|
39
|
+
if (!!active) {
|
|
40
|
+
if (typeof onChange === "function") {
|
|
41
|
+
onChange({
|
|
42
|
+
type: paymentMethod.type,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (typeof onValid === "function") {
|
|
46
|
+
onValid(true);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, [active]);
|
|
50
|
+
if (!active) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return (0, jsx_runtime_1.jsx)("div", { children: "After checkout, You will be redirected to payment page to complete this payment." });
|
|
54
|
+
}
|
|
55
|
+
function CardComponent(_a) {
|
|
56
|
+
var client = _a.client, active = _a.active, type = _a.type, brands = _a.brands, onValid = _a.onValid, onChange = _a.onChange;
|
|
57
|
+
var cardContainerRef = (0, react_1.useRef)(null);
|
|
58
|
+
var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1];
|
|
59
|
+
var _c = (0, react_1.useState)({}), paymentData = _c[0], setPaymentData = _c[1];
|
|
60
|
+
var _d = (0, react_1.useState)(null), inputFocus = _d[0], setInputFocus = _d[1];
|
|
61
|
+
var _e = (0, react_1.useState)([]), activeCards = _e[0], setActiveCards = _e[1];
|
|
62
|
+
var _f = (0, react_1.useState)({}), errors = _f[0], setErrors = _f[1];
|
|
63
|
+
var _g = (0, react_1.useState)({}), validFields = _g[0], setValidFields = _g[1];
|
|
64
|
+
(0, react_1.useEffect)(function () {
|
|
65
|
+
if (!!active) {
|
|
66
|
+
onValid(false);
|
|
67
|
+
setLoading(true);
|
|
68
|
+
setPaymentData({});
|
|
69
|
+
setInputFocus(null);
|
|
70
|
+
setActiveCards([]);
|
|
71
|
+
setErrors({});
|
|
72
|
+
setValidFields({});
|
|
73
|
+
handleCreateCheckout({ type: type });
|
|
74
|
+
}
|
|
75
|
+
}, [active, type]);
|
|
76
|
+
(0, react_1.useEffect)(function () {
|
|
77
|
+
if (!!paymentData && typeof onValid === "function") {
|
|
78
|
+
var isValid = !!paymentData.encryptedCardNumber &&
|
|
79
|
+
!!paymentData.encryptedExpiryMonth &&
|
|
80
|
+
!!paymentData.encryptedExpiryYear &&
|
|
81
|
+
!!paymentData.encryptedSecurityCode;
|
|
82
|
+
onValid(isValid);
|
|
83
|
+
onChange({
|
|
84
|
+
type: paymentData.type,
|
|
85
|
+
brand: paymentData.brand,
|
|
86
|
+
encryptedCardNumber: paymentData.encryptedCardNumber,
|
|
87
|
+
encryptedExpiryMonth: paymentData.encryptedExpiryMonth,
|
|
88
|
+
encryptedExpiryYear: paymentData.encryptedExpiryYear,
|
|
89
|
+
encryptedSecurityCode: paymentData.encryptedSecurityCode,
|
|
90
|
+
cardholder: paymentData.cardholder,
|
|
91
|
+
});
|
|
92
|
+
// onChange(paymentData)
|
|
93
|
+
}
|
|
94
|
+
}, [paymentData]);
|
|
95
|
+
function handleOnChange(state) {
|
|
96
|
+
var _a = state || {}, data = _a.data, valid = _a.valid, errors = _a.errors;
|
|
97
|
+
setPaymentData((!!data && data.paymentMethod) || {});
|
|
98
|
+
setValidFields(Object.assign(tslib_1.__assign(tslib_1.__assign({}, (valid || {})), { encryptedExpiryDate: valid.encryptedExpiryMonth && valid.encryptedExpiryYear })));
|
|
99
|
+
setErrors(errors || {});
|
|
100
|
+
}
|
|
101
|
+
var clientConfig = client.getConfig();
|
|
102
|
+
var configuration = {
|
|
103
|
+
locale: "en_US",
|
|
104
|
+
environment: clientConfig.clientEnv,
|
|
105
|
+
clientKey: clientConfig.clientKey,
|
|
106
|
+
analytics: {
|
|
107
|
+
enabled: false,
|
|
108
|
+
},
|
|
109
|
+
onChange: handleOnChange,
|
|
110
|
+
};
|
|
111
|
+
function handleCreateCheckout(opts) {
|
|
112
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
113
|
+
var checkout, e_1;
|
|
114
|
+
return tslib_1.__generator(this, function (_a) {
|
|
115
|
+
switch (_a.label) {
|
|
116
|
+
case 0:
|
|
117
|
+
_a.trys.push([0, 2, , 3]);
|
|
118
|
+
return [4 /*yield*/, (0, adyen_web_1.default)(configuration)];
|
|
119
|
+
case 1:
|
|
120
|
+
checkout = _a.sent();
|
|
121
|
+
if (!!cardContainerRef.current) {
|
|
122
|
+
checkout
|
|
123
|
+
.create("securedfields", {
|
|
124
|
+
type: type,
|
|
125
|
+
brands: brands,
|
|
126
|
+
styles: {
|
|
127
|
+
error: {
|
|
128
|
+
color: "red",
|
|
129
|
+
},
|
|
130
|
+
validated: {
|
|
131
|
+
color: "green",
|
|
132
|
+
},
|
|
133
|
+
placeholder: {
|
|
134
|
+
color: "#d8d8d8",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
onLoad: function () {
|
|
138
|
+
setLoading(true);
|
|
139
|
+
},
|
|
140
|
+
onConfigSuccess: function () {
|
|
141
|
+
setLoading(false);
|
|
142
|
+
},
|
|
143
|
+
onFocus: function (data) {
|
|
144
|
+
var _a = data || {}, focus = _a.focus, fieldType = _a.fieldType;
|
|
145
|
+
if (!!focus) {
|
|
146
|
+
setInputFocus(fieldType);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
setInputFocus(null);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
onBinLookup: function (data) {
|
|
153
|
+
var detectedBrands = (data || {}).detectedBrands;
|
|
154
|
+
setActiveCards(detectedBrands || []);
|
|
155
|
+
},
|
|
156
|
+
})
|
|
157
|
+
.mount(cardContainerRef.current);
|
|
158
|
+
}
|
|
159
|
+
return [3 /*break*/, 3];
|
|
160
|
+
case 2:
|
|
161
|
+
e_1 = _a.sent();
|
|
162
|
+
if (process.env.NODE_ENV === "development") {
|
|
163
|
+
console.log("[ERROR] Handle create checkout error: ", e_1);
|
|
164
|
+
}
|
|
165
|
+
return [3 /*break*/, 3];
|
|
166
|
+
case 3: return [2 /*return*/];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
if (!active) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: (0, format_1.classNames)({
|
|
175
|
+
"relative transition-all": true,
|
|
176
|
+
"h-96 max-h-96": !!loading,
|
|
177
|
+
"h-auto max-h-120": !loading,
|
|
178
|
+
}) }, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: "flex my-3 space-x-3" }, { children: [(0, jsx_runtime_1.jsx)(CheckoutCardLogo, { active: activeCards.includes("visa"), logoUrl: "logo/visa.svg", client: client }), (0, jsx_runtime_1.jsx)(CheckoutCardLogo, { active: activeCards.includes("mc"), logoUrl: "logo/mastercard.svg", client: client }), (0, jsx_runtime_1.jsx)(CheckoutCardLogo, { active: activeCards.includes("amex"), logoUrl: "logo/american-express.svg", client: client })] })), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ ref: cardContainerRef, className: (0, format_1.classNames)({
|
|
179
|
+
"opacity-0": !!loading,
|
|
180
|
+
}) }, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Label_1.default, tslib_1.__assign({ htmlFor: "cardNumber" }, { children: "Card number" })), (0, jsx_runtime_1.jsx)(CheckoutInputField, { field: "encryptedCardNumber", focus: inputFocus === "encryptedCardNumber", valids: validFields, errors: errors })] }), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: "grid grid-cols-2 gap-6" }, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Label_1.default, tslib_1.__assign({ htmlFor: "expiryDate" }, { children: "Expiry date" })), (0, jsx_runtime_1.jsx)(CheckoutInputField, { field: "encryptedExpiryDate", focus: inputFocus === "encryptedExpiryDate", valids: validFields, errors: errors })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Label_1.default, tslib_1.__assign({ htmlFor: "securityCode" }, { children: "Security Code (CVV/CVC)" })), (0, jsx_runtime_1.jsx)(CheckoutInputField, { field: "encryptedSecurityCode", focus: inputFocus === "encryptedSecurityCode", valids: validFields, errors: errors })] })] }))] })), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: (0, format_1.classNames)({
|
|
181
|
+
"absolute inset-0 flex flex-col gap-3 items-center justify-center": true,
|
|
182
|
+
"opacity-0 pointer-events-none": !loading,
|
|
183
|
+
}) }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "w-16 h-16" }, { children: (0, jsx_runtime_1.jsxs)("svg", tslib_1.__assign({ className: "w-full h-full animate-spin", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, { children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] })) })), (0, jsx_runtime_1.jsx)("p", { children: "Loading" })] }))] })));
|
|
184
|
+
}
|
|
185
|
+
function CheckoutPaymentMethod(_a) {
|
|
186
|
+
var active = _a.active, children = _a.children, onClick = _a.onClick;
|
|
187
|
+
return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: (0, format_1.classNames)({
|
|
188
|
+
"border px-3 py-2 mb-2 rounded-md cursor-pointer": true,
|
|
189
|
+
"bg-primary-500 text-white border-primary-500": !!active,
|
|
190
|
+
"text-gray-300 border-gray-300": !active,
|
|
191
|
+
}), onClick: onClick }, { children: children })));
|
|
192
|
+
}
|
|
193
|
+
function CheckoutContainer(_a) {
|
|
194
|
+
var client = _a.client, amount = _a.amount, onValid = _a.onValid, onChange = _a.onChange;
|
|
195
|
+
var apiKey = client.getApiKey();
|
|
196
|
+
var _b = (0, react_1.useState)(true), loadingPaymentMethod = _b[0], setLoadingPaymentMethod = _b[1];
|
|
197
|
+
var _c = (0, react_1.useState)([]), paymentMethods = _c[0], setPaymentMethods = _c[1];
|
|
198
|
+
var _d = (0, react_1.useState)(null), currentPaymentMethod = _d[0], setPaymentMethod = _d[1];
|
|
199
|
+
(0, react_1.useEffect)(function () {
|
|
200
|
+
if (!!apiKey) {
|
|
201
|
+
handleGeneratePaymentMethods(apiKey);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
setLoadingPaymentMethod(false);
|
|
205
|
+
}
|
|
206
|
+
}, [apiKey]);
|
|
207
|
+
function handleGeneratePaymentMethods(apiKey) {
|
|
208
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
209
|
+
var response;
|
|
210
|
+
return tslib_1.__generator(this, function (_a) {
|
|
211
|
+
switch (_a.label) {
|
|
212
|
+
case 0: return [4 /*yield*/, axios_1.default.post("".concat(client.getConfig().baseApiUri, "/koomipay/payment-methods"), {
|
|
213
|
+
amount: {
|
|
214
|
+
currency: amount.currency,
|
|
215
|
+
price: amount.price,
|
|
216
|
+
},
|
|
217
|
+
}, {
|
|
218
|
+
headers: {
|
|
219
|
+
"X-API-KEY": apiKey,
|
|
220
|
+
},
|
|
221
|
+
})];
|
|
222
|
+
case 1:
|
|
223
|
+
response = _a.sent();
|
|
224
|
+
if (!!response && response.data && response.data.success) {
|
|
225
|
+
setPaymentMethods(response.data.paymentMethods);
|
|
226
|
+
setPaymentMethod(!!response.data.paymentMethods && response.data.paymentMethods[0]);
|
|
227
|
+
setLoadingPaymentMethod(false);
|
|
228
|
+
}
|
|
229
|
+
return [2 /*return*/];
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
function handleChangePaymentMethod(updatedPaymentMethod) {
|
|
235
|
+
if ((currentPaymentMethod || {}).type !== (updatedPaymentMethod || {}).type) {
|
|
236
|
+
setPaymentMethod(updatedPaymentMethod);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (!!loadingPaymentMethod) {
|
|
240
|
+
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: (0, format_1.classNames)({
|
|
241
|
+
"mx-auto w-64 h-64 inset-0 flex flex-col gap-3 items-center justify-center": true,
|
|
242
|
+
"opacity-0 pointer-events-none": !loadingPaymentMethod,
|
|
243
|
+
}) }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "w-16 h-16" }, { children: (0, jsx_runtime_1.jsxs)("svg", tslib_1.__assign({ className: "w-full h-full animate-spin", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, { children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] })) })), (0, jsx_runtime_1.jsx)("p", { children: "Loading" })] })));
|
|
244
|
+
}
|
|
245
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(paymentMethods || []).map(function (paymentMethod) { return ((0, jsx_runtime_1.jsx)(CheckoutPaymentMethod, tslib_1.__assign({ active: (currentPaymentMethod || {}).type === paymentMethod.type, onClick: function () { return handleChangePaymentMethod(paymentMethod); } }, { children: paymentMethod.name }), paymentMethod.type)); }), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: (0, format_1.classNames)({
|
|
246
|
+
"border-t border-gray-200 mt-6 py-3": true,
|
|
247
|
+
}) }, { children: [(0, jsx_runtime_1.jsx)(CardComponent, { client: client, active: !!currentPaymentMethod && currentPaymentMethod.type === "scheme", type: "card", brands: ["mc", "visa", "amex"], onValid: onValid, onChange: onChange }), (0, jsx_runtime_1.jsx)(GrabPayComponent, { active: !!currentPaymentMethod && currentPaymentMethod.type.includes("grabpay"), paymentMethod: currentPaymentMethod, onValid: onValid, onChange: onChange })] }))] }));
|
|
248
|
+
}
|
|
249
|
+
exports.CheckoutContainer = CheckoutContainer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var format_1 = require("../utils/format");
|
|
6
|
+
function Label(_a) {
|
|
7
|
+
var className = _a.className, error = _a.error, htmlFor = _a.htmlFor, info = _a.info, mandatory = _a.mandatory, children = _a.children;
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: "flex items-center justify-between" }, { children: [(0, jsx_runtime_1.jsxs)("label", tslib_1.__assign({ htmlFor: htmlFor, className: (0, format_1.classNames)(tslib_1.__assign(tslib_1.__assign({}, (0, format_1.classNameObject)(className)), { "block text-base font-medium mb-1.5": true, "text-gray-900 dark:text-white": !error, "text-red-600 dark:text-red-500": !!error })) }, { children: [children, mandatory && (0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: "ml-1 text-red-500" }, { children: "*" }))] })), info && (0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: "text-sm leading-5 text-gray-500 dark:text-gray-500 ".concat(error && "text-red-600") }, { children: info }))] })));
|
|
9
|
+
}
|
|
10
|
+
exports.default = Label;
|
|
11
|
+
Label.defaultProps = {
|
|
12
|
+
error: false,
|
|
13
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConfig = void 0;
|
|
4
|
+
var environments = ["dev", "test", "live"];
|
|
5
|
+
var configuration = {
|
|
6
|
+
"dev": {
|
|
7
|
+
"baseApiUri": "http://localhost:32022",
|
|
8
|
+
"assetHost": "http://localhost:3000",
|
|
9
|
+
"clientEnv": "TEST",
|
|
10
|
+
"clientKey": "test_6FPMOVL2VVGJ7PASYRZDHX2AHAM6D5SG",
|
|
11
|
+
},
|
|
12
|
+
"test": {
|
|
13
|
+
"baseApiUri": "https://api-pay-demo.koomi.app",
|
|
14
|
+
"assetHost": "https://pay-demo.koomi.app",
|
|
15
|
+
"clientEnv": "TEST",
|
|
16
|
+
"clientKey": "test_6FPMOVL2VVGJ7PASYRZDHX2AHAM6D5SG",
|
|
17
|
+
},
|
|
18
|
+
"live": {
|
|
19
|
+
"baseApiUri": "https://api-pay-demo.koomi.app",
|
|
20
|
+
"assetHost": "https://pay-demo.koomi.app",
|
|
21
|
+
"clientEnv": "TEST",
|
|
22
|
+
"clientKey": "test_6FPMOVL2VVGJ7PASYRZDHX2AHAM6D5SG",
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function getConfig(env) {
|
|
26
|
+
if (!env) {
|
|
27
|
+
throw new Error("getConfig(env) expected env as string, but got \"".concat(env, "\""));
|
|
28
|
+
}
|
|
29
|
+
if (!environments.includes(env)) {
|
|
30
|
+
throw new Error("env must be one of ".concat(environments.join(", ")));
|
|
31
|
+
}
|
|
32
|
+
return configuration[env];
|
|
33
|
+
}
|
|
34
|
+
exports.getConfig = getConfig;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createClient = exports.CheckoutContainer = void 0;
|
|
4
|
+
var CheckoutContainer_1 = require("./components/CheckoutContainer");
|
|
5
|
+
Object.defineProperty(exports, "CheckoutContainer", { enumerable: true, get: function () { return CheckoutContainer_1.CheckoutContainer; } });
|
|
6
|
+
var client_1 = require("./lib/client");
|
|
7
|
+
Object.defineProperty(exports, "createClient", { enumerable: true, get: function () { return client_1.createClient; } });
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{outline:2px solid #0000;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid #0000;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:#0000;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=checkbox]:indeterminate,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:#0000;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:#0000;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.bottom-0{bottom:0}.right-3{right:.75rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-4{margin-bottom:1rem}.mt-1\.5{margin-top:.375rem}.mt-1{margin-top:.25rem}.mb-2{margin-bottom:.5rem}.mt-6{margin-top:1.5rem}.mb-1\.5{margin-bottom:.375rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.block{display:block}.flex{display:flex}.grid{display:grid}.h-10{height:2.5rem}.h-full{height:100%}.h-12{height:3rem}.h-6{height:1.5rem}.h-96{height:24rem}.h-auto{height:auto}.h-16{height:4rem}.h-64{height:16rem}.max-h-96{max-height:24rem}.max-h-120{max-height:30rem}.w-full{width:100%}.w-6{width:1.5rem}.w-16{width:4rem}.w-64{width:16rem}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-6{gap:1.5rem}.gap-3{gap:.75rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-green-700{--tw-border-opacity:1;border-color:rgb(21 128 61/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-primary-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-primary-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}.object-contain{-o-object-fit:contain;object-fit:contain}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.leading-5{line-height:1.25rem}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.opacity-30{opacity:.3}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-blue-200{--tw-ring-opacity:1;--tw-ring-color:rgb(191 219 254/var(--tw-ring-opacity))}.grayscale{--tw-grayscale:grayscale(100%)}.filter,.grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.adyen-checkout__spinner__wrapper{align-items:center;display:flex;height:100%;justify-content:center}.adyen-checkout__spinner__wrapper--inline{display:inline-block;height:auto;margin-right:8px}[dir=rtl] .adyen-checkout__spinner__wrapper--inline{margin-left:8px;margin-right:0}.adyen-checkout__spinner{animation:rotateSpinner 1.5s linear infinite;border-radius:50%;border:3px solid #0075ff;border-top-color:#0000;height:43px;width:43px}.adyen-checkout__spinner--large{height:43px;width:43px}.adyen-checkout__spinner--small{border-width:2px;height:16px;width:16px}.adyen-checkout__spinner--medium{height:28px;width:28px}@keyframes rotateSpinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.adyen-checkout__button{background:#00112c;border:0;border-radius:6px;color:#fff;cursor:pointer;font-size:1em;font-weight:500;height:48px;margin:0;padding:15px;text-decoration:none;transition:background .3s ease-out,box-shadow .3s ease-out;width:100%}.adyen-checkout__button:focus{box-shadow:0 0 0 2px #99c2ff;outline:0}.adyen-checkout__button:hover{background:#1c3045;box-shadow:0 0,0 2px 4px -1px #0003,0 4px 5px 0 #00000024}.adyen-checkout__button:active{background:#3a4a5c}.adyen-checkout__button:hover:focus{box-shadow:0 0 0 2px #99c2ff,0 3px 4px #000f2d33}.adyen-checkout__button:disabled,.adyen-checkout__button:disabled:hover{box-shadow:none;cursor:not-allowed;opacity:.4;-webkit-user-select:all;-moz-user-select:all;user-select:all}.adyen-checkout__button.adyen-checkout__button--loading{background:#687282;box-shadow:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__button.adyen-checkout__button--pay{display:flex;justify-content:center;margin-top:24px}.adyen-checkout__button.adyen-checkout__button--pay:disabled{opacity:.4}.adyen-checkout__button.adyen-checkout__button--standalone{margin-top:0}.adyen-checkout__button.adyen-checkout__button--inline{display:block;font-size:.81em;height:auto;padding:10px 8px;width:auto}.adyen-checkout__button.adyen-checkout__button--ghost{background:none;border:0;color:#00112c}.adyen-checkout__button.adyen-checkout__button--ghost:hover{background:#f7f8f9;box-shadow:none}.adyen-checkout__button.adyen-checkout__button--ghost:active{background:#e6e9eb;box-shadow:none}.adyen-checkout__button.adyen-checkout__button--secondary{background:#fff;border:1px solid #00112c;color:#00112c;padding:10px 12px}.adyen-checkout__button.adyen-checkout__button--secondary:hover{background:#f7f8f9;box-shadow:0 2px 4px #1b2a3c33,0 4px 5px #1b2a3c24}.adyen-checkout__button.adyen-checkout__button--secondary:active,.adyen-checkout__button.adyen-checkout__button--secondary:active:hover{background:#f7f8f9;box-shadow:none}.adyen-checkout__button.adyen-checkout__button--secondary:disabled,.adyen-checkout__button.adyen-checkout__button--secondary:disabled:hover{background-color:#f7f8f9;border-color:#99a3ad;box-shadow:none;cursor:not-allowed;opacity:.5;-webkit-user-select:all;-moz-user-select:all;user-select:all}.adyen-checkout__button.adyen-checkout__button--secondary .adyen-checkout__spinner{border-color:#0000 #00112c #00112c}.adyen-checkout__button.adyen-checkout__button--action{background:#0066ff1a;border:1px solid #0000;color:#0075ff;padding:10px 12px}.adyen-checkout__button.adyen-checkout__button--action:hover{background:#06f3;box-shadow:none}.adyen-checkout__button.adyen-checkout__button--action:active,.adyen-checkout__button.adyen-checkout__button--action:active:hover{background:#0066ff4d;box-shadow:none}.adyen-checkout__button.adyen-checkout__button--link{background:#0000;border:1px solid #0000;border-radius:3px;color:#0075ff;font-weight:400;padding:2px}.adyen-checkout__button.adyen-checkout__button--link:hover{background:#0000;box-shadow:none;text-decoration:underline}.adyen-checkout__button.adyen-checkout__button--completed,.adyen-checkout__button.adyen-checkout__button--completed:active,.adyen-checkout__button.adyen-checkout__button--completed:active:hover,.adyen-checkout__button.adyen-checkout__button--completed:hover{background:#089a43;color:#fff}.adyen-checkout__button.adyen-checkout__button--completed .adyen-checkout__button__icon{filter:brightness(0) invert(1)}.adyen-checkout__button__content{align-items:center;display:flex;height:100%;justify-content:center}.adyen-checkout__button__icon{margin-right:12px}[dir=rtl] .adyen-checkout__button__icon{margin-left:12px;margin-right:0}.adyen-checkout__button__text{display:block;justify-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.adyen-checkout__button .adyen-checkout__spinner{border-color:#0000 #fff #fff}.checkout-secondary-button__text{font-size:.85em;margin-left:5px;margin-top:1px}.adyen-checkout__fieldset{display:block;padding-bottom:8px;width:100%}.adyen-checkout__fieldset:last-of-type{padding-bottom:0}.adyen-checkout__fieldset+.adyen-checkout__fieldset{margin-top:16px}.adyen-checkout__fieldset__title{color:#687282;display:block;font-size:.68em;font-weight:700;letter-spacing:1px;margin:0;padding:0 0 12px;text-transform:uppercase}.adyen-checkout__field-group,.adyen-checkout__fieldset__fields{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.adyen-checkout__field-group:last-of-type .adyen-checkout__field{margin-bottom:0}.adyen-checkout__fieldset--readonly .adyen-checkout__fieldset__fields{color:#00112c;font-size:.81em;line-height:19px;margin:0}.adyen-checkout__field{display:block;margin-bottom:16px;width:100%}.adyen-checkout__field:last-of-type{margin-bottom:0}.adyen-checkout__label{display:block;position:relative}.adyen-checkout__helper-text,.adyen-checkout__label__text{color:#00112c;display:block;font-size:.81em;font-weight:400;line-height:13px;padding-bottom:5px}.adyen-checkout__label-adornment--end{position:absolute;right:0;top:0}.adyen-checkout__helper-text{color:#687282}.adyen-checkout__label__text{display:block;overflow:hidden;text-overflow:ellipsis;transition:color .1s ease-out;white-space:nowrap}.adyen-checkout__label__text--error{color:#c12424}.adyen-checkout__label--focused .adyen-checkout__label__text{color:#0075ff}.adyen-checkout__error-text{align-items:center;color:#c12424;display:flex;font-size:.75em;font-weight:400;margin-top:4px}.adyen-checkout__radio_group+.adyen-checkout-input__inline-validation{display:none}.adyen-checkout__radio_group__input{opacity:0;position:absolute}.adyen-checkout__radio_group__label{color:inherit;display:block;font-size:.81em;font-weight:400;line-height:16px;overflow:visible;padding-bottom:0;padding-left:24px;position:relative}.adyen-checkout__label--focused .adyen-checkout__radio_group__label{color:inherit}.adyen-checkout__radio_group__label:before{background-color:#fff;border:1px solid #b9c4c9;border-radius:50%;content:"";height:16px;left:0;position:absolute;top:0;transition:border-color .2s ease-out,box-shadow .2s ease-out;width:16px}.adyen-checkout__radio_group__label:hover:before{border-color:#99a3ad;box-shadow:0 0 0 2px #d4d9db;cursor:pointer}.adyen-checkout__radio_group__label:after{background-color:#fff;border-radius:50%;box-shadow:0 1px 1px #000f2d40;content:"";display:block;height:6px;left:5px;margin:0 auto;position:absolute;top:5px;transform:scale(0);transition:transform .2s ease-out;width:6px}.adyen-checkout__radio_group__label:hover{border-color:#0075ff;cursor:pointer}.adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label:before,.adyen-checkout__radio_group__label--selected{background-color:#0075ff;border:0;transition:all .2s ease-out}.adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label:after{transform:scale(1)}.adyen-checkout__radio_group__input:focus+.adyen-checkout__radio_group__label:before{border-color:#0075ff;box-shadow:0 0 0 2px #06f6}.adyen-checkout__radio_group__input:checked+.adyen-checkout__radio_group__label:hover:before,.adyen-checkout__radio_group__input:checked:active+.adyen-checkout__radio_group__label:before,.adyen-checkout__radio_group__input:checked:focus+.adyen-checkout__radio_group__label:before{box-shadow:0 0 0 2px #06f6}.adyen-checkout__radio_group__label.adyen-checkout__radio_group__label--invalid:before{border:1px solid #c12424}.adyen-checkout__checkbox{display:block}.adyen-checkout__checkbox__label{color:#00112c;cursor:pointer;display:inline-block;font-size:.81em;font-weight:400;line-height:19px;padding-left:24px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}[dir=rtl] .adyen-checkout__checkbox__label{padding-left:0;padding-right:24px}.adyen-checkout__checkbox__input{opacity:0;pointer-events:none;position:absolute}.adyen-checkout__checkbox__input:checked+.adyen-checkout__checkbox__label:before{opacity:1}.adyen-checkout__checkbox__input:checked+.adyen-checkout__checkbox__label:after{background-color:#0075ff;border:1px solid #0075ff}.adyen-checkout__checkbox__input:checked:hover+.adyen-checkout__checkbox__label:after{border-color:#0075ff;box-shadow:0 0 0 2px #06f6}.adyen-checkout__checkbox__input:focus+.adyen-checkout__checkbox__label:after{border:1px solid #0075ff;box-shadow:0 0 0 2px #99c2ff}.adyen-checkout__checkbox__input:hover:not(:focus)+.adyen-checkout__checkbox__label:after{border-color:#99a3ad;box-shadow:0 0 0 2px #d4d9db}.adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:before{border-radius:0 2px 1px 2px;border-color:#0000 #fff #fff #0000;border-style:solid;border-width:1px 2px 2px 1px;content:"";height:11px;left:1px;opacity:0;position:absolute;top:2px;transform:rotate(37deg);transform-origin:100% 100%;transition:opacity .2s ease-out;width:6px;z-index:1}[dir=rtl] .adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:before{left:auto;right:8px}.adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:after{background-color:#fff;border:1px solid #b9c4c9;border-radius:3px;content:"";height:16px;left:0;position:absolute;top:0;transition:background .15s ease-out,border .05s ease-out,box-shadow .1s ease-out;width:16px;z-index:0}[dir=rtl] .adyen-checkout__checkbox__input+.adyen-checkout__checkbox__label:after{left:auto;right:0}.adyen-checkout__field--consentCheckbox{background:#e6e9eb;border:1px solid #e6e9eb;border-radius:6px;padding:14px 14px 13px}[dir=rtl] .adyen-checkout__field--consentCheckbox{padding:14px 14px 13px}.adyen-checkout__field--consentCheckbox.adyen-checkout__field--error{border-color:#c12424}.adyen-checkout__field--consentCheckbox .adyen-checkout-input__inline-validation{right:-27px;top:10px}.Select-module_adyen-checkout__dropdown__0Mj-n{position:relative}.Select-module_adyen-checkout__dropdown__button__yTyqq{align-items:center;cursor:pointer;display:flex}.Select-module_adyen-checkout__dropdown__button__yTyqq:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.195 6.565a1 1 0 0 0 1.6 0l2.992-3.98a1 1 0 0 0-.8-1.602H1.013a1 1 0 0 0-.8 1.6l2.983 3.982Z' fill='%23687282'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;content:"";height:6px;position:absolute;right:16px;width:8px}[dir=rtl] .Select-module_adyen-checkout__dropdown__button__yTyqq:after{left:16px;right:auto}.Select-module_adyen-checkout__dropdown__button--active__Ej-JR:after{transform:rotate(180deg)}.Select-module_adyen-checkout__filter-input__CwPBS{background:#fff;border:0;caret-color:#0075ff;color:#00112c;font-family:inherit;font-size:1em;height:100%;padding:0;width:100%}.Select-module_adyen-checkout__filter-input__CwPBS::-moz-placeholder{color:#b9c4c9;font-weight:200}.Select-module_adyen-checkout__filter-input__CwPBS::placeholder{color:#b9c4c9;font-weight:200}.Select-module_adyen-checkout__filter-input__CwPBS:active,.Select-module_adyen-checkout__filter-input__CwPBS:focus{outline:0}.Select-module_adyen-checkout__dropdown__list__YtEzj{background:#fff;display:none;list-style:none;margin:0 0 50px;overflow-y:auto;padding:0;position:absolute;width:100%;z-index:1}.Select-module_adyen-checkout__dropdown__list__YtEzj.Select-module_adyen-checkout__dropdown__list--active__Gegw2{display:block}.Select-module_adyen-checkout__dropdown__element__ORU4-{align-items:center;display:flex}.adyen-checkout__image{opacity:0;transition:opacity .6s ease-out}.adyen-checkout__image--loaded{opacity:1}.adyen-checkout__dropdown__button-icon--left{flex-direction:row-reverse;justify-content:flex-end}.adyen-checkout__dropdown__button-icon--left>img{margin-left:0;margin-right:12px}.adyen-checkout__dropdown{font-size:1em;max-width:100%;width:100%}.adyen-checkout__dropdown__button{background:#fff;border:1px solid #b9c4c9;border-radius:6px;color:#00112c;font-size:1em;height:40px;line-height:20px;outline:0;padding:7px 24px 7px 12px;text-decoration:none;transition:border .2s ease-out,box-shadow .2s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}[dir=rtl] .adyen-checkout__dropdown__button{padding:7px 12px 7px 24px}.adyen-checkout__dropdown__button:hover{border-color:#99a3ad}.adyen-checkout__dropdown__button__icon{border-radius:3px;height:26px;margin-right:12px;max-width:40px}.adyen-checkout__dropdown__button--disabled{opacity:.4}.adyen-checkout__dropdown__button--active,.adyen-checkout__dropdown__button--active:hover,.adyen-checkout__dropdown__button:active,.adyen-checkout__dropdown__button:focus{border-color:#0075ff;box-shadow:0 0 0 2px #99c2ff}.adyen-checkout__dropdown__button--readonly,.adyen-checkout__dropdown__button--readonly--active,.adyen-checkout__dropdown__button--readonly:focus,.adyen-checkout__dropdown__button--readonly:hover{background:#e6e9eb;border-color:#0000;color:#00112c;cursor:not-allowed}.adyen-checkout__dropdown__button--readonly:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.195 6.565a1 1 0 0 0 1.6 0l2.992-3.98a1 1 0 0 0-.8-1.602H1.013a1 1 0 0 0-.8 1.6l2.983 3.982Z' fill='%23B9C4C9'/%3E%3C/svg%3E")}.adyen-checkout__dropdown__button--invalid{border-color:#c12424}.adyen-checkout__dropdown__button--valid{border-bottom-color:#089a43}.adyen-checkout__dropdown__button__text{flex-grow:1;overflow:hidden;pointer-events:none;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adyen-checkout__dropdown__button__secondary-text{margin-right:16px}.adyen-checkout__dropdown__list{border-radius:6px;box-shadow:0 2px 7px #000f2d4d;max-height:375px;z-index:2}.adyen-checkout__dropdown__list.adyen-checkout__dropdown__list--active{margin-top:2px}.adyen-checkout__dropdown__element{border:1px solid #0000;cursor:pointer;font-size:.81em;-webkit-hyphens:auto;hyphens:auto;line-height:20px;outline:0;padding:8px;transition:background .2s ease-out,border-color .2s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;word-break:break-word}.adyen-checkout__dropdown__element:last-child{border-bottom:0}.adyen-checkout__dropdown__element:active,.adyen-checkout__dropdown__element:focus,.adyen-checkout__dropdown__element:hover{background:#e6e9eb99}.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--active{background:#0066ff1a}.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--active:active,.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--active:focus,.adyen-checkout__dropdown__element.adyen-checkout__dropdown__element--active:hover{background:#0066ff26}.adyen-checkout__dropdown__element--disabled{cursor:not-allowed;opacity:.4}.adyen-checkout__dropdown__element__icon{border-radius:3px;margin-right:12px;max-height:26px;max-width:40px}.adyen-checkout__dropdown__element__text{flex-grow:1}.adyen-checkout__dropdown__element__secondary-text:not(:last-child){margin-right:8px}.adyen-checkout__dropdown__element__flag{margin-left:8px;margin-right:10px;max-height:18px;max-width:27px}.adyen-checkout__dropdown+.adyen-checkout-input__inline-validation{right:32px}.adyen-checkout__field-wrapper{display:flex;width:100%}.adyen-checkout__field--20{width:20%}.adyen-checkout__field--30{width:30%}.adyen-checkout__field--40{width:40%}.adyen-checkout__field--50{width:50%}.adyen-checkout__field--60{width:60%}.adyen-checkout__field--70{width:70%}.adyen-checkout__field--80{width:80%}.adyen-checkout__field--col-70{width:calc(70% - 8px)}.adyen-checkout__field--col-30{width:calc(30% - 8px)}.adyen-checkout__field--col-50{width:calc(50% - 8px)}.adyen-checkout__field-wrapper>.adyen-checkout__field:first-child{margin-right:8px}[dir=rtl] .adyen-checkout__field-wrapper>.adyen-checkout__field:first-child{margin-left:8px;margin-right:0}.adyen-checkout__field-wrapper>.adyen-checkout__field:nth-child(2){margin-left:8px}[dir=rtl] .adyen-checkout__field-wrapper>.adyen-checkout__field:nth-child(2){margin-left:0;margin-right:8px}.adyen-checkout__field-wrapper:last-of-type>.adyen-checkout__field{margin-bottom:0}.adyen-checkout__input{background:#fff;border:1px solid #b9c4c9;border-radius:6px;caret-color:#0075ff;color:#00112c;display:block;font-family:inherit;font-size:1em;height:40px;outline:none;padding:5px 8px;position:relative;transition:border .2s ease-out,box-shadow .2s ease-out;width:100%}.adyen-checkout__input:hover{border-color:#99a3ad}.adyen-checkout__input:required{box-shadow:none}.adyen-checkout__input--disabled,.adyen-checkout__input[readonly]{background:#e6e9eb;border-color:#e6e9eb}.adyen-checkout__input--disabled:hover{border-color:#e6e9eb}.adyen-checkout__input-wrapper{display:block;position:relative}.adyen-checkout__input-wrapper--block{display:block}.adyen-checkout-input__inline-validation{height:16px;position:absolute;right:14px;top:50%;transform:translateY(-50%);width:16px}[dir=rtl] .adyen-checkout-input__inline-validation{left:14px;right:auto}[dir=ltr] .adyen-checkout-input__inline-validation{left:auto;right:14px}.adyen-checkout-input__inline-validation--valid{color:#089a43}.adyen-checkout-input__inline-validation--invalid{color:#c12424}.adyen-checkout__input--valid{border-bottom-color:#089a43}.adyen-checkout__input--error,.adyen-checkout__input--error:hover,.adyen-checkout__input--invalid,.adyen-checkout__input--invalid:hover{border-color:#c12424}.adyen-checkout__input::-moz-placeholder{color:#707070;font-weight:200}.adyen-checkout__input::placeholder{color:#707070;font-weight:200}.adyen-checkout__input--date{padding-right:30px}.adyen-checkout__input--focus,.adyen-checkout__input--focus:hover,.adyen-checkout__input:active,.adyen-checkout__input:active:hover,.adyen-checkout__input:focus,.adyen-checkout__input:focus:hover{border:1px solid #0075ff;box-shadow:0 0 0 2px #99c2ff}.adyen-checkout__input[readonly],.adyen-checkout__input[readonly]:hover{background-color:#e6e9eb;border-color:#0000;color:#687282;cursor:default}.adyen-checkout__fieldset--personalDetails .adyen-checkout__field--gender .adyen-checkout__radio_group{display:flex}.adyen-checkout__fieldset--personalDetails .adyen-checkout__radio_group{display:flex;margin:8px 0}.adyen-checkout__fieldset--personalDetails .adyen-checkout__radio_group__input-wrapper{margin-right:20px}.adyen-checkout__fieldset--personalDetails .adyen-checkout__radio_group__input-wrapper:last-child{margin:0}.adyen-checkout__open-invoice .adyen-checkout__fieldset--billingAddress{padding-bottom:8px}.adyen-checkout__open-invoice .adyen-checkout__fieldset--deliveryAddress{margin-top:24px;padding-bottom:8px}.adyen-checkout__open-invoice .adyen-checkout__input--separateDeliveryAddress{margin-bottom:0}.adyen-checkout__open-invoice .adyen-checkout__field--consentCheckbox{margin-top:22px}.adyen-checkout__input--separateDeliveryAddress+.adyen-checkout__checkbox__label{margin-top:16px}.adyen-checkout__amazonpay__button{margin:auto}.adyen-checkout__amazonpay .adyen-checkout__button--ghost{display:block;margin:8px auto 0;width:auto}@supports (-webkit-appearance:-apple-pay-button){.ApplePayButton-module_apple-pay-button__l5g-d,.ApplePayButton-module_apple-pay__gYjuP{-webkit-appearance:-apple-pay-button}.ApplePayButton-module_apple-pay-button__l5g-d{cursor:pointer;display:inline-block}.ApplePayButton-module_apple-pay-button-black__istwW{-apple-pay-button-style:#000}.ApplePayButton-module_apple-pay-button-white__-wLaE{-apple-pay-button-style:#fff}.ApplePayButton-module_apple-pay-button-white-with-line__MlRq7{-apple-pay-button-style:white-outline}.ApplePayButton-module_apple-pay-button--type-plain__ycfNl{-apple-pay-button-type:plain}.ApplePayButton-module_apple-pay-button--type-buy__9m8AB{-apple-pay-button-type:buy}.ApplePayButton-module_apple-pay-button--type-donate__HmRdK{-apple-pay-button-type:donate}.ApplePayButton-module_apple-pay-button--type-check-out__XdGWd{-apple-pay-button-type:check-out}.ApplePayButton-module_apple-pay-button--type-book__-v-VY{-apple-pay-button-type:book}.ApplePayButton-module_apple-pay-button--type-subscribe__WxWIF{-apple-pay-button-type:subscribe}.ApplePayButton-module_apple-pay-button--type-add-money__zeBA8{-apple-pay-button-type:add-money}.ApplePayButton-module_apple-pay-button--type-contribute__G3E8e{-apple-pay-button-type:contribute}.ApplePayButton-module_apple-pay-button--type-order__ggI6j{-apple-pay-button-type:order}.ApplePayButton-module_apple-pay-button--type-reload__QbgLd{-apple-pay-button-type:reload}.ApplePayButton-module_apple-pay-button--type-rent__VzC-E{-apple-pay-button-type:rent}.ApplePayButton-module_apple-pay-button--type-support__6EjmY{-apple-pay-button-type:support}.ApplePayButton-module_apple-pay-button--type-tip__bdzGK{-apple-pay-button-type:tip}.ApplePayButton-module_apple-pay-button--type-top-up__Eb3qR{-apple-pay-button-type:top-up}}@supports not (-webkit-appearance:-apple-pay-button){.ApplePayButton-module_apple-pay-button__l5g-d{background-position:50% 50%;background-repeat:no-repeat;background-size:100% 60%;border-radius:5px;box-sizing:border-box;display:inline-block;max-height:64px;min-height:32px;min-width:200px;padding:0}.ApplePayButton-module_apple-pay-button-black__istwW{background-color:#000;background-image:-webkit-named-image(apple-pay-logo-white)}.ApplePayButton-module_apple-pay-button-white-with-line__MlRq7,.ApplePayButton-module_apple-pay-button-white__-wLaE{background-color:#fff;background-image:-webkit-named-image(apple-pay-logo-black)}.ApplePayButton-module_apple-pay-button-white-with-line__MlRq7{border:.5px solid #000}}.adyen-checkout__applepay__button{height:48px;width:240px}.adyen-checkout__dropin .adyen-checkout__applepay__button{width:100%}.adyen-checkout__issuer-button{align-items:center;background-color:#fff;border:none;border-radius:6px;box-shadow:inset 0 0 0 1px #b9c4c9;cursor:pointer;display:flex;flex-basis:47%;flex-grow:2;font-size:.81em;height:40px;padding:0 12px;transition:background .3s ease-out,box-shadow .3s ease-out}.adyen-checkout__issuer-button:active{color:#000}.adyen-checkout__issuer-button:not(.adyen-checkout__issuer-button--selected):focus,.adyen-checkout__issuer-button:not(.adyen-checkout__issuer-button--selected):focus-visible,.adyen-checkout__issuer-button:not(.adyen-checkout__issuer-button--selected):hover{box-shadow:inset 0 0 0 2px #99a3ad;outline:none}.adyen-checkout__issuer-button--selected{background:#fff;box-shadow:inset 0 0 0 2px #0075ff;color:#0075ff;font-weight:500;height:40px;transition:none}.adyen-checkout__issuer-button-img{margin-right:8px;max-height:26px}.adyen-checkout__issuer-button-group{display:flex;flex-wrap:wrap;gap:16px 16px}.adyen-checkout__content-separator{align-items:center;color:#687282;display:flex;font-size:13px;justify-content:center;line-height:19px;margin-bottom:16px;margin-top:16px;white-space:nowrap}.adyen-checkout__content-separator:after,.adyen-checkout__content-separator:before{background:#e6e9eb;content:"";display:block;height:1px;width:100%}.adyen-checkout__content-separator:after{margin-left:20px}.adyen-checkout__content-separator:before{margin-right:20px}.adyen-checkout__field--issuer-list{margin-bottom:0}.adyen-checkout__issuer-list__termsAndConditions{text-align:center}.adyen-checkout__card-input__form{transition:opacity .25s ease-out}.adyen-checkout__card__cardNumber{max-width:400px}.adyen-checkout__card__cardNumber__input{padding:5px 8px}.adyen-checkout__card__exp-date__input--oneclick{font-weight:400;line-height:30px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.adyen-checkout__card__holderName,.adyen-checkout__field--expiryDate,.adyen-checkout__field--storedCard{margin-bottom:0}.adyen-checkout__card-input .adyen-checkout__fieldset--billingAddress,.adyen-checkout__card__holderName,.adyen-checkout__card__kcp-authentication,.adyen-checkout__card__socialSecurityNumber,.adyen-checkout__installments,.adyen-checkout__store-details{margin-top:16px}.adyen-checkout__card-input.adyen-checkout__card-input--loading{pointer-events:none}.adyen-checkout-error-panel+.adyen-checkout__card__holderName,.adyen-checkout-error-panel--sr-only+.adyen-checkout__card__holderName,.adyen-checkout__card__holderName:first-child{margin:0 0 16px}.adyen-checkout__field--cardNumber
|
|
2
|
+
.adyen-checkout__input--valid:not(.adyen-checkout__card__cardNumber__input--noBrand)+.adyen-checkout-input__inline-validation--valid,.adyen-checkout__field--cardNumber .adyen-checkout__input--error .adyen-checkout__card__cardNumber__brandIcon{display:none}.adyen-checkout__field--securityCode.adyen-checkout__field--error .adyen-checkout__card__cvc__hint,.adyen-checkout__field--securityCode.adyen-checkout__field--valid .adyen-checkout__card__cvc__hint{opacity:0}@keyframes cvcIndicateLocation{0%{opacity:1}to{opacity:.3}}.adyen-checkout__label--focused .adyen-checkout__field__cvc--back-hint .adyen-checkout__card__cvc__hint--back .adyen-checkout__card__cvc__hint__location,.adyen-checkout__label--focused .adyen-checkout__field__cvc--front-hint .adyen-checkout__card__cvc__hint--front .adyen-checkout__card__cvc__hint__location{animation-direction:alternate;animation-duration:1s;animation-iteration-count:infinite;animation-name:cvcIndicateLocation}.adyen-checkout__card__cvc__hint__wrapper{align-items:center;-webkit-backface-visibility:visible;backface-visibility:visible;display:flex;height:100%;margin:0 10px;position:absolute;right:0;top:0;transform:translateZ(0);transform-origin:center;transform-style:preserve-3d;transition:transform .3s cubic-bezier(.455,.03,.515,.955);width:27px;will-change:transform}.adyen-checkout__field__cvc--front-hint.adyen-checkout__card__cvc__hint__wrapper{transform:rotateY(180deg)}.adyen-checkout__card__cvc__hint{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute;transition:opacity .1s linear}.adyen-checkout__card__cvc__hint--front{transform:rotateY(180deg)}@media (prefers-reduced-motion:reduce){.adyen-checkout__card__cvc__hint__wrapper{transition:none}}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__fieldset__fields{justify-content:left}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__radio_group{display:flex;flex-direction:column}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__radio_group__input-wrapper{margin-top:20px}.adyen-checkout__fieldset--revolving-plan .adyen-checkout__field--revolving-plan-installments{margin-left:15px;position:relative;top:42px;width:30%}.LoadingWrapper-module_loading-input__form__ffCKa{opacity:1}.LoadingWrapper-module_loading-input__form--loading__7GmVo{opacity:0}.LoadingWrapper-module_loading-input__spinner__GxA51{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.LoadingWrapper-module_loading-input__spinner--active__ENNBS{display:block}.CardInput-module_card-input__wrapper__wXSCw{position:relative}.CardInput-module_card-input__wrapper__wXSCw *,.CardInput-module_card-input__wrapper__wXSCw :after,.CardInput-module_card-input__wrapper__wXSCw :before{box-sizing:border-box}.CardInput-module_card-input__icon__3Cz5M{border-radius:3px;height:18px;margin-left:7px;position:absolute;right:10px;top:50%;transform:translateY(-50%);width:27px}.CardInput-module_card-input__form__fRo1r{opacity:1}.CardInput-module_card-input__spinner__-j2Qi{display:none;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.CardInput-module_card-input__spinner--active__slD7w{display:block}.CardInput-module_card-input__form--loading__rrmdj{opacity:0}.CardInput-module_adyen-checkout__input__11tlB{display:block;max-height:100px}.CardInput-module_adyen-checkout__card__cvc__input--hidden__VIlHV,.CardInput-module_adyen-checkout__card__exp-date__input--hidden__evi6-{display:none}.CardInput-module_adyen-checkout__card__exp-cvc__exp-date__input--hidden__YC3VT{justify-content:flex-end}.CardInput-module_revolving-plan-installments__disabled__VhNj2{opacity:.4;pointer-events:none}.adyen-checkout-error-panel{margin-bottom:20px}.adyen-checkout-error-panel .adyen-checkout-error-panel__wrapper{font-size:.75em}.adyen-checkout-error-panel--sr-only{height:1px;left:-10000px;overflow:hidden;position:absolute;top:auto;width:1px}.adyen-checkout__card__dual-branding__buttons{display:flex;opacity:.4;pointer-events:none}.adyen-checkout__card__dual-branding__buttons--active{opacity:1;pointer-events:auto}.adyen-checkout__card__dual-branding__buttons .adyen-checkout__card__cardNumber__brandIcon{cursor:pointer;opacity:1}.adyen-checkout__card__dual-branding__buttons .adyen-checkout__card__cardNumber__brandIcon:first-child{right:40px}.adyen-checkout__card__dual-branding__buttons .adyen-checkout__card__cardNumber__brandIcon--not-selected{opacity:.5}.adyen-checkout__card__brands{display:flex;flex-basis:auto;flex-shrink:1;flex-wrap:wrap;gap:4px;height:16px;margin-bottom:16px;margin-top:-8px;overflow:hidden;transition:all .2s ease-out}.adyen-checkout__card__brands--hidden{height:0;opacity:0}.adyen-checkout__card__brands img{border-radius:3px;height:16px;width:24px}.adyen-checkout__card__brands__brand-wrapper{display:inline-block;height:16px;position:relative;width:24px}.adyen-checkout__card__brands__brand-wrapper:after{border:1px solid #001b2b2b;border-radius:3px;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.adyen-checkout-ctp__otp-resend-code{color:#0075ff;cursor:pointer;font-size:13px;font-weight:400;margin-left:auto}.adyen-checkout-ctp__otp-resend-code--confirmation,.adyen-checkout-ctp__otp-resend-code--disabled{color:#687282;cursor:default;font-size:13px;font-weight:400;margin-left:auto;pointer-events:none}.adyen-checkout-ctp__otp-resend-code--confirmation{align-items:center;display:flex}.adyen-checkout-ctp__otp-resend-code--confirmation>img{margin-left:4px}.adyen-checkout-ctp__otp-resend-code-counter{color:#000;cursor:default;display:inline-block;font-size:13px;font-weight:400;margin-left:auto;text-align:right}.adyen-checkout__field.adyen-checkout__field--otp{margin-bottom:24px}.adyen-checkout-ctp__otp-subtitle--highlighted{color:#00112c;font-weight:500}.adyen-checkout-ctp__card-list-single-card{align-items:center;background-color:#f7f8f9;border-radius:6px;display:flex;font-size:13px;font-weight:400;height:40px;line-height:19px;padding:12px}.adyen-checkout-ctp__card-list-single-card-expired{color:#687282;text-decoration:line-through}.adyen-checkout-ctp__expired-label{color:#687282;font-weight:500;line-height:17px;margin-left:auto}.adyen-checkout-ctp__card-image{border-radius:3px;margin-right:8px}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__element--disabled{opacity:1}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__element--disabled .adyen-checkout__dropdown__element__text{opacity:.4;text-decoration:line-through}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__element--disabled .adyen-checkout__dropdown__element__secondary-text{color:#687282;font-weight:500;line-height:17px}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__button--disabled{opacity:1}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__button--disabled .adyen-checkout__dropdown__button__text{opacity:.4;text-decoration:line-through}.adyen-checkout-ctp__cards-list-dropdown .adyen-checkout__dropdown__button--disabled .adyen-checkout__dropdown__button__secondary-text{color:#687282;font-weight:500;opacity:1}.adyen-checkout-ctp__card{background-color:#fff;border:none;border-radius:4px;box-shadow:0 0 0 2px #999595;cursor:pointer;height:40px;margin-bottom:20px;width:100%}.adyen-checkout-ctp__section-logout-button{color:#0075ff;cursor:pointer;font-size:13px;font-weight:400;line-height:19px;margin-left:auto}.adyen-checkout-ctp__section-logout-button--disabled{color:#687282;pointer-events:none}.adyen-checkout-ctp__section{background-color:#fff;border-radius:12px;box-shadow:0 2px 7px #0000004d;padding:16px;position:relative}.adyen-checkout-ctp__section .adyen-checkout__fieldset{margin-bottom:24px}.adyen-checkout-ctp__section-title{font-size:16px;font-weight:700;line-height:19px;margin-bottom:4px}.adyen-checkout-ctp__section-subtitle{color:#687282;font-size:13px;font-weight:400;line-height:19px;margin-bottom:16px}.adyen-checkout-ctp__section-header-logo{margin-right:6px;width:24px}.adyen-checkout-ctp__section-header-pipe{height:15px;margin-right:6px}.adyen-checkout-ctp__section-header{align-items:center;display:flex;height:18px;margin-bottom:16px}.adyen-checkout-ctp__section-header-scheme{margin-right:6px;-o-object-fit:none;object-fit:none}.adyen-checkout-ctp__section-header-scheme-mc{width:27px}.adyen-checkout-ctp__section-header-scheme-visa{width:35px}.adyen-checkout-ctp__separator{color:#00112c;font-size:13px;font-weight:400}.adyen-checkout-ctp__loading-loader{margin-bottom:24px;padding-top:58px}.adyen-checkout-ctp__loading-title{font-size:16px;font-weight:700;line-height:19px;margin-bottom:8px;text-align:center}.adyen-checkout-ctp__loading-subtitle{font-size:16px;line-height:19px;margin:0 auto 59px;max-width:300px;text-align:center}.adyen-checkout__field.adyen-checkout__field--shopperLogin{margin-bottom:24px}.adyen-checkout__button-group{background:#0000;display:flex;justify-content:space-between}.adyen-checkout__button-group .adyen-checkout__button{background:#0000;border:0;box-shadow:inset 0 0 0 1px #99a3ad;color:#00112c;font-size:.81em;font-weight:400;height:40px;line-height:40px;margin-right:8px;padding:0;text-align:center}.adyen-checkout__button-group .adyen-checkout__button:last-child{margin-right:0}.adyen-checkout__button-group .adyen-checkout__button:hover{background:#0000;box-shadow:inset 0 0 0 2px #99a3ad}.adyen-checkout__button-group .adyen-checkout__button:active{background:#f7f8f9;box-shadow:inset 0 0 0 2px #99a3ad}.adyen-checkout__button-group .adyen-checkout__button--disabled,.adyen-checkout__button-group .adyen-checkout__button--disabled:hover{cursor:not-allowed;opacity:.4;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__button-group .adyen-checkout__button--selected,.adyen-checkout__button-group .adyen-checkout__button--selected:active,.adyen-checkout__button-group .adyen-checkout__button--selected:active:hover,.adyen-checkout__button-group .adyen-checkout__button--selected:hover{background:#e5efff;box-shadow:inset 0 0 0 2px #0075ff;color:#0075ff;font-weight:500;height:40px;transition:none}.adyen-checkout__button-group .adyen-checkout__button .adyen-checkout__button-group__input{opacity:0;pointer-events:none;position:absolute}.adyen-checkout__adyen-giving .adyen-checkout__status__icon{display:block;margin:56px auto 32px}.adyen-checkout__adyen-giving .adyen-checkout__status__text{color:#00112c;margin-bottom:56px;text-align:center}.adyen-checkout__campaign{background:#00112c;border-radius:6px;height:227px;overflow:hidden;position:relative}.adyen-checkout__campaign-link:hover .adyen-checkout__campaign-description{text-decoration:underline}.adyen-checkout__campaign-container{height:100%}.adyen-checkout__campaign-logo{border:2px solid #fff6;border-radius:3px;display:block;height:48px;margin-bottom:16px;overflow:hidden;width:48px}.adyen-checkout__campaign-background-image{background-color:#00112c;background-position:50%;background-size:cover;height:100%}.adyen-checkout__campaign-link .adyen-checkout__campaign-background-image:before{background:inherit;content:"";height:100%;position:absolute;transition:transform .6s ease-out;width:100%}.adyen-checkout__campaign-link .adyen-checkout__campaign-background-image:hover:before{transform:scale(1.1)}.adyen-checkout__campaign-link .adyen-checkout__campaign-content{pointer-events:none}.adyen-checkout__campaign-content{bottom:0;padding:16px;position:absolute;z-index:2}.adyen-checkout__campaign-description,.adyen-checkout__campaign-title{color:#fff;font-weight:400;margin:0}.adyen-checkout__campaign-title{font-size:1em;margin-bottom:8px}.adyen-checkout__campaign-description{font-size:.81em;line-height:19px}.adyen-checkout__adyen-giving-actions{margin-top:16px}.adyen-checkout__button.adyen-checkout__button--donate{margin:16px auto 8px}.adyen-checkout__button.adyen-checkout__button--decline{display:block;margin:auto;width:auto}.adyen-checkout__paywithgoogle{height:48px}.adyen-checkout__paywithgoogle>div>button,.adyen-checkout__paywithgoogle>div>button.long,.adyen-checkout__paywithgoogle>div>button.short{height:48px;transition:background-color .3s ease-out,box-shadow .3s ease-out}.adyen-checkout__paywithgoogle>div>button.long:focus,.adyen-checkout__paywithgoogle>div>button.short:focus,.adyen-checkout__paywithgoogle>div>button:focus{box-shadow:0 0 0 2px #99c2ff;outline:0}.adyen-checkout__paywithgoogle>div>button.gpay-button{padding:15px 24px 13px}.adyen-checkout__econtext-input__field>.adyen-checkout__button--pay:only-child{margin-top:0}.adyen-checkout__voucher-result{border-radius:12px;box-sizing:border-box;position:relative;text-align:center}.adyen-checkout__voucher-result__bottom,.adyen-checkout__voucher-result__top{background:#fff;border:1px solid #d4d9db}.adyen-checkout__voucher-result__top{border-bottom:0;border-radius:12px 12px 0 0;padding:40px 0 24px}.adyen-checkout__voucher-result__bottom{border-radius:0 0 12px 12px;border-top:0}.adyen-checkout__voucher-result__separator{align-items:center;background:#fff;display:flex;height:13px;margin:0 auto;position:relative;width:calc(100% - 14px)}.adyen-checkout__voucher-result__separator:after,.adyen-checkout__voucher-result__separator:before{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjYSkiPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJtMCAwIDUgMiAxLjUgNEg3VjBIMFptMCAxMyA1LTIgMS41LTRIN3Y2SDBaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTYuNDIzIDYuNUM2LjQyMyAzLjMxMiAzLjc4My43NTYuNS41MThjMy4zODYuMjM2IDYgMi44NTUgNiA1Ljk4MiAwIDMuMTI3LTIuNjE0IDUuNzQ2LTYgNS45ODN2LS4wMDFjMy4yODQtLjIzNyA1LjkyMy0yLjc5NCA1LjkyMy01Ljk4MloiIHN0cm9rZT0iI0Q0RDlEQiIvPjxwYXRoIGZpbGw9IiNENEQ5REIiIGQ9Ik0wIDBoMXYxSDB6bTAgMTJoMXYxSDB6Ii8+PC9nPjxkZWZzPjxjbGlwUGF0aCBpZD0iYSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGg3djEzSDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+)}.adyen-checkout__voucher-result__separator:before{left:-7px}.adyen-checkout__voucher-result__separator:after,.adyen-checkout__voucher-result__separator:before{background-position:100%;background-repeat:no-repeat;content:"";height:13px;position:absolute;top:0;width:7px}.adyen-checkout__voucher-result__separator:after{right:-7px;transform:rotate(-180deg)}.adyen-checkout__voucher-result__separator__inner{border-top:1px solid #e6e9eb;width:100%}.adyen-checkout__voucher-result__image{align-items:center;display:flex;justify-content:center;margin-bottom:40px;width:100%}.adyen-checkout__link--voucher-result-instructions{display:inline-block}.adyen-checkout__voucher-result__image__wrapper{display:block;height:48px;margin:0 24px;position:relative}.adyen-checkout__voucher-result__image__wrapper:after{border:1px solid #001b2b2b;border-radius:3px;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.adyen-checkout__voucher-result__image__wrapper:nth-child(2):before{border-left:1px solid #d4d9db;content:"";height:64px;left:-24.5px;position:absolute;top:-8px;width:1px}.adyen-checkout__voucher-result__image__brand,.adyen-checkout__voucher-result__image__issuer{border-radius:3px;height:48px}.adyen-checkout__voucher-result__introduction{color:#00112c;font-size:.81em;line-height:19px;margin:0 auto;max-width:400px;text-align:center}.adyen-checkout__voucher-result__amount{color:#00112c;font-size:1em;font-weight:700;margin:24px auto 0;text-align:center}.adyen-checkout__voucher-result__surcharge{color:#687282;display:block;font-size:.81em;font-weight:400;line-height:19px;text-align:center}.adyen-checkout__voucher-result__code__label{display:block;font-weight:400;left:0;line-height:19px;margin:0 auto;position:absolute;right:0;top:-2px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto}.adyen-checkout__voucher-result__code__label:before{content:"";position:absolute}.adyen-checkout__voucher-result__code__label__text{background:#fff;color:#00112c;font-size:13px;letter-spacing:normal;line-height:1;padding:0 8px}.adyen-checkout__voucher-result__code__barcode{display:block;height:56px;margin:0 auto 8px;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__voucher-result__code{border-width:1px 0;color:#00112c;display:inline-block;font-size:1.5em;font-weight:700;letter-spacing:1px;line-height:1.2;margin:0 auto;padding:16px 48px;position:relative;text-align:center;-webkit-user-select:all;-moz-user-select:all;user-select:all;width:100%;word-break:break-word}.adyen-checkout__voucher-result__details{list-style:none;margin:-1px auto 0;padding:0}.adyen-checkout__voucher-result__details__item{border-top:1px solid #e6e9eb;color:#00112c;display:flex;font-size:.81em;justify-content:space-between;padding:16px 24px;word-break:break-word}.adyen-checkout__voucher-result__details__item:last-child{margin-bottom:0}.adyen-checkout__voucher-result__details__label{max-width:50%;text-align:left}.adyen-checkout__voucher-result__details__value{font-weight:700;max-width:50%;text-align:right}.adyen-checkout__voucher-result__actions{align-items:center;display:flex;justify-content:center;list-style:none;margin:0 auto 32px;max-width:100%;min-width:200px;padding:0;width:300px}.adyen-checkout__voucher-result__actions__item{margin:0 4px}.adyen-checkout__paypal__buttons{position:relative;z-index:0}.adyen-checkout__paypal__button{display:flex;margin-bottom:16px}.adyen-checkout__paypal__button:empty{display:none}.adyen-checkout__paypal__status--pending{margin:16px 0}.adyen-checkout__paypal__status--processing{align-items:center;display:flex;font-size:13px;justify-content:center;padding:24px 0}.adyen-checkout__payment-method .adyen-checkout__paypal__status--pending{margin:-16px 0 38px}.adyen-checkout__payment-method .adyen-checkout__paypal__status--processing{padding:20px 0 65px}.adyen-checkout__phone-input{direction:ltr}.adyen-checkout__phone-input .adyen-checkout__input-wrapper{width:100%}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__input{height:auto;padding:0}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__input:focus{border:1px solid #0075ff;box-shadow:0 0 0 2px #99c2ff}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button{border:0;border-bottom-right-radius:0;border-top-right-radius:0;height:35px;width:auto}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button:after{box-sizing:revert;height:10px;left:40px}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__input--phoneNumber{border:1px solid #0000;height:35px;margin-left:8px;padding-left:15px}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__input-wrapper--phoneInput{align-items:center;display:flex}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__input-wrapper--phoneInput:focus{border:1px solid #0075ff;box-shadow:0 0 0 2px #99c2ff}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__phoneNumber{align-items:center;display:flex;margin-left:65px;width:100%}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__countryFlag{position:absolute}.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button--active,.adyen-checkout__phone-input .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button--active:hover{box-shadow:none}.adyen-checkout__threeds2__challenge,.adyen-checkout__threeds2__challenge-container{background-color:initial;box-sizing:border-box;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}.adyen-checkout__threeds2__challenge--01,.adyen-checkout__threeds2__challenge--01 .adyen-checkout__iframe--threeDSIframe{height:400px;width:250px}.adyen-checkout__threeds2__challenge--02,.adyen-checkout__threeds2__challenge--02 .adyen-checkout__iframe--threeDSIframe{height:400px;width:390px}.adyen-checkout__threeds2__challenge--03,.adyen-checkout__threeds2__challenge--03 .adyen-checkout__iframe--threeDSIframe{height:600px;width:500px}.adyen-checkout__threeds2__challenge--04,.adyen-checkout__threeds2__challenge--04 .adyen-checkout__iframe--threeDSIframe{height:400px;width:600px}.adyen-checkout__threeds2__challenge--05,.adyen-checkout__threeds2__challenge--05 .adyen-checkout__iframe--threeDSIframe{height:100%;width:100%}.adyen-checkout__iframe--threeDSIframe{border:0;left:0;position:absolute;top:0}.adyen-checkout__threeds2-challenge-error .adyen-checkout__status__icon{display:block;margin:56px auto 32px}.adyen-checkout__threeds2-challenge-error .adyen-checkout__status__text{color:#c12424;margin-bottom:56px;text-align:center}.adyen-checkout__qr-loader{background:#fff;border:1px solid #d4d9db;border-radius:12px;padding:40px;text-align:center}.adyen-checkout__qr-loader--result{padding:100px}.adyen-checkout__qr-loader__brand-logo{border-radius:3px;width:74px}.adyen-checkout__qr-loader__subtitle{margin:32px auto 0;max-width:400px}.adyen-checkout__qr-loader__subtitle--result{margin-bottom:32px}.adyen-checkout__qr-loader__payment_amount,.adyen-checkout__qr-loader__subtitle{color:#00112c;font-size:1em;line-height:19px}.adyen-checkout__qr-loader__icon{height:88px;width:88px}.adyen-checkout__qr-loader__payment_amount{font-weight:700}.adyen-checkout__qr-loader__progress{background:#d4d9db;border-radius:24px;height:4px;margin:32px auto 12px;padding-right:3%;width:152px}[dir=rtl] .adyen-checkout__qr-loader__progress{padding-left:3%;padding-right:0}.adyen-checkout__qr-loader__percentage{background:#0075ff;border-radius:24px;display:block;height:100%}.adyen-checkout__qr-loader__countdown{color:#687282;font-size:.81em}.adyen-checkout__qr-loader>.adyen-checkout__spinner__wrapper{margin:60px 0}.adyen-checkout__qr-loader__app-link{display:none;margin-top:16px}.adyen-checkout__button.adyen-checkout__button--qr-loader{margin-top:24px;text-decoration:none}.adyen-checkout__qr-loader__instructions{color:#687282;font-size:1em;line-height:1.5;margin-top:32px}.adyen-checkout__qr-loader__actions{align-items:center;display:flex;justify-content:center;margin-top:32px}@media only screen and (max-device-width:1200px){.adyen-checkout__qr-loader__app-link{display:block}}.adyen-checkout__voucher-result--boletobancario .adyen-checkout__voucher-result__code,.adyen-checkout__voucher-result--oxxo .adyen-checkout__voucher-result__code{font-size:.81em;line-height:19px;padding:24px;word-break:break-all}.adyen-checkout__alert-message{border-radius:6px;display:flex;font-size:.81em;margin:0 0 16px;padding:12px;text-align:left}.adyen-checkout__alert-message--error{background:#fbe6ed}.adyen-checkout__alert-message--warning{background:#ffeacc}.adyen-checkout__alert-message--info{background:#e5efff}.adyen-checkout__alert-message__icon{height:14px;margin-right:8px;width:14px}.adyen-checkout__giftcard-result__header{align-items:center;display:flex;flex-wrap:nowrap;font-size:1em;font-weight:400;justify-content:space-between;position:relative;width:100%}.adyen-checkout__giftcard-result__header__title{align-items:center;display:flex}.adyen-checkout__giftcard-result__name{margin-left:8px}.adyen-checkout__giftcard-result__balance{list-style:none;margin:16px 0 0;padding:0}.adyen-checkout__giftcard-result__balance__item{display:flex;justify-content:space-between;margin-bottom:8px}.adyen-checkout__giftcard-result__balance__item .adyen-checkout__giftcard-result__balance__title--transactionLimit{color:#687282}.adyen-checkout__giftcard-result__balance__item:last-child{margin-bottom:0}.adyen-checkout__giftcard-result__balance__value--amount{font-weight:700}.adyen-checkout__giftcard-result__remaining-balance{color:#687282;font-size:13px;line-height:19px;margin:8px auto 0;text-align:center}.DropinComponent-module_adyen-checkout__payment-methods-list__mAjAm{list-style:none;margin:0;padding:0}.DropinComponent-module_adyen-checkout__payment-method__nWdwg{display:block;max-height:60px}.DropinComponent-module_adyen-checkout__payment-method__details__-rsW7{display:none}.DropinComponent-module_adyen-checkout__payment-method__image__nB80V{height:26px;width:40px}.DropinComponent-module_adyen-checkout__payment-method__image__wrapper__6NWzA{margin-right:8px}[dir=rtl] .DropinComponent-module_adyen-checkout__payment-method__image__wrapper__6NWzA{margin-left:8px;margin-right:0}.DropinComponent-module_adyen-checkout__payment-method--selected__6egZF{max-height:100%}.DropinComponent-module_adyen-checkout__payment-method--selected__6egZF .DropinComponent-module_adyen-checkout__payment-method__details__-rsW7{display:block}.adyen-checkout__payment-method__disable-confirmation{background:#c12424;border-left:1px solid #b82222;border-right:1px solid #b82222;color:#fff;font-size:.81em;margin:0 -17px;max-height:0;opacity:0;overflow:hidden;transition:opacity .15s ease-out,max-height .15s linear,margin-bottom .1s linear}.adyen-checkout__payment-method__disable-confirmation.adyen-checkout__payment-method__disable-confirmation--open{margin-bottom:16px;max-height:62px;opacity:1}.adyen-checkout__payment-method__disable-confirmation__content{align-items:center;display:flex;justify-content:space-between;padding:8px 16px}.adyen-checkout__payment-method__disable-confirmation__buttons{display:flex}.adyen-checkout__payment-method__disable-confirmation__button{background:#c12424;border:1px solid #0000;border-radius:6px;color:#fff;cursor:pointer;display:block;height:auto;line-height:14px;margin:0 0 0 8px;padding:8px;width:auto}.adyen-checkout__payment-method__disable-confirmation__button:hover,.adyen-checkout__payment-method__disable-confirmation__button:hover:focus{background:#ac2020;box-shadow:none}.adyen-checkout__payment-method__disable-confirmation__button:active,.adyen-checkout__payment-method__disable-confirmation__button:hover:active{background:#961c1c;box-shadow:none}.adyen-checkout__payment-method__disable-confirmation__button--remove,.adyen-checkout__payment-method__disable-confirmation__button--remove:disabled{border-color:#fff}.adyen-checkout__payment-method__disable-confirmation__button--cancel,.adyen-checkout__payment-method__disable-confirmation__button--cancel:disabled{border-color:#0000}.adyen-checkout__payment-method{background:#fff;border:1px solid #e6e9eb;cursor:pointer;margin-top:-1px;position:relative;transition:opacity .3s ease-out;width:100%}.adyen-checkout__payment-method:focus{outline:0}.adyen-checkout__payment-method--selected+.adyen-checkout__payment-method,.adyen-checkout__payment-method:first-child{border-top-left-radius:12px;border-top-right-radius:12px;margin-top:0}.adyen-checkout__payment-method--next-selected,.adyen-checkout__payment-method:last-child{border-bottom-left-radius:12px;border-bottom-right-radius:12px;margin-bottom:0}.adyen-checkout__payment-method--loading{opacity:.2}.adyen-checkout__payment-method--selected.adyen-checkout__payment-method--loading{opacity:.9}.adyen-checkout__payment-method--confirming .adyen-checkout__payment-method__details__content,.adyen-checkout__payment-method--disabling{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__payment-method--disabling{opacity:.3}.adyen-checkout__payment-method__header{align-items:center;color:#00112c;display:flex;flex-wrap:nowrap;font-size:1em;font-weight:400;justify-content:space-between;padding:12px 16px 12px 44px;position:relative;transition:background .1s ease-out;width:100%}[dir=rtl] .adyen-checkout__payment-method__header{padding:12px 44px 12px 12px}.adyen-checkout__payment-method--standalone .adyen-checkout__payment-method__header{padding:16px}.adyen-checkout__payment-method__header__title{align-items:center;background:none;border:none;color:#00112c;cursor:pointer;display:flex;flex-shrink:0;font-size:1em;font-weight:400;margin-right:16px;max-width:100%;padding:4px}[dir=rtl] .adyen-checkout__payment-method__header__title{margin-left:16px;margin-right:0}.adyen-checkout__payment-method__surcharge{color:#687282;margin-left:5px}.adyen-checkout__payment-method--selected{background:#f7f8f9;border:1px solid #e6e9eb;border-radius:12px;cursor:default;margin:8px 0;transition:margin .15s cubic-bezier(.4,0,.2,1) 0ms,opacity .3s ease-out}.adyen-checkout__payment-method--selected .adyen-checkout__payment-method__header{flex-wrap:wrap}.adyen-checkout__payment-method__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.adyen-checkout__payment-method__name--selected{font-weight:500}.adyen-checkout__payment-method__details{padding:0 16px;position:relative}.adyen-checkout__payment-method__details__content{margin:0 0 16px}.adyen-checkout__payment-method__image__wrapper{height:26px;position:relative;width:40px}.adyen-checkout__payment-method__image__wrapper--outline:after{border:1px solid #001b2b2b;border-radius:3px;content:"";height:100%;left:0;position:absolute;top:0;width:100%}.adyen-checkout__payment-method__image{border-radius:3px;display:block}.adyen-checkout__payment-method__brands{display:flex;flex-basis:auto;flex-shrink:1;flex-wrap:wrap;height:16px;margin:4px 0;overflow:hidden;text-align:right}.adyen-checkout__payment-method__brands .adyen-checkout__payment-method__brand-number{color:#99a3ad;font-size:13px}.adyen-checkout__payment-method--selected .adyen-checkout__payment-method__brands{height:auto;overflow:visible;text-align:left}.adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper{display:inline-block;height:16px;margin-right:4px;transition:opacity .2s ease-out;width:24px}.adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper:last-child{margin:0}.adyen-checkout__payment-method--selected .adyen-checkout__payment-method__brands .adyen-checkout__payment-method__image__wrapper{margin-bottom:4px}.adyen-checkout__payment-method__brands img{height:16px;width:24px}.adyen-checkout__payment-method__image__wrapper--disabled{opacity:.25}.adyen-checkout__payment-method__radio{background-color:#fff;border:1px solid #b9c4c9;border-radius:50%;height:16px;left:16px;position:absolute;transition:border-color .2s ease-out,box-shadow .2s ease-out;width:16px}[dir=rtl] .adyen-checkout__payment-method__radio{left:auto;right:16px}.adyen-checkout__payment-method--standalone .adyen-checkout__payment-method__radio{display:none}.adyen-checkout__payment-method__radio:after{background-color:#fff;border-radius:50%;content:"";display:block;height:6px;left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%) scale(0);transition:transform .3s ease-out;width:6px}.adyen-checkout__payment-method:hover:not(.adyen-checkout__payment-method--selected) .adyen-checkout__payment-method__radio{border-color:#99a3ad;box-shadow:0 0 0 2px #d4d9db;cursor:pointer}.adyen-checkout__payment-method__radio--selected{background-color:#0075ff;border:0;transition:all .3s ease-out}.adyen-checkout__payment-method__radio--selected:hover{box-shadow:0 0 0 2px #06f6}.adyen-checkout__payment-method__radio--selected:after{transform:translateY(-50%) scale(1)}.adyen-checkout__order-payment-methods-list{list-style:none;margin:0 auto 16px;padding:0}.adyen-checkout__order-payment-method{background:#fff;border:1px solid #e6e9eb;margin-top:-1px;position:relative;width:100%}.adyen-checkout__order-payment-method:first-child{border-top-left-radius:12px;border-top-right-radius:12px}.adyen-checkout__order-payment-method:last-child{border-bottom-left-radius:12px;border-bottom-right-radius:12px}.adyen-checkout__order-payment-method__header{align-items:center;color:#00112c;display:flex;flex-wrap:nowrap;font-size:1em;font-weight:500;justify-content:space-between;padding:16px;position:relative;transition:background .1s ease-out;width:100%}.adyen-checkout__order-payment-method__header .adyen-checkout__payment-method__header__title{padding:0}.adyen-checkout__order-payment-method__details{padding:0 16px 16px}.adyen-checkout__order-payment-method__deducted-amount{display:flex;font-size:1em;justify-content:space-between;line-height:1em}.adyen-checkout__order-payment-method__deducted-amount__label{font-size:.81em}.adyen-checkout__order-payment-method__deducted-amount__value{font-weight:500}.adyen-checkout__order-remaining-amount{background:#ffeacc;border-radius:6px;color:#7f4a00;display:block;font-size:.81em;margin-bottom:16px;padding:8px 16px;width:100%}.adyen-checkout__order-remaining-amount strong{font-weight:700}.adyen-checkout__status{align-items:center;background-color:#fff;border:1px solid #d4d9db;border-radius:6px;color:#00112c;display:flex;flex-direction:column;font-size:1em;height:350px;justify-content:center;margin:0;padding:32px;text-align:center}.adyen-checkout__status__icon{margin-bottom:24px}.adyen-checkout__status .adyen-checkout__spinner__wrapper{max-height:88px}.adyen-checkout__dropin,.adyen-checkout__dropin *,.adyen-checkout__dropin :after,.adyen-checkout__dropin :before{box-sizing:border-box}.adyen-checkout__payment-methods-list--loading{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.adyen-checkout__instant-payment-methods-list{list-style:none;margin:0;padding:0}.adyen-checkout__instant-payment-methods-list li:not(:last-child){margin-bottom:8px}.adyen-checkout__link{color:#0075ff;text-decoration:none}.adyen-checkout__link:hover{text-decoration:underline}.AchInput-module_sf-input__wrapper__lfdiv{position:relative}.AchInput-module_sf-input__wrapper__lfdiv *,.AchInput-module_sf-input__wrapper__lfdiv :after,.AchInput-module_sf-input__wrapper__lfdiv :before{box-sizing:border-box}.AchInput-module_adyen-checkout__input__8WwCR{display:block;max-height:100px}.adyen-checkout__pm__holderName{margin-bottom:0}.adyen-checkout__fieldset__title+.adyen-checkout__ach-sf__form{margin-top:0}.adyen-checkout__ach-input .adyen-checkout__fieldset--address,.adyen-checkout__ach-sf__form{margin-top:16px}.adyen-checkout__loading-input__form{transition:opacity .25s ease-out}.adyen-checkout-phone-input--new{direction:ltr}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper{width:100%}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout__input{height:auto;padding:0}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout__input:focus-within{border:1px solid #0075ff}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout__input:focus-within .adyen-checkout-dropdown--countrycode-selector{border-right:1px solid #0075ff}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button{border:0;border-bottom-right-radius:0;border-top-right-radius:0;height:35px;width:auto}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button:after{box-sizing:revert;height:10px}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button--active,.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout__dropdown__button--active:hover{box-shadow:none}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout-input--phone-number{border:1px solid #0000;height:35px;line-height:35px;min-height:35px;padding-bottom:0;padding-left:15px;padding-top:0}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout-input--phone-number:focus-within{border:1px solid #0075ff;box-shadow:0 0 0 2px #99c2ff}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout-dropdown--countrycode-selector{border-right:1px solid #dce0e5;min-width:134px;width:134px}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout-input-holder--phone-input{align-items:center;display:flex}.adyen-checkout-phone-input--new .adyen-checkout__input-wrapper .adyen-checkout-phone-number{align-items:center;display:flex;flex:3}.adyen-checkout-phone-input--new .adyen-checkout-phone-input__error-holder{margin-top:-10px}.adyen-checkout__await{background:#fff;border:1px solid #d4d9db;border-radius:12px;padding:40px;text-align:center}.adyen-checkout__await--result{padding:100px}.adyen-checkout__qr-loader--app{border:0;border-radius:0;padding:0}.adyen-checkout__await__brand-logo{border-radius:3px;width:74px}.adyen-checkout__await__indicator-text,.adyen-checkout__await__subtitle{color:#00112c;font-size:1em;line-height:19px;margin-top:32px}.adyen-checkout__await__indicator-holder .adyen-checkout__await__indicator-text{margin-left:10px;margin-top:6px}.adyen-checkout__await__indicator-holder{display:flex;justify-content:center;margin-bottom:20px;margin-top:32px}.adyen-checkout__await__subtitle--result{margin-bottom:32px}.adyen-checkout__await__icon{height:88px;width:88px}.adyen-checkout__await__progress{background:#d4d9db;border-radius:24px;height:4px;margin:32px auto 12px;width:152px}.adyen-checkout__await__percentage{background:#0075ff;border-radius:24px;display:block;height:100%}.adyen-checkout__await__countdown{color:#687282;font-size:.81em}.adyen-checkout__await>.adyen-checkout__spinner__wrapper{margin:60px 0}.adyen-checkout__await__app-link{display:none;margin-top:16px}@media only screen and (max-device-width:1200px){.adyen-checkout__await__app-link{display:block}}.adyen-checkout__blik__helper{color:#00112c;font-size:1em;font-weight:400;margin:0 0 16px;padding:0}.adyen-checkout__bankTransfer__introduction{color:#00112c;font-size:.81em;font-weight:400;margin:0 0 16px;padding:0}.adyen-checkout__bankTransfer__emailField{margin:0 0 16px}.adyen-checkout__bacs--confirm{position:relative}.adyen-checkout__bacs--confirm .adyen-checkout-input__inline-validation--valid{display:none}.adyen-checkout__bacs .adyen-checkout__field--inactive{pointer-events:none}.adyen-checkout__bacs .adyen-checkout__bacs--edit{cursor:pointer;position:absolute;right:0;top:-25px;width:20%}.adyen-checkout__bacs .adyen-checkout__bacs--edit-dropin{top:-50px}.adyen-checkout__bacs .adyen-checkout__bacs--edit .adyen-checkout__bacs--edit-button{background:none;border:none;color:#0075ff;cursor:pointer;text-align:end;text-decoration:underline}.adyen-checkout__voucher-result__introduction{font-size:1em;max-width:420px}.adyen-checkout__klarna-widget{pointer-events:all}.adyen-checkout__field--vpa{margin-bottom:0}.adyen-checkout__segmented-control{background:#fff;border:1px solid #b9c4c9;border-radius:6px;display:flex;gap:4px;justify-content:space-between;padding:4px 5px}.adyen-checkout__segmented-control--disabled{pointer-events:none}.adyen-checkout__segmented-control--disabled>.adyen-checkout__segmented-control-segment{color:#8390a3}.adyen-checkout__segmented-control--disabled>.adyen-checkout__segmented-control-segment--selected{background:#f3f6f9;border:1.5px solid #8390a3}.adyen-checkout__segmented-control-segment{background:#fff;border:0;border-radius:6px;color:#0075ff;cursor:pointer;flex-grow:1;font-weight:500;height:40px;text-align:center;transition:background .3s ease-out;width:100%}.adyen-checkout__segmented-control-segment:not(.adyen-checkout__segmented-control-segment--selected):hover{background-color:#f7f8f9}.adyen-checkout__segmented-control-segment:active{background-color:#f7f8f9;border:1.5px solid #687282}.adyen-checkout__segmented-control-segment--selected{background:#e5f1ff;border:1.5px solid #0075ff;color:#0075ff;font-weight:700}.adyen-checkout_upi-mode-selection-text{font-size:13px;font-weight:400;line-height:19px;margin-bottom:7px;margin-top:0}.adyen-checkout__segmented-control--upi-margin-bottom{margin-bottom:16px}@media (prefers-color-scheme:dark){.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.dark\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KoomiPayClient = exports.createClient = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var config_1 = require("../config");
|
|
6
|
+
var axios_1 = tslib_1.__importDefault(require("axios"));
|
|
7
|
+
function createClient(_a) {
|
|
8
|
+
var apiKey = _a.apiKey, env = _a.env;
|
|
9
|
+
return new KoomiPayClient({ apiKey: apiKey, env: env });
|
|
10
|
+
}
|
|
11
|
+
exports.createClient = createClient;
|
|
12
|
+
var KoomiPayClient = /** @class */ (function () {
|
|
13
|
+
function KoomiPayClient(opts) {
|
|
14
|
+
this.apiKey = opts.apiKey;
|
|
15
|
+
this.env = opts.env;
|
|
16
|
+
this.config = (0, config_1.getConfig)(opts.env);
|
|
17
|
+
}
|
|
18
|
+
KoomiPayClient.prototype.setConfig = function (opts) {
|
|
19
|
+
if ("apiKey" in opts) {
|
|
20
|
+
this.apiKey = opts.apiKey;
|
|
21
|
+
}
|
|
22
|
+
if ("env" in opts) {
|
|
23
|
+
this.env = opts.env;
|
|
24
|
+
this.config = (0, config_1.getConfig)(opts.env);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
KoomiPayClient.prototype.getConfig = function () {
|
|
28
|
+
return this.config;
|
|
29
|
+
};
|
|
30
|
+
KoomiPayClient.prototype.getApiKey = function () {
|
|
31
|
+
return this.apiKey;
|
|
32
|
+
};
|
|
33
|
+
KoomiPayClient.prototype.getEnv = function () {
|
|
34
|
+
return this.env;
|
|
35
|
+
};
|
|
36
|
+
KoomiPayClient.prototype.checkout = function (payload, opts) {
|
|
37
|
+
if (opts === void 0) { opts = {}; }
|
|
38
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
39
|
+
var response, error_1;
|
|
40
|
+
return tslib_1.__generator(this, function (_a) {
|
|
41
|
+
switch (_a.label) {
|
|
42
|
+
case 0:
|
|
43
|
+
if (!!opts) {
|
|
44
|
+
this.setConfig(opts);
|
|
45
|
+
}
|
|
46
|
+
_a.label = 1;
|
|
47
|
+
case 1:
|
|
48
|
+
_a.trys.push([1, 3, , 4]);
|
|
49
|
+
return [4 /*yield*/, axios_1.default.post("".concat(this.config.baseApiUri, "/koomipay/checkout"), payload, {
|
|
50
|
+
headers: {
|
|
51
|
+
"X-API-KEY": this.apiKey,
|
|
52
|
+
},
|
|
53
|
+
})];
|
|
54
|
+
case 2:
|
|
55
|
+
response = _a.sent();
|
|
56
|
+
return [2 /*return*/, response];
|
|
57
|
+
case 3:
|
|
58
|
+
error_1 = _a.sent();
|
|
59
|
+
console.log("[DEBUG] Checkout error", error_1);
|
|
60
|
+
throw new Error("Error when checkout, please check your payload");
|
|
61
|
+
case 4: return [2 /*return*/];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
KoomiPayClient.prototype.instantCheckout = function (payload, opts) {
|
|
67
|
+
if (opts === void 0) { opts = {}; }
|
|
68
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
69
|
+
var response, error_2;
|
|
70
|
+
return tslib_1.__generator(this, function (_a) {
|
|
71
|
+
switch (_a.label) {
|
|
72
|
+
case 0:
|
|
73
|
+
if (!!opts) {
|
|
74
|
+
this.setConfig(opts);
|
|
75
|
+
}
|
|
76
|
+
_a.label = 1;
|
|
77
|
+
case 1:
|
|
78
|
+
_a.trys.push([1, 3, , 4]);
|
|
79
|
+
return [4 /*yield*/, axios_1.default.post("".concat(this.config.baseApiUri, "/koomipay/instant-checkout"), payload, {
|
|
80
|
+
headers: {
|
|
81
|
+
"X-API-KEY": this.apiKey,
|
|
82
|
+
},
|
|
83
|
+
})];
|
|
84
|
+
case 2:
|
|
85
|
+
response = _a.sent();
|
|
86
|
+
return [2 /*return*/, response];
|
|
87
|
+
case 3:
|
|
88
|
+
error_2 = _a.sent();
|
|
89
|
+
console.log("[DEBUG] Instant Checkout error", error_2);
|
|
90
|
+
throw new Error("Error when checkout, please check your payload");
|
|
91
|
+
case 4: return [2 /*return*/];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
return KoomiPayClient;
|
|
97
|
+
}());
|
|
98
|
+
exports.KoomiPayClient = KoomiPayClient;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { KoomiPayClient, CheckoutAmount } from "../../lib/client";
|
|
3
|
+
export type CardPaymentMethodPayload = {
|
|
4
|
+
type: string;
|
|
5
|
+
brand?: string;
|
|
6
|
+
encryptedCardNumber?: string;
|
|
7
|
+
encryptedExpiryMonth?: string;
|
|
8
|
+
encryptedExpiryYear?: string;
|
|
9
|
+
encryptedSecurityCode?: string;
|
|
10
|
+
cardholder?: string;
|
|
11
|
+
};
|
|
12
|
+
export type OnPaymentMethodChangeCallback = (args: CardPaymentMethodPayload) => void;
|
|
13
|
+
export type CheckoutInputFieldProps = {
|
|
14
|
+
field: string;
|
|
15
|
+
focus: boolean;
|
|
16
|
+
valids: any;
|
|
17
|
+
errors: any;
|
|
18
|
+
};
|
|
19
|
+
export type GrabPayComponentProps = {
|
|
20
|
+
client?: KoomiPayClient;
|
|
21
|
+
active: boolean;
|
|
22
|
+
onValid: (isValid: boolean) => void;
|
|
23
|
+
onChange: OnPaymentMethodChangeCallback;
|
|
24
|
+
paymentMethod: any;
|
|
25
|
+
};
|
|
26
|
+
export type CardComponentProps = {
|
|
27
|
+
client: KoomiPayClient;
|
|
28
|
+
active: boolean;
|
|
29
|
+
type: string;
|
|
30
|
+
brands: string[];
|
|
31
|
+
onValid: (isValid: boolean) => void;
|
|
32
|
+
onChange: OnPaymentMethodChangeCallback;
|
|
33
|
+
};
|
|
34
|
+
export type CheckoutPaymentMethodProps = {
|
|
35
|
+
key: string;
|
|
36
|
+
active: boolean;
|
|
37
|
+
onClick: () => void;
|
|
38
|
+
children?: React.ReactNode | undefined;
|
|
39
|
+
};
|
|
40
|
+
export type KoomiPaymentMethod = {
|
|
41
|
+
type: string;
|
|
42
|
+
name: string;
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
};
|
|
45
|
+
export type CheckoutContainerProps = {
|
|
46
|
+
client: KoomiPayClient;
|
|
47
|
+
amount: CheckoutAmount;
|
|
48
|
+
onValid: (args: any) => void;
|
|
49
|
+
onChange: (args: any) => void;
|
|
50
|
+
};
|
|
51
|
+
export declare function CheckoutContainer({ client, amount, onValid, onChange }: CheckoutContainerProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ClientConfiguration = {
|
|
2
|
+
baseApiUri: string;
|
|
3
|
+
assetHost: string;
|
|
4
|
+
clientEnv: string;
|
|
5
|
+
clientKey: string;
|
|
6
|
+
};
|
|
7
|
+
export type ClientConfigurationEnvironment = {
|
|
8
|
+
[key: string]: ClientConfiguration;
|
|
9
|
+
};
|
|
10
|
+
export declare function getConfig(env: string): ClientConfiguration;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type CheckoutPayload = {
|
|
2
|
+
orderID: String;
|
|
3
|
+
returnUrl: String;
|
|
4
|
+
items: CheckoutItem[];
|
|
5
|
+
amount: NonNullable<CheckoutAmount>;
|
|
6
|
+
paymentMethod: object;
|
|
7
|
+
};
|
|
8
|
+
export type CheckoutAmount = {
|
|
9
|
+
currency: NonNullable<string>;
|
|
10
|
+
price: NonNullable<number>;
|
|
11
|
+
};
|
|
12
|
+
export type CheckoutItem = {
|
|
13
|
+
productID: NonNullable<string | number>;
|
|
14
|
+
productName: NonNullable<string>;
|
|
15
|
+
quantity: NonNullable<number>;
|
|
16
|
+
price: NonNullable<number>;
|
|
17
|
+
};
|
|
18
|
+
export declare function createClient({ apiKey, env }: any): KoomiPayClient;
|
|
19
|
+
export declare class KoomiPayClient {
|
|
20
|
+
apiKey: string;
|
|
21
|
+
env: string;
|
|
22
|
+
config: any;
|
|
23
|
+
constructor(opts: any);
|
|
24
|
+
setConfig(opts: any): void;
|
|
25
|
+
getConfig(): any;
|
|
26
|
+
getApiKey(): string;
|
|
27
|
+
getEnv(): string;
|
|
28
|
+
checkout(payload: CheckoutPayload, opts?: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
29
|
+
instantCheckout(payload: CheckoutPayload, opts?: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.classNameObject = exports.classNames = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
function classNames(classNameHash) {
|
|
6
|
+
return Object.entries(classNameHash)
|
|
7
|
+
.map(function (pair, i) { return (pair[1] ? pair[0] : null); })
|
|
8
|
+
.filter(function (x) { return x; })
|
|
9
|
+
.join(' ');
|
|
10
|
+
}
|
|
11
|
+
exports.classNames = classNames;
|
|
12
|
+
function classNameObject(classNameString) {
|
|
13
|
+
if (!classNameString)
|
|
14
|
+
return {};
|
|
15
|
+
return classNameString.split(" ").reduce(function (prev, className) {
|
|
16
|
+
var _a;
|
|
17
|
+
return (tslib_1.__assign(tslib_1.__assign({}, prev), (_a = {}, _a[className] = true, _a)));
|
|
18
|
+
}, {});
|
|
19
|
+
}
|
|
20
|
+
exports.classNameObject = classNameObject;
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@koomipay/react",
|
|
3
|
+
"keywords": [
|
|
4
|
+
"koomi",
|
|
5
|
+
"koomipay",
|
|
6
|
+
"react",
|
|
7
|
+
"checkout",
|
|
8
|
+
"payment",
|
|
9
|
+
"payments",
|
|
10
|
+
"components"
|
|
11
|
+
],
|
|
12
|
+
"version": "1.0.0",
|
|
13
|
+
"description": "Koomipay react components",
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"types": "dist/types",
|
|
16
|
+
"typings": "dist/types",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"require": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./dist/koomipay.css": "./dist/koomipay.css",
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"README",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "npm run clean && npm run prod:build-ts && npm run prod:build-css",
|
|
33
|
+
"clean": "rm -rf ./dist/*",
|
|
34
|
+
"dev": "npm run clean && concurrently \"npm run dev:build-ts\" \"npm run dev:build-css\"",
|
|
35
|
+
"dev:build-css": "tailwind -i ./src/global.css -o ./dist/koomipay.css --postcss ./postcss.config.js",
|
|
36
|
+
"dev:build-ts": "tsc && tsc-alias",
|
|
37
|
+
"prod:build-css": "tailwind -i ./src/global.css -o ./dist/koomipay.css --postcss ./postcss.config.js --minify",
|
|
38
|
+
"prod:build-ts": "tsc && tsc-alias",
|
|
39
|
+
"prepublishOnly": "npm run build",
|
|
40
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
41
|
+
},
|
|
42
|
+
"author": "Novitee Team",
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
45
|
+
"@tailwindcss/container-queries": "^0.1.0",
|
|
46
|
+
"@tailwindcss/forms": "^0.5.3",
|
|
47
|
+
"@tailwindcss/line-clamp": "^0.4.2",
|
|
48
|
+
"@tailwindcss/typography": "^0.5.7",
|
|
49
|
+
"@tsconfig/recommended": "^1.0.1",
|
|
50
|
+
"@types/node": "^18.11.10",
|
|
51
|
+
"@types/react": "^18.0.25",
|
|
52
|
+
"autoprefixer": "^10.4.13",
|
|
53
|
+
"chokidar": "^3.5.3",
|
|
54
|
+
"concurrently": "^7.6.0",
|
|
55
|
+
"debug": "^4.3.4",
|
|
56
|
+
"postcss": "^8.4.19",
|
|
57
|
+
"postcss-import": "^15.0.0",
|
|
58
|
+
"tailwindcss": "^3.2.4",
|
|
59
|
+
"tsc-alias": "^1.8.1",
|
|
60
|
+
"tsconfig-paths": "^4.1.1",
|
|
61
|
+
"typescript": "^4.9.3"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@adyen/adyen-web": "^5.29.0",
|
|
65
|
+
"axios": "^1.2.0",
|
|
66
|
+
"react": "^18.2.0",
|
|
67
|
+
"tslib": "^2.4.1"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@adyen/adyen-web": "^5.29.0",
|
|
71
|
+
"axios": "^1.2.0",
|
|
72
|
+
"react": "^18.2.0"
|
|
73
|
+
}
|
|
74
|
+
}
|