card-react-native 0.0.7 → 0.0.9
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 +347 -192
- package/android/build.gradle +1 -1
- package/card-react-native.podspec +2 -2
- package/lib/commonjs/index.js +23 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/enums/sdkEnums.js +53 -27
- package/lib/commonjs/models/enums/sdkEnums.js.map +1 -1
- package/lib/module/index.js +24 -8
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/enums/sdkEnums.js +47 -24
- package/lib/module/models/enums/sdkEnums.js.map +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/models/config.d.ts +31 -34
- package/lib/typescript/src/models/config.d.ts.map +1 -1
- package/lib/typescript/src/models/enums/sdkEnums.d.ts +23 -3
- package/lib/typescript/src/models/enums/sdkEnums.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +25 -7
- package/src/models/config.ts +36 -40
- package/src/models/enums/sdkEnums.ts +24 -3
package/src/models/config.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
ColorStyle,
|
|
2
3
|
Direction,
|
|
3
4
|
Edges,
|
|
4
5
|
Locale,
|
|
5
6
|
Scope,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
SupportedSchemes,
|
|
8
|
+
SupportedFundSource,
|
|
9
|
+
SupportedPaymentAuthentications,
|
|
8
10
|
TapCurrencyCode,
|
|
9
11
|
Theme,
|
|
12
|
+
Purpose,
|
|
10
13
|
} from './enums';
|
|
11
14
|
|
|
12
15
|
export type Merchant = { id: String };
|
|
@@ -19,7 +22,6 @@ export type Contract = {
|
|
|
19
22
|
};
|
|
20
23
|
export type Transaction = {
|
|
21
24
|
metadata: Object;
|
|
22
|
-
reference: String;
|
|
23
25
|
paymentAgreement: PaymentAgreement;
|
|
24
26
|
};
|
|
25
27
|
|
|
@@ -31,17 +33,18 @@ export type InterfaceConfig = {
|
|
|
31
33
|
locale: Locale;
|
|
32
34
|
theme: Theme;
|
|
33
35
|
edges: Edges;
|
|
36
|
+
loader: boolean;
|
|
34
37
|
cardDirection: Direction;
|
|
35
|
-
colorStyle:
|
|
36
|
-
powered:
|
|
38
|
+
colorStyle: ColorStyle;
|
|
39
|
+
powered: boolean;
|
|
37
40
|
};
|
|
38
41
|
export type Addons = {
|
|
39
42
|
loader: boolean;
|
|
40
43
|
};
|
|
41
44
|
export type Acceptance = {
|
|
42
|
-
supportedSchemes:
|
|
43
|
-
supportedFundSource:
|
|
44
|
-
supportedPaymentAuthentications: [
|
|
45
|
+
supportedSchemes: SupportedSchemes[];
|
|
46
|
+
supportedFundSource: SupportedFundSource[];
|
|
47
|
+
supportedPaymentAuthentications: SupportedPaymentAuthentications[] | [];
|
|
45
48
|
};
|
|
46
49
|
export type Contact = {
|
|
47
50
|
email: String;
|
|
@@ -54,11 +57,11 @@ export type Name = {
|
|
|
54
57
|
middle: String;
|
|
55
58
|
};
|
|
56
59
|
export type Customer = {
|
|
57
|
-
id
|
|
58
|
-
name
|
|
59
|
-
nameOnCard
|
|
60
|
-
editable
|
|
61
|
-
contact
|
|
60
|
+
id?: String;
|
|
61
|
+
name?: Name[];
|
|
62
|
+
nameOnCard?: String;
|
|
63
|
+
editable?: boolean;
|
|
64
|
+
contact?: Contact;
|
|
62
65
|
};
|
|
63
66
|
export type AuthenticationTransactionInvoice = {
|
|
64
67
|
id: string;
|
|
@@ -74,10 +77,12 @@ export type AuthenticationTransaction = {
|
|
|
74
77
|
};
|
|
75
78
|
|
|
76
79
|
export type Order = {
|
|
77
|
-
id
|
|
78
|
-
amount
|
|
79
|
-
currency
|
|
80
|
-
description
|
|
80
|
+
id?: String;
|
|
81
|
+
amount?: number;
|
|
82
|
+
currency?: TapCurrencyCode;
|
|
83
|
+
description?: String;
|
|
84
|
+
reference?: String;
|
|
85
|
+
metadata?: Object;
|
|
81
86
|
};
|
|
82
87
|
|
|
83
88
|
export type Invoice = {
|
|
@@ -87,38 +92,29 @@ export type Invoice = {
|
|
|
87
92
|
export type Post = {
|
|
88
93
|
url: String;
|
|
89
94
|
};
|
|
90
|
-
|
|
91
|
-
url: String;
|
|
92
|
-
};
|
|
95
|
+
|
|
93
96
|
export type Features = {
|
|
94
|
-
|
|
97
|
+
alternativeCardInputs: {
|
|
98
|
+
cardNFC: boolean;
|
|
99
|
+
cardScanner: boolean;
|
|
100
|
+
};
|
|
95
101
|
acceptanceBadge: boolean;
|
|
96
|
-
nfc: boolean;
|
|
97
102
|
customerCards: {
|
|
98
103
|
saveCard: boolean;
|
|
99
104
|
autoSaveCard: boolean;
|
|
100
105
|
};
|
|
101
106
|
};
|
|
102
107
|
export type Config = {
|
|
103
|
-
|
|
104
|
-
merchant: Merchant;
|
|
105
|
-
transaction: Transaction;
|
|
108
|
+
merchant?: Merchant;
|
|
106
109
|
order: Order;
|
|
107
|
-
invoice
|
|
108
|
-
post
|
|
109
|
-
operator: { publicKey:
|
|
110
|
-
purpose
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| 'ADD_CARD'
|
|
115
|
-
| 'CARDHOLDER_VERIFICATION';
|
|
116
|
-
fields: Fields;
|
|
117
|
-
acceptance: Acceptance;
|
|
118
|
-
addons: Addons;
|
|
119
|
-
interface: InterfaceConfig;
|
|
110
|
+
invoice?: Invoice;
|
|
111
|
+
post?: Post;
|
|
112
|
+
operator: { publicKey: string };
|
|
113
|
+
purpose?: Purpose;
|
|
114
|
+
fieldVisibility?: Fields;
|
|
115
|
+
acceptance?: Acceptance;
|
|
116
|
+
interface?: InterfaceConfig;
|
|
120
117
|
scope: Scope;
|
|
121
118
|
customer: Customer;
|
|
122
|
-
|
|
123
|
-
features: Features;
|
|
119
|
+
features?: Features;
|
|
124
120
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export enum
|
|
1
|
+
export enum SupportedSchemes {
|
|
2
2
|
AMEX = 'AMEX',
|
|
3
3
|
CARTESBANCAIRES = 'CARTESBANCAIRES',
|
|
4
4
|
DISCOVER = 'DISCOVER',
|
|
@@ -19,7 +19,9 @@ export enum SupportedBrands {
|
|
|
19
19
|
|
|
20
20
|
export enum Scope {
|
|
21
21
|
Token = 'Token',
|
|
22
|
-
|
|
22
|
+
AuthenticatedToken = 'AuthenticatedToken',
|
|
23
|
+
SaveToken = 'SaveToken',
|
|
24
|
+
SaveAuthenticatedToken = 'SaveAuthenticatedToken',
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export enum SdkMode {
|
|
@@ -32,12 +34,31 @@ export enum Locale {
|
|
|
32
34
|
ar = 'ar',
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
export enum
|
|
37
|
+
export enum SupportedFundSource {
|
|
36
38
|
All = 'All',
|
|
37
39
|
Debit = 'DEBIT',
|
|
38
40
|
Credit = 'CREDIT',
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
export enum Purpose {
|
|
44
|
+
Transaction = 'Transaction',
|
|
45
|
+
SaveCard = 'Save Card',
|
|
46
|
+
VerifyCardholder = 'Verify Cardholder',
|
|
47
|
+
OrderTransaction = 'Order Transaction',
|
|
48
|
+
SubscriptionTransaction = 'Subscription Transaction',
|
|
49
|
+
BillingTransaction = 'Billing Transaction',
|
|
50
|
+
InstallmentTransaction = 'Installment Transaction',
|
|
51
|
+
MilestoneTransaction = 'Milestone Transaction',
|
|
52
|
+
MaintainCard = 'Maintain Card',
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export enum SupportedPaymentAuthentications {
|
|
56
|
+
secured = '3ds',
|
|
57
|
+
}
|
|
58
|
+
export enum ColorStyle {
|
|
59
|
+
monochrome = 'monochrome',
|
|
60
|
+
colored = 'colored',
|
|
61
|
+
}
|
|
41
62
|
export enum Theme {
|
|
42
63
|
light = 'light',
|
|
43
64
|
dark = 'dark',
|