@spot-flow/checkout-inline-js 0.1.49-dev.1 → 0.1.49-dev.3
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/README.md +78 -78
- package/dist/api.d.ts +37 -37
- package/dist/checkout-class.d.ts +44 -44
- package/dist/checkout-inline.es.js +38467 -38029
- package/dist/checkout-inline.js +2118 -2081
- package/dist/constants.d.ts +112 -105
- package/dist/contexts/translate-context.d.ts +17 -15
- package/dist/data/countryStateCode.json.d.ts +22016 -22016
- package/dist/data.d.ts +27 -27
- package/dist/index.css +1 -1
- package/dist/modules/Card.d.ts +98 -98
- package/dist/modules/EFT.d.ts +65 -65
- package/dist/modules/MobileMoney.d.ts +85 -85
- package/dist/modules/Opay.d.ts +68 -0
- package/dist/modules/Transfer.d.ts +76 -76
- package/dist/types/types.d.ts +219 -219
- package/dist/types.d.ts +32 -32
- package/dist/utils/encryption.d.ts +8 -8
- package/dist/utils/get-browser-details.d.ts +11 -11
- package/dist/utils/get-currency.d.ts +1 -1
- package/dist/utils/get-region-details.d.ts +4 -4
- package/dist/utils.d.ts +26 -26
- package/dist/views/card/avs-validation.d.ts +27 -27
- package/dist/views/card/isw-3ds-form.d.ts +21 -21
- package/dist/views/opay/opay-authenticate.d.ts +22 -0
- package/dist/views/shared/main-footer.d.ts +24 -24
- package/dist/views/shared/main-header.d.ts +37 -37
- package/dist/views/shared/main-page.d.ts +103 -101
- package/dist/views/shared/shared-error-page.d.ts +6 -6
- package/dist/views/shared/test-card.d.ts +17 -17
- package/package.json +64 -64
package/dist/types/types.d.ts
CHANGED
|
@@ -1,219 +1,219 @@
|
|
|
1
|
-
import { CustomerDetails } from '../types';
|
|
2
|
-
|
|
3
|
-
export type Prettify<T> = {
|
|
4
|
-
[K in keyof T]: T[K];
|
|
5
|
-
} & {};
|
|
6
|
-
export type CardDetailValueType = {
|
|
7
|
-
pan: string;
|
|
8
|
-
cvv: string;
|
|
9
|
-
expiryMonth: string;
|
|
10
|
-
expiryYear: string;
|
|
11
|
-
cardHolderName?: string;
|
|
12
|
-
};
|
|
13
|
-
export type PaymentRequestPayload = {
|
|
14
|
-
amount: number;
|
|
15
|
-
channel?: string;
|
|
16
|
-
currency: string;
|
|
17
|
-
localCurrency?: string;
|
|
18
|
-
customer: CustomerDetails;
|
|
19
|
-
reference: string;
|
|
20
|
-
planId?: string;
|
|
21
|
-
callBackUrl?: string;
|
|
22
|
-
metadata?: Record<string, unknown>;
|
|
23
|
-
isCheckout: boolean;
|
|
24
|
-
taxQuoteId?: string;
|
|
25
|
-
countryCode?: string;
|
|
26
|
-
};
|
|
27
|
-
export type CardDetails = {
|
|
28
|
-
pan: string;
|
|
29
|
-
cvv: string;
|
|
30
|
-
expiryMonth: string;
|
|
31
|
-
expiryYear: string;
|
|
32
|
-
};
|
|
33
|
-
export type CardPaymentRequestPayload = Prettify<PaymentRequestPayload & {
|
|
34
|
-
card?: CardDetails;
|
|
35
|
-
encryptedCard: string;
|
|
36
|
-
}>;
|
|
37
|
-
export type UssdPaymentRequestPayload = Prettify<PaymentRequestPayload & {
|
|
38
|
-
bank: Partial<{
|
|
39
|
-
code: string;
|
|
40
|
-
name: string;
|
|
41
|
-
}>;
|
|
42
|
-
}>;
|
|
43
|
-
export type MobileMoneyPaymentRequestPayload = Prettify<PaymentRequestPayload & {
|
|
44
|
-
mobileMoney: Partial<{
|
|
45
|
-
code: string;
|
|
46
|
-
name: string;
|
|
47
|
-
phoneNumber: string;
|
|
48
|
-
otp?: string;
|
|
49
|
-
}>;
|
|
50
|
-
}>;
|
|
51
|
-
export type AuthorizeCardPaymentRequestPayload = {
|
|
52
|
-
authorization: {
|
|
53
|
-
pin?: string;
|
|
54
|
-
otp?: string;
|
|
55
|
-
phoneNumber?: string;
|
|
56
|
-
avs?: {
|
|
57
|
-
state: string;
|
|
58
|
-
city: string;
|
|
59
|
-
country: string;
|
|
60
|
-
address: string;
|
|
61
|
-
zipCode: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
reference: string;
|
|
65
|
-
};
|
|
66
|
-
export type ValidateCardPaymentRequestPayload = {
|
|
67
|
-
authorization: {
|
|
68
|
-
otp?: string;
|
|
69
|
-
phoneNumber?: string;
|
|
70
|
-
pin?: string;
|
|
71
|
-
avs?: {
|
|
72
|
-
state: string;
|
|
73
|
-
city: string;
|
|
74
|
-
country: string;
|
|
75
|
-
address: string;
|
|
76
|
-
zipCode: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
reference: string;
|
|
80
|
-
};
|
|
81
|
-
export type PaymentResponseData = {
|
|
82
|
-
id: string;
|
|
83
|
-
reference: string;
|
|
84
|
-
callBackUrl?: string;
|
|
85
|
-
spotflowReference: string;
|
|
86
|
-
amount: number;
|
|
87
|
-
currency: string;
|
|
88
|
-
channel: string;
|
|
89
|
-
status: string;
|
|
90
|
-
bankDetails?: BankDetails;
|
|
91
|
-
customer: Customer;
|
|
92
|
-
provider: string;
|
|
93
|
-
providerMessage: string;
|
|
94
|
-
authorization: Authorization;
|
|
95
|
-
createdAt: Date;
|
|
96
|
-
localAmount: number;
|
|
97
|
-
localCurrency: string;
|
|
98
|
-
rate: number;
|
|
99
|
-
region: string;
|
|
100
|
-
card: {
|
|
101
|
-
type: string;
|
|
102
|
-
firstSix: string;
|
|
103
|
-
lastFour: string;
|
|
104
|
-
};
|
|
105
|
-
ussd: {
|
|
106
|
-
code: string;
|
|
107
|
-
paymentCode: string;
|
|
108
|
-
};
|
|
109
|
-
totalLocalAmount?: number;
|
|
110
|
-
totalTaxAmount?: number;
|
|
111
|
-
};
|
|
112
|
-
export interface Authorization {
|
|
113
|
-
mode: string;
|
|
114
|
-
redirectUrl?: string | null;
|
|
115
|
-
embeddedHtml?: string | null;
|
|
116
|
-
jwt?: string | null;
|
|
117
|
-
md?: string | null;
|
|
118
|
-
acsUrl?: string | null;
|
|
119
|
-
}
|
|
120
|
-
export interface BankDetails {
|
|
121
|
-
accountName: string;
|
|
122
|
-
accountNumber: string;
|
|
123
|
-
bankName: string;
|
|
124
|
-
}
|
|
125
|
-
export interface Customer {
|
|
126
|
-
id: string;
|
|
127
|
-
name: string;
|
|
128
|
-
email: string;
|
|
129
|
-
phoneNumber: string;
|
|
130
|
-
}
|
|
131
|
-
export type GetPaymentRateParams = {
|
|
132
|
-
to: string;
|
|
133
|
-
from: string;
|
|
134
|
-
};
|
|
135
|
-
export interface Rate {
|
|
136
|
-
from: string;
|
|
137
|
-
to: string;
|
|
138
|
-
rate: number;
|
|
139
|
-
}
|
|
140
|
-
export type BankOption = {
|
|
141
|
-
name: string;
|
|
142
|
-
code: string;
|
|
143
|
-
};
|
|
144
|
-
export type PlanDetailResponseData = {
|
|
145
|
-
id: string;
|
|
146
|
-
title: string;
|
|
147
|
-
frequency: "MONTHLY" | "Daily" | "YEARLY" | "WEEKLY";
|
|
148
|
-
internalReference: string;
|
|
149
|
-
status: "active" | "inactive";
|
|
150
|
-
createdAt: Date;
|
|
151
|
-
regions: string;
|
|
152
|
-
pricingOptions: Array<{
|
|
153
|
-
amount: number;
|
|
154
|
-
currency: string;
|
|
155
|
-
}>;
|
|
156
|
-
subscribers: number;
|
|
157
|
-
subscriptions: number;
|
|
158
|
-
};
|
|
159
|
-
export type GetMerchantPlanDetail = {
|
|
160
|
-
merchantName: string;
|
|
161
|
-
merchantLogo: string;
|
|
162
|
-
paymentMethods: Array<PaymentChannel>;
|
|
163
|
-
rate: {
|
|
164
|
-
from: string;
|
|
165
|
-
to: string;
|
|
166
|
-
rate: number;
|
|
167
|
-
};
|
|
168
|
-
plan: PlanDetailResponseData;
|
|
169
|
-
limits: Array<{
|
|
170
|
-
channel: PaymentChannel;
|
|
171
|
-
amount: number;
|
|
172
|
-
}>;
|
|
173
|
-
taxEnabled: boolean;
|
|
174
|
-
};
|
|
175
|
-
export type GetBanksRequestParams = {
|
|
176
|
-
ussd: boolean;
|
|
177
|
-
};
|
|
178
|
-
export type GetBanksResponse = Array<{
|
|
179
|
-
code: string;
|
|
180
|
-
name: string;
|
|
181
|
-
}>;
|
|
182
|
-
export type GetMobileMoneyResponse = Array<{
|
|
183
|
-
code: string;
|
|
184
|
-
name: string;
|
|
185
|
-
phoneNumber: string;
|
|
186
|
-
}>;
|
|
187
|
-
export type CreateDisputeRequest = {
|
|
188
|
-
transactionReference: string;
|
|
189
|
-
reportingReason: string;
|
|
190
|
-
disputeType?: string;
|
|
191
|
-
disputeSource: string;
|
|
192
|
-
supportingDocuments: string[];
|
|
193
|
-
};
|
|
194
|
-
export type RetryPaymentPayload = {
|
|
195
|
-
reference: string;
|
|
196
|
-
channel: string;
|
|
197
|
-
encryptedCard?: string;
|
|
198
|
-
mobileMoney?: {
|
|
199
|
-
code: string;
|
|
200
|
-
phoneNumber: string;
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
export type PusherResponse = {
|
|
204
|
-
amount: string;
|
|
205
|
-
currency: string;
|
|
206
|
-
redirectUrl: string;
|
|
207
|
-
reference: string;
|
|
208
|
-
spotflowReference: string;
|
|
209
|
-
status: string;
|
|
210
|
-
};
|
|
211
|
-
export type PaymentChannel = "card" | "bank_transfer" | "ussd" | "mobile_money" | "eft";
|
|
212
|
-
export type TaxQuoteResponse = {
|
|
213
|
-
id: string;
|
|
214
|
-
totalAmount: number;
|
|
215
|
-
};
|
|
216
|
-
export type GetMerchantDetailsTax = GetMerchantPlanDetail & {
|
|
217
|
-
totalAmount?: number;
|
|
218
|
-
taxQuoteId?: string;
|
|
219
|
-
};
|
|
1
|
+
import { CustomerDetails } from '../types';
|
|
2
|
+
|
|
3
|
+
export type Prettify<T> = {
|
|
4
|
+
[K in keyof T]: T[K];
|
|
5
|
+
} & {};
|
|
6
|
+
export type CardDetailValueType = {
|
|
7
|
+
pan: string;
|
|
8
|
+
cvv: string;
|
|
9
|
+
expiryMonth: string;
|
|
10
|
+
expiryYear: string;
|
|
11
|
+
cardHolderName?: string;
|
|
12
|
+
};
|
|
13
|
+
export type PaymentRequestPayload = {
|
|
14
|
+
amount: number;
|
|
15
|
+
channel?: string;
|
|
16
|
+
currency: string;
|
|
17
|
+
localCurrency?: string;
|
|
18
|
+
customer: CustomerDetails;
|
|
19
|
+
reference: string;
|
|
20
|
+
planId?: string;
|
|
21
|
+
callBackUrl?: string;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
isCheckout: boolean;
|
|
24
|
+
taxQuoteId?: string;
|
|
25
|
+
countryCode?: string;
|
|
26
|
+
};
|
|
27
|
+
export type CardDetails = {
|
|
28
|
+
pan: string;
|
|
29
|
+
cvv: string;
|
|
30
|
+
expiryMonth: string;
|
|
31
|
+
expiryYear: string;
|
|
32
|
+
};
|
|
33
|
+
export type CardPaymentRequestPayload = Prettify<PaymentRequestPayload & {
|
|
34
|
+
card?: CardDetails;
|
|
35
|
+
encryptedCard: string;
|
|
36
|
+
}>;
|
|
37
|
+
export type UssdPaymentRequestPayload = Prettify<PaymentRequestPayload & {
|
|
38
|
+
bank: Partial<{
|
|
39
|
+
code: string;
|
|
40
|
+
name: string;
|
|
41
|
+
}>;
|
|
42
|
+
}>;
|
|
43
|
+
export type MobileMoneyPaymentRequestPayload = Prettify<PaymentRequestPayload & {
|
|
44
|
+
mobileMoney: Partial<{
|
|
45
|
+
code: string;
|
|
46
|
+
name: string;
|
|
47
|
+
phoneNumber: string;
|
|
48
|
+
otp?: string;
|
|
49
|
+
}>;
|
|
50
|
+
}>;
|
|
51
|
+
export type AuthorizeCardPaymentRequestPayload = {
|
|
52
|
+
authorization: {
|
|
53
|
+
pin?: string;
|
|
54
|
+
otp?: string;
|
|
55
|
+
phoneNumber?: string;
|
|
56
|
+
avs?: {
|
|
57
|
+
state: string;
|
|
58
|
+
city: string;
|
|
59
|
+
country: string;
|
|
60
|
+
address: string;
|
|
61
|
+
zipCode: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
reference: string;
|
|
65
|
+
};
|
|
66
|
+
export type ValidateCardPaymentRequestPayload = {
|
|
67
|
+
authorization: {
|
|
68
|
+
otp?: string;
|
|
69
|
+
phoneNumber?: string;
|
|
70
|
+
pin?: string;
|
|
71
|
+
avs?: {
|
|
72
|
+
state: string;
|
|
73
|
+
city: string;
|
|
74
|
+
country: string;
|
|
75
|
+
address: string;
|
|
76
|
+
zipCode: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
reference: string;
|
|
80
|
+
};
|
|
81
|
+
export type PaymentResponseData = {
|
|
82
|
+
id: string;
|
|
83
|
+
reference: string;
|
|
84
|
+
callBackUrl?: string;
|
|
85
|
+
spotflowReference: string;
|
|
86
|
+
amount: number;
|
|
87
|
+
currency: string;
|
|
88
|
+
channel: string;
|
|
89
|
+
status: string;
|
|
90
|
+
bankDetails?: BankDetails;
|
|
91
|
+
customer: Customer;
|
|
92
|
+
provider: string;
|
|
93
|
+
providerMessage: string;
|
|
94
|
+
authorization: Authorization;
|
|
95
|
+
createdAt: Date;
|
|
96
|
+
localAmount: number;
|
|
97
|
+
localCurrency: string;
|
|
98
|
+
rate: number;
|
|
99
|
+
region: string;
|
|
100
|
+
card: {
|
|
101
|
+
type: string;
|
|
102
|
+
firstSix: string;
|
|
103
|
+
lastFour: string;
|
|
104
|
+
};
|
|
105
|
+
ussd: {
|
|
106
|
+
code: string;
|
|
107
|
+
paymentCode: string;
|
|
108
|
+
};
|
|
109
|
+
totalLocalAmount?: number;
|
|
110
|
+
totalTaxAmount?: number;
|
|
111
|
+
};
|
|
112
|
+
export interface Authorization {
|
|
113
|
+
mode: string;
|
|
114
|
+
redirectUrl?: string | null;
|
|
115
|
+
embeddedHtml?: string | null;
|
|
116
|
+
jwt?: string | null;
|
|
117
|
+
md?: string | null;
|
|
118
|
+
acsUrl?: string | null;
|
|
119
|
+
}
|
|
120
|
+
export interface BankDetails {
|
|
121
|
+
accountName: string;
|
|
122
|
+
accountNumber: string;
|
|
123
|
+
bankName: string;
|
|
124
|
+
}
|
|
125
|
+
export interface Customer {
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
email: string;
|
|
129
|
+
phoneNumber: string;
|
|
130
|
+
}
|
|
131
|
+
export type GetPaymentRateParams = {
|
|
132
|
+
to: string;
|
|
133
|
+
from: string;
|
|
134
|
+
};
|
|
135
|
+
export interface Rate {
|
|
136
|
+
from: string;
|
|
137
|
+
to: string;
|
|
138
|
+
rate: number;
|
|
139
|
+
}
|
|
140
|
+
export type BankOption = {
|
|
141
|
+
name: string;
|
|
142
|
+
code: string;
|
|
143
|
+
};
|
|
144
|
+
export type PlanDetailResponseData = {
|
|
145
|
+
id: string;
|
|
146
|
+
title: string;
|
|
147
|
+
frequency: "MONTHLY" | "Daily" | "YEARLY" | "WEEKLY";
|
|
148
|
+
internalReference: string;
|
|
149
|
+
status: "active" | "inactive";
|
|
150
|
+
createdAt: Date;
|
|
151
|
+
regions: string;
|
|
152
|
+
pricingOptions: Array<{
|
|
153
|
+
amount: number;
|
|
154
|
+
currency: string;
|
|
155
|
+
}>;
|
|
156
|
+
subscribers: number;
|
|
157
|
+
subscriptions: number;
|
|
158
|
+
};
|
|
159
|
+
export type GetMerchantPlanDetail = {
|
|
160
|
+
merchantName: string;
|
|
161
|
+
merchantLogo: string;
|
|
162
|
+
paymentMethods: Array<PaymentChannel>;
|
|
163
|
+
rate: {
|
|
164
|
+
from: string;
|
|
165
|
+
to: string;
|
|
166
|
+
rate: number;
|
|
167
|
+
};
|
|
168
|
+
plan: PlanDetailResponseData;
|
|
169
|
+
limits: Array<{
|
|
170
|
+
channel: PaymentChannel;
|
|
171
|
+
amount: number;
|
|
172
|
+
}>;
|
|
173
|
+
taxEnabled: boolean;
|
|
174
|
+
};
|
|
175
|
+
export type GetBanksRequestParams = {
|
|
176
|
+
ussd: boolean;
|
|
177
|
+
};
|
|
178
|
+
export type GetBanksResponse = Array<{
|
|
179
|
+
code: string;
|
|
180
|
+
name: string;
|
|
181
|
+
}>;
|
|
182
|
+
export type GetMobileMoneyResponse = Array<{
|
|
183
|
+
code: string;
|
|
184
|
+
name: string;
|
|
185
|
+
phoneNumber: string;
|
|
186
|
+
}>;
|
|
187
|
+
export type CreateDisputeRequest = {
|
|
188
|
+
transactionReference: string;
|
|
189
|
+
reportingReason: string;
|
|
190
|
+
disputeType?: string;
|
|
191
|
+
disputeSource: string;
|
|
192
|
+
supportingDocuments: string[];
|
|
193
|
+
};
|
|
194
|
+
export type RetryPaymentPayload = {
|
|
195
|
+
reference: string;
|
|
196
|
+
channel: string;
|
|
197
|
+
encryptedCard?: string;
|
|
198
|
+
mobileMoney?: {
|
|
199
|
+
code: string;
|
|
200
|
+
phoneNumber: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
export type PusherResponse = {
|
|
204
|
+
amount: string;
|
|
205
|
+
currency: string;
|
|
206
|
+
redirectUrl: string;
|
|
207
|
+
reference: string;
|
|
208
|
+
spotflowReference: string;
|
|
209
|
+
status: string;
|
|
210
|
+
};
|
|
211
|
+
export type PaymentChannel = "card" | "bank_transfer" | "ussd" | "mobile_money" | "eft";
|
|
212
|
+
export type TaxQuoteResponse = {
|
|
213
|
+
id: string;
|
|
214
|
+
totalAmount: number;
|
|
215
|
+
};
|
|
216
|
+
export type GetMerchantDetailsTax = GetMerchantPlanDetail & {
|
|
217
|
+
totalAmount?: number;
|
|
218
|
+
taxQuoteId?: string;
|
|
219
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export type SpotflowProps = {
|
|
2
|
-
rdtCode?: string;
|
|
3
|
-
merchantKey: string;
|
|
4
|
-
encryptionKey: string;
|
|
5
|
-
planId?: string;
|
|
6
|
-
email: string;
|
|
7
|
-
name?: string;
|
|
8
|
-
phoneNumber?: string;
|
|
9
|
-
amount?: number;
|
|
10
|
-
currency?: string;
|
|
11
|
-
reference?: string;
|
|
12
|
-
callBackUrl?: string;
|
|
13
|
-
metadata?: Record<string, unknown>;
|
|
14
|
-
localCurrency?: string;
|
|
15
|
-
url?: string;
|
|
16
|
-
mode?: "test" | "live";
|
|
17
|
-
countryCode?: string;
|
|
18
|
-
};
|
|
19
|
-
export type RegionDetail = {
|
|
20
|
-
name: string;
|
|
21
|
-
dialCode: string;
|
|
22
|
-
length: string;
|
|
23
|
-
cardTypes: string[];
|
|
24
|
-
allowsZeros: boolean;
|
|
25
|
-
icon: string;
|
|
26
|
-
language: string;
|
|
27
|
-
};
|
|
28
|
-
export type CustomerDetails = {
|
|
29
|
-
email: string;
|
|
30
|
-
name?: string;
|
|
31
|
-
phoneNumber?: string;
|
|
32
|
-
};
|
|
1
|
+
export type SpotflowProps = {
|
|
2
|
+
rdtCode?: string;
|
|
3
|
+
merchantKey: string;
|
|
4
|
+
encryptionKey: string;
|
|
5
|
+
planId?: string;
|
|
6
|
+
email: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
phoneNumber?: string;
|
|
9
|
+
amount?: number;
|
|
10
|
+
currency?: string;
|
|
11
|
+
reference?: string;
|
|
12
|
+
callBackUrl?: string;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
localCurrency?: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
mode?: "test" | "live";
|
|
17
|
+
countryCode?: string;
|
|
18
|
+
};
|
|
19
|
+
export type RegionDetail = {
|
|
20
|
+
name: string;
|
|
21
|
+
dialCode: string;
|
|
22
|
+
length: string;
|
|
23
|
+
cardTypes: string[];
|
|
24
|
+
allowsZeros: boolean;
|
|
25
|
+
icon: string;
|
|
26
|
+
language: string;
|
|
27
|
+
};
|
|
28
|
+
export type CustomerDetails = {
|
|
29
|
+
email: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
phoneNumber?: string;
|
|
32
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare function stringTo256BitKey(string: string): Promise<Uint8Array>;
|
|
2
|
-
export declare function encryptData(plaintext: string, key: CryptoKey): Promise<{
|
|
3
|
-
cipher: Uint8Array;
|
|
4
|
-
iv: Uint8Array;
|
|
5
|
-
}>;
|
|
6
|
-
export declare function generateKey(key: string): Promise<CryptoKey>;
|
|
7
|
-
export declare function AESEncryption(text: string, secret: string): Promise<string>;
|
|
8
|
-
export declare function encryptModified(text: any, key: string): Promise<string>;
|
|
1
|
+
export declare function stringTo256BitKey(string: string): Promise<Uint8Array>;
|
|
2
|
+
export declare function encryptData(plaintext: string, key: CryptoKey): Promise<{
|
|
3
|
+
cipher: Uint8Array;
|
|
4
|
+
iv: Uint8Array;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function generateKey(key: string): Promise<CryptoKey>;
|
|
7
|
+
export declare function AESEncryption(text: string, secret: string): Promise<string>;
|
|
8
|
+
export declare function encryptModified(text: any, key: string): Promise<string>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare function getBrowserDetails(): {
|
|
2
|
-
httpBrowserLanguage: string;
|
|
3
|
-
httpBrowserJavaEnabled: boolean;
|
|
4
|
-
httpBrowserJavaScriptEnabled: boolean;
|
|
5
|
-
httpBrowserColorDepth: string;
|
|
6
|
-
httpBrowserScreenHeight: string;
|
|
7
|
-
httpBrowserScreenWidth: string;
|
|
8
|
-
httpBrowserTimeDifference: string;
|
|
9
|
-
userAgentBrowserValue: string;
|
|
10
|
-
deviceChannel: string;
|
|
11
|
-
};
|
|
1
|
+
export declare function getBrowserDetails(): {
|
|
2
|
+
httpBrowserLanguage: string;
|
|
3
|
+
httpBrowserJavaEnabled: boolean;
|
|
4
|
+
httpBrowserJavaScriptEnabled: boolean;
|
|
5
|
+
httpBrowserColorDepth: string;
|
|
6
|
+
httpBrowserScreenHeight: string;
|
|
7
|
+
httpBrowserScreenWidth: string;
|
|
8
|
+
httpBrowserTimeDifference: string;
|
|
9
|
+
userAgentBrowserValue: string;
|
|
10
|
+
deviceChannel: string;
|
|
11
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getCurrency(currency: string, localCurrency?: string): string;
|
|
1
|
+
export declare function getCurrency(currency: string, localCurrency?: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RegionDetail } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare let currentRegion: RegionDetail;
|
|
4
|
-
export declare const getCurrentRegionDetails: (currency: string, countryCode?: string) => RegionDetail | undefined;
|
|
1
|
+
import { RegionDetail } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare let currentRegion: RegionDetail;
|
|
4
|
+
export declare const getCurrentRegionDetails: (currency: string, countryCode?: string) => RegionDetail | undefined;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export declare const generatePaymentReference: () => string;
|
|
2
|
-
export declare const clearNumber: (value?: string) => string;
|
|
3
|
-
export declare const formatCreditCardNumber: (value: string) => string;
|
|
4
|
-
export declare const clearNumberModified: (value: string) => string;
|
|
5
|
-
export declare const formatCreditCardModified: (value: string) => string;
|
|
6
|
-
export declare const formatCVC: (value: string) => string;
|
|
7
|
-
export declare const formatExpirationDate: (value: string) => string;
|
|
8
|
-
export declare const unFormatCreditCardNumber: (value: string) => string;
|
|
9
|
-
export declare const formatTime: (seconds: number) => string;
|
|
10
|
-
export declare const getCardType: (cardNumber: string) => string;
|
|
11
|
-
export declare const cardTypeLength: {
|
|
12
|
-
Visa: number[];
|
|
13
|
-
MasterCard: number[];
|
|
14
|
-
"American Express": number[];
|
|
15
|
-
Discover: number[];
|
|
16
|
-
UnionPay: number[];
|
|
17
|
-
Verve: number[];
|
|
18
|
-
};
|
|
19
|
-
export declare const showToast: (message: string, theme: "success" | "error" | "info" | "warning", duration?: number) => void;
|
|
20
|
-
export declare class Toast {
|
|
21
|
-
static createToast: (message: string, theme: "success" | "error" | "info" | "warning") => HTMLDivElement;
|
|
22
|
-
static showToast: (message: string, theme: "success" | "error" | "info" | "warning", duration?: number) => void;
|
|
23
|
-
static removeToast: (toast: HTMLDivElement) => void;
|
|
24
|
-
}
|
|
25
|
-
export declare function getKeyEnvironment(apiKey: string): "test" | "live" | null;
|
|
26
|
-
export declare function hasDuplicates(arr: string[], item: string): boolean;
|
|
1
|
+
export declare const generatePaymentReference: () => string;
|
|
2
|
+
export declare const clearNumber: (value?: string) => string;
|
|
3
|
+
export declare const formatCreditCardNumber: (value: string) => string;
|
|
4
|
+
export declare const clearNumberModified: (value: string) => string;
|
|
5
|
+
export declare const formatCreditCardModified: (value: string) => string;
|
|
6
|
+
export declare const formatCVC: (value: string) => string;
|
|
7
|
+
export declare const formatExpirationDate: (value: string) => string;
|
|
8
|
+
export declare const unFormatCreditCardNumber: (value: string) => string;
|
|
9
|
+
export declare const formatTime: (seconds: number) => string;
|
|
10
|
+
export declare const getCardType: (cardNumber: string) => string;
|
|
11
|
+
export declare const cardTypeLength: {
|
|
12
|
+
Visa: number[];
|
|
13
|
+
MasterCard: number[];
|
|
14
|
+
"American Express": number[];
|
|
15
|
+
Discover: number[];
|
|
16
|
+
UnionPay: number[];
|
|
17
|
+
Verve: number[];
|
|
18
|
+
};
|
|
19
|
+
export declare const showToast: (message: string, theme: "success" | "error" | "info" | "warning", duration?: number) => void;
|
|
20
|
+
export declare class Toast {
|
|
21
|
+
static createToast: (message: string, theme: "success" | "error" | "info" | "warning") => HTMLDivElement;
|
|
22
|
+
static showToast: (message: string, theme: "success" | "error" | "info" | "warning", duration?: number) => void;
|
|
23
|
+
static removeToast: (toast: HTMLDivElement) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function getKeyEnvironment(apiKey: string): "test" | "live" | null;
|
|
26
|
+
export declare function hasDuplicates(arr: string[], item: string): boolean;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
type ContactDetails = {
|
|
2
|
-
address: string;
|
|
3
|
-
country: string;
|
|
4
|
-
city: string;
|
|
5
|
-
code?: string;
|
|
6
|
-
state: string;
|
|
7
|
-
};
|
|
8
|
-
type Props = {
|
|
9
|
-
onAction: (_evt: Event) => (_val: ContactDetails) => void;
|
|
10
|
-
container: HTMLDivElement;
|
|
11
|
-
translatedTexts: Record<string, string>;
|
|
12
|
-
};
|
|
13
|
-
export declare class AvsValidationForm {
|
|
14
|
-
container: HTMLDivElement;
|
|
15
|
-
private onAction;
|
|
16
|
-
contactDetails: ContactDetails;
|
|
17
|
-
private countries;
|
|
18
|
-
private states;
|
|
19
|
-
private translatedTexts;
|
|
20
|
-
constructor(props: Props);
|
|
21
|
-
attachListeners(): void;
|
|
22
|
-
handleInputChange(event: Event, button: HTMLButtonElement | null, stateInput?: HTMLSelectElement): void;
|
|
23
|
-
private validateCard;
|
|
24
|
-
renderComponent(): void;
|
|
25
|
-
render(): string;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
1
|
+
type ContactDetails = {
|
|
2
|
+
address: string;
|
|
3
|
+
country: string;
|
|
4
|
+
city: string;
|
|
5
|
+
code?: string;
|
|
6
|
+
state: string;
|
|
7
|
+
};
|
|
8
|
+
type Props = {
|
|
9
|
+
onAction: (_evt: Event) => (_val: ContactDetails) => void;
|
|
10
|
+
container: HTMLDivElement;
|
|
11
|
+
translatedTexts: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
export declare class AvsValidationForm {
|
|
14
|
+
container: HTMLDivElement;
|
|
15
|
+
private onAction;
|
|
16
|
+
contactDetails: ContactDetails;
|
|
17
|
+
private countries;
|
|
18
|
+
private states;
|
|
19
|
+
private translatedTexts;
|
|
20
|
+
constructor(props: Props);
|
|
21
|
+
attachListeners(): void;
|
|
22
|
+
handleInputChange(event: Event, button: HTMLButtonElement | null, stateInput?: HTMLSelectElement): void;
|
|
23
|
+
private validateCard;
|
|
24
|
+
renderComponent(): void;
|
|
25
|
+
render(): string;
|
|
26
|
+
}
|
|
27
|
+
export {};
|