@tap-payments/apple-pay-button 0.0.82-development → 0.0.83-development
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 -21
- package/README.md +240 -240
- package/build/@types/ApplePayButtonProps.d.ts +129 -129
- package/build/@types/ApplePayButtonProps.js +1 -1
- package/build/@types/charge.d.ts +57 -57
- package/build/@types/charge.js +1 -1
- package/build/@types/checkoutProfile.d.ts +216 -195
- package/build/@types/checkoutProfile.js +1 -1
- package/build/@types/enums.d.ts +65 -65
- package/build/@types/enums.js +76 -76
- package/build/@types/index.d.ts +6 -6
- package/build/@types/index.js +6 -6
- package/build/@types/tapLocalisation.d.ts +193 -193
- package/build/@types/tapLocalisation.js +1 -1
- package/build/@types/tapTheme.d.ts +842 -842
- package/build/@types/tapTheme.js +1 -1
- package/build/api.d.ts +29 -29
- package/build/api.js +244 -244
- package/build/constants/index.d.ts +3 -3
- package/build/constants/index.js +3 -3
- package/build/features/ApplePayButton/ApplePayButton.d.ts +4 -4
- package/build/features/ApplePayButton/ApplePayButton.js +49 -49
- package/build/features/ApplePayButton/index.d.ts +3 -3
- package/build/features/ApplePayButton/index.js +2 -2
- package/build/hooks/index.d.ts +1 -1
- package/build/hooks/index.js +1 -1
- package/build/hooks/useApplePay.d.ts +93 -93
- package/build/hooks/useApplePay.js +447 -447
- package/build/hooks/useMerchantApplePay.d.ts +20 -20
- package/build/hooks/useMerchantApplePay.js +176 -176
- package/build/index.d.ts +4 -4
- package/build/index.js +13 -13
- package/build/utils/config.d.ts +14 -14
- package/build/utils/config.js +65 -65
- package/build/utils/defaultValues.d.ts +2 -2
- package/build/utils/defaultValues.js +27 -27
- package/build/utils/html.d.ts +1 -1
- package/build/utils/html.js +9 -9
- package/build/utils/index.d.ts +4 -4
- package/build/utils/index.js +4 -4
- package/build/utils/theme.d.ts +12 -12
- package/build/utils/theme.js +61 -61
- package/package.json +109 -109
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import { CheckoutProfileResponse } from './checkoutProfile';
|
|
2
|
-
import { Locale, ThemeMode, Edges, Scope, MerchantCapabilities, SupportedNetworks, ButtonType, ColorStyle } from './enums';
|
|
3
|
-
export interface ApplePayRequestData {
|
|
4
|
-
countryCode: string;
|
|
5
|
-
currencyCode: string;
|
|
6
|
-
merchantCapabilities: Array<MerchantCapabilities>;
|
|
7
|
-
supportedNetworks: Array<SupportedNetworks>;
|
|
8
|
-
billingContact?: {
|
|
9
|
-
phoneNumber?: string;
|
|
10
|
-
emailAddress?: string;
|
|
11
|
-
givenName: string;
|
|
12
|
-
familyName: string;
|
|
13
|
-
};
|
|
14
|
-
total: {
|
|
15
|
-
label: string;
|
|
16
|
-
amount: number;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export interface ApplePayDataToLunchSDKFromMerchantSide {
|
|
20
|
-
headers: Record<string, any>;
|
|
21
|
-
BASE_URL: string;
|
|
22
|
-
merchant: Record<string, string>;
|
|
23
|
-
applePayRequestData: ApplePayRequestData;
|
|
24
|
-
debug?: boolean;
|
|
25
|
-
applePaySDKVersion?: number;
|
|
26
|
-
}
|
|
27
|
-
export interface Interface {
|
|
28
|
-
locale?: Locale;
|
|
29
|
-
theme?: ThemeMode;
|
|
30
|
-
edges?: Edges;
|
|
31
|
-
type?: ButtonType;
|
|
32
|
-
colorStyle?: ColorStyle;
|
|
33
|
-
loader?: boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface Customer {
|
|
36
|
-
id?: string;
|
|
37
|
-
name?: {
|
|
38
|
-
lang: Locale;
|
|
39
|
-
first: string;
|
|
40
|
-
last: string;
|
|
41
|
-
middle?: string;
|
|
42
|
-
}[];
|
|
43
|
-
contact?: {
|
|
44
|
-
email?: string;
|
|
45
|
-
phone?: {
|
|
46
|
-
countryCode: string;
|
|
47
|
-
number: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export interface Acceptance {
|
|
52
|
-
supportedSchemes?: Array<SupportedNetworks>;
|
|
53
|
-
supportedFundSource?: string[];
|
|
54
|
-
supportedPaymentAuthentications?: string[];
|
|
55
|
-
}
|
|
56
|
-
export interface ApplePayButtonProps {
|
|
57
|
-
operator: {
|
|
58
|
-
publicKey: string;
|
|
59
|
-
hashstring?: string;
|
|
60
|
-
};
|
|
61
|
-
merchant: {
|
|
62
|
-
id: string;
|
|
63
|
-
identifier?: string;
|
|
64
|
-
};
|
|
65
|
-
scope: Scope;
|
|
66
|
-
interface?: Interface;
|
|
67
|
-
customer?: Customer;
|
|
68
|
-
acceptance?: Acceptance;
|
|
69
|
-
transaction?: {
|
|
70
|
-
authentication?: boolean;
|
|
71
|
-
authorize?: {
|
|
72
|
-
auto: {
|
|
73
|
-
type: string;
|
|
74
|
-
time: number;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
metadata?: Record<string, string>;
|
|
78
|
-
reference?: string;
|
|
79
|
-
paymentAgreement?: {
|
|
80
|
-
id: string;
|
|
81
|
-
contract?: {
|
|
82
|
-
id: string;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
destinations?: Record<string, any>;
|
|
86
|
-
};
|
|
87
|
-
invoice?: {
|
|
88
|
-
id: string;
|
|
89
|
-
};
|
|
90
|
-
order: {
|
|
91
|
-
amount: number;
|
|
92
|
-
currency: string;
|
|
93
|
-
id?: string;
|
|
94
|
-
description?: string;
|
|
95
|
-
metadata?: Record<string, string>;
|
|
96
|
-
reference?: string;
|
|
97
|
-
};
|
|
98
|
-
post?: {
|
|
99
|
-
url: string;
|
|
100
|
-
};
|
|
101
|
-
redirect?: {
|
|
102
|
-
url: string;
|
|
103
|
-
};
|
|
104
|
-
onOrderCreated?: (orderId: string) => void;
|
|
105
|
-
onCancel?: () => void;
|
|
106
|
-
onError?: (error: any) => void;
|
|
107
|
-
onSuccess?: (data: Record<string, any>) => Promise<void>;
|
|
108
|
-
onClick?: (data?: ApplePayDataToLunchSDKFromMerchantSide) => void;
|
|
109
|
-
onReady?: () => void;
|
|
110
|
-
metaData?: MetaData;
|
|
111
|
-
debug?: boolean;
|
|
112
|
-
integration?: 'sdk' | 'iframe';
|
|
113
|
-
headers?: {
|
|
114
|
-
mdn: string;
|
|
115
|
-
application: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
export interface MerchantResponse {
|
|
119
|
-
id: string;
|
|
120
|
-
name: string;
|
|
121
|
-
country_code: string;
|
|
122
|
-
session_token: string;
|
|
123
|
-
[other: string]: string;
|
|
124
|
-
}
|
|
125
|
-
export interface MetaData {
|
|
126
|
-
merchant: MerchantResponse;
|
|
127
|
-
payment_options: CheckoutProfileResponse['payment_options'];
|
|
128
|
-
headers: Record<string, string>;
|
|
129
|
-
}
|
|
1
|
+
import { CheckoutProfileResponse } from './checkoutProfile';
|
|
2
|
+
import { Locale, ThemeMode, Edges, Scope, MerchantCapabilities, SupportedNetworks, ButtonType, ColorStyle } from './enums';
|
|
3
|
+
export interface ApplePayRequestData {
|
|
4
|
+
countryCode: string;
|
|
5
|
+
currencyCode: string;
|
|
6
|
+
merchantCapabilities: Array<MerchantCapabilities>;
|
|
7
|
+
supportedNetworks: Array<SupportedNetworks>;
|
|
8
|
+
billingContact?: {
|
|
9
|
+
phoneNumber?: string;
|
|
10
|
+
emailAddress?: string;
|
|
11
|
+
givenName: string;
|
|
12
|
+
familyName: string;
|
|
13
|
+
};
|
|
14
|
+
total: {
|
|
15
|
+
label: string;
|
|
16
|
+
amount: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface ApplePayDataToLunchSDKFromMerchantSide {
|
|
20
|
+
headers: Record<string, any>;
|
|
21
|
+
BASE_URL: string;
|
|
22
|
+
merchant: Record<string, string>;
|
|
23
|
+
applePayRequestData: ApplePayRequestData;
|
|
24
|
+
debug?: boolean;
|
|
25
|
+
applePaySDKVersion?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface Interface {
|
|
28
|
+
locale?: Locale;
|
|
29
|
+
theme?: ThemeMode;
|
|
30
|
+
edges?: Edges;
|
|
31
|
+
type?: ButtonType;
|
|
32
|
+
colorStyle?: ColorStyle;
|
|
33
|
+
loader?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface Customer {
|
|
36
|
+
id?: string;
|
|
37
|
+
name?: {
|
|
38
|
+
lang: Locale;
|
|
39
|
+
first: string;
|
|
40
|
+
last: string;
|
|
41
|
+
middle?: string;
|
|
42
|
+
}[];
|
|
43
|
+
contact?: {
|
|
44
|
+
email?: string;
|
|
45
|
+
phone?: {
|
|
46
|
+
countryCode: string;
|
|
47
|
+
number: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface Acceptance {
|
|
52
|
+
supportedSchemes?: Array<SupportedNetworks>;
|
|
53
|
+
supportedFundSource?: string[];
|
|
54
|
+
supportedPaymentAuthentications?: string[];
|
|
55
|
+
}
|
|
56
|
+
export interface ApplePayButtonProps {
|
|
57
|
+
operator: {
|
|
58
|
+
publicKey: string;
|
|
59
|
+
hashstring?: string;
|
|
60
|
+
};
|
|
61
|
+
merchant: {
|
|
62
|
+
id: string;
|
|
63
|
+
identifier?: string;
|
|
64
|
+
};
|
|
65
|
+
scope: Scope;
|
|
66
|
+
interface?: Interface;
|
|
67
|
+
customer?: Customer;
|
|
68
|
+
acceptance?: Acceptance;
|
|
69
|
+
transaction?: {
|
|
70
|
+
authentication?: boolean;
|
|
71
|
+
authorize?: {
|
|
72
|
+
auto: {
|
|
73
|
+
type: string;
|
|
74
|
+
time: number;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
metadata?: Record<string, string>;
|
|
78
|
+
reference?: string;
|
|
79
|
+
paymentAgreement?: {
|
|
80
|
+
id: string;
|
|
81
|
+
contract?: {
|
|
82
|
+
id: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
destinations?: Record<string, any>;
|
|
86
|
+
};
|
|
87
|
+
invoice?: {
|
|
88
|
+
id: string;
|
|
89
|
+
};
|
|
90
|
+
order: {
|
|
91
|
+
amount: number;
|
|
92
|
+
currency: string;
|
|
93
|
+
id?: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
metadata?: Record<string, string>;
|
|
96
|
+
reference?: string;
|
|
97
|
+
};
|
|
98
|
+
post?: {
|
|
99
|
+
url: string;
|
|
100
|
+
};
|
|
101
|
+
redirect?: {
|
|
102
|
+
url: string;
|
|
103
|
+
};
|
|
104
|
+
onOrderCreated?: (orderId: string) => void;
|
|
105
|
+
onCancel?: () => void;
|
|
106
|
+
onError?: (error: any) => void;
|
|
107
|
+
onSuccess?: (data: Record<string, any>) => Promise<void>;
|
|
108
|
+
onClick?: (data?: ApplePayDataToLunchSDKFromMerchantSide) => void;
|
|
109
|
+
onReady?: () => void;
|
|
110
|
+
metaData?: MetaData;
|
|
111
|
+
debug?: boolean;
|
|
112
|
+
integration?: 'sdk' | 'iframe';
|
|
113
|
+
headers?: {
|
|
114
|
+
mdn: string;
|
|
115
|
+
application: string;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export interface MerchantResponse {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
country_code: string;
|
|
122
|
+
session_token: string;
|
|
123
|
+
[other: string]: string;
|
|
124
|
+
}
|
|
125
|
+
export interface MetaData {
|
|
126
|
+
merchant: MerchantResponse;
|
|
127
|
+
payment_options: CheckoutProfileResponse['payment_options'];
|
|
128
|
+
headers: Record<string, string>;
|
|
129
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/build/@types/charge.d.ts
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
export interface ChargeRequestBody {
|
|
2
|
-
source: {
|
|
3
|
-
id: string;
|
|
4
|
-
};
|
|
5
|
-
ipaddress?: string;
|
|
6
|
-
amount: number;
|
|
7
|
-
currency: string;
|
|
8
|
-
selected_amount?: number;
|
|
9
|
-
selected_currency?: string;
|
|
10
|
-
product: string;
|
|
11
|
-
threeDSecure?: boolean;
|
|
12
|
-
save_card: boolean;
|
|
13
|
-
fee: number;
|
|
14
|
-
customer: {
|
|
15
|
-
id?: string;
|
|
16
|
-
first_name?: string;
|
|
17
|
-
middle_name?: string;
|
|
18
|
-
last_name?: string;
|
|
19
|
-
email?: string;
|
|
20
|
-
phone?: {
|
|
21
|
-
country_code: string;
|
|
22
|
-
number: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
hashstring?: string;
|
|
26
|
-
metadata?: Record<string, string>;
|
|
27
|
-
post?: {
|
|
28
|
-
url: string;
|
|
29
|
-
};
|
|
30
|
-
redirect?: {
|
|
31
|
-
url: string;
|
|
32
|
-
};
|
|
33
|
-
merchant?: {
|
|
34
|
-
id: string;
|
|
35
|
-
};
|
|
36
|
-
order?: {
|
|
37
|
-
id: string;
|
|
38
|
-
};
|
|
39
|
-
payment_agreement?: {
|
|
40
|
-
id: string;
|
|
41
|
-
contract?: {
|
|
42
|
-
id: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
destinations?: Record<string, any>;
|
|
46
|
-
reference?: {
|
|
47
|
-
order?: string;
|
|
48
|
-
transaction?: string;
|
|
49
|
-
};
|
|
50
|
-
description?: string;
|
|
51
|
-
}
|
|
52
|
-
export interface AuthorizeRequestBody extends ChargeRequestBody {
|
|
53
|
-
auto?: {
|
|
54
|
-
type: string;
|
|
55
|
-
time: number;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
1
|
+
export interface ChargeRequestBody {
|
|
2
|
+
source: {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
ipaddress?: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
currency: string;
|
|
8
|
+
selected_amount?: number;
|
|
9
|
+
selected_currency?: string;
|
|
10
|
+
product: string;
|
|
11
|
+
threeDSecure?: boolean;
|
|
12
|
+
save_card: boolean;
|
|
13
|
+
fee: number;
|
|
14
|
+
customer: {
|
|
15
|
+
id?: string;
|
|
16
|
+
first_name?: string;
|
|
17
|
+
middle_name?: string;
|
|
18
|
+
last_name?: string;
|
|
19
|
+
email?: string;
|
|
20
|
+
phone?: {
|
|
21
|
+
country_code: string;
|
|
22
|
+
number: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
hashstring?: string;
|
|
26
|
+
metadata?: Record<string, string>;
|
|
27
|
+
post?: {
|
|
28
|
+
url: string;
|
|
29
|
+
};
|
|
30
|
+
redirect?: {
|
|
31
|
+
url: string;
|
|
32
|
+
};
|
|
33
|
+
merchant?: {
|
|
34
|
+
id: string;
|
|
35
|
+
};
|
|
36
|
+
order?: {
|
|
37
|
+
id: string;
|
|
38
|
+
};
|
|
39
|
+
payment_agreement?: {
|
|
40
|
+
id: string;
|
|
41
|
+
contract?: {
|
|
42
|
+
id: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
destinations?: Record<string, any>;
|
|
46
|
+
reference?: {
|
|
47
|
+
order?: string;
|
|
48
|
+
transaction?: string;
|
|
49
|
+
};
|
|
50
|
+
description?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface AuthorizeRequestBody extends ChargeRequestBody {
|
|
53
|
+
auto?: {
|
|
54
|
+
type: string;
|
|
55
|
+
time: number;
|
|
56
|
+
};
|
|
57
|
+
}
|
package/build/@types/charge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|