@soltech/fluid-common 1.10.1-sc23269.0 → 1.11.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/lib/payment-methods.d.ts
CHANGED
|
@@ -48,12 +48,6 @@ export interface PaymentMethod {
|
|
|
48
48
|
finalTransactionResultCheckEnabled?: boolean;
|
|
49
49
|
encryptionSettings?: EncryptionSettings;
|
|
50
50
|
hostedFields?: HostedFieldsSettings;
|
|
51
|
-
deviceProtection?: DeviceProtectionSettings;
|
|
52
|
-
}
|
|
53
|
-
/** Its presence is also how the client decides the gateway behind this method profiles at all. */
|
|
54
|
-
export interface DeviceProtectionSettings {
|
|
55
|
-
merchantId: string;
|
|
56
|
-
env: string;
|
|
57
51
|
}
|
|
58
52
|
export interface EncryptionSettings {
|
|
59
53
|
encryptionType: EncryptionType;
|
package/lib/transactions.d.ts
CHANGED
|
@@ -9,11 +9,7 @@ export interface TransactionParams {
|
|
|
9
9
|
amount: number;
|
|
10
10
|
paymentMethodId: string;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
export interface GatewayProtectionParams {
|
|
14
|
-
protectionHeaders?: Record<string, string>;
|
|
15
|
-
}
|
|
16
|
-
export interface CreditcardTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
12
|
+
export interface CreditcardTransactionParams extends TransactionParams {
|
|
17
13
|
cardHolder?: string;
|
|
18
14
|
cardNumber?: string;
|
|
19
15
|
cvc: string;
|
|
@@ -21,44 +17,7 @@ export interface CreditcardTransactionParams extends TransactionParams, GatewayP
|
|
|
21
17
|
expiryYear?: string;
|
|
22
18
|
expiryDate?: string;
|
|
23
19
|
cardToken?: string;
|
|
24
|
-
|
|
25
|
-
export interface ApplePayTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
26
|
-
/** The authorised `ApplePayPaymentToken`, serialised, opaque to everything but the gateway. */
|
|
27
|
-
token: string;
|
|
28
|
-
billingContact?: ApplePayContact;
|
|
29
|
-
/** Apple returns the payer's email here, not on the billing contact. */
|
|
30
|
-
shippingContact?: ApplePayContact;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* What the cashier needs to open the sheet. Every field describes the merchant, not the payer —
|
|
34
|
-
* `countryCode` included, which is what Apple asks for here.
|
|
35
|
-
*/
|
|
36
|
-
export interface ApplePayParams {
|
|
37
|
-
countryCode: string;
|
|
38
|
-
companyName: string;
|
|
39
|
-
supportedNetworks: string[];
|
|
40
|
-
/** Apple's `ApplePayMerchantCapability` values; a DOM type neither server can name. */
|
|
41
|
-
merchantCapabilities: string[];
|
|
42
|
-
merchantIdentifier?: string;
|
|
43
|
-
requiresContactDetails: boolean;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Apple's own `ApplePayPaymentContact` shape, carried through unchanged: a gateway that wants
|
|
47
|
-
* it expects the field names Apple uses. Only present when the method asks the sheet for it.
|
|
48
|
-
*/
|
|
49
|
-
export interface ApplePayContact {
|
|
50
|
-
addressLines?: string[];
|
|
51
|
-
administrativeArea?: string;
|
|
52
|
-
country?: string;
|
|
53
|
-
countryCode?: string;
|
|
54
|
-
emailAddress?: string;
|
|
55
|
-
familyName?: string;
|
|
56
|
-
givenName?: string;
|
|
57
|
-
locality?: string;
|
|
58
|
-
phoneNumber?: string;
|
|
59
|
-
postalCode?: string;
|
|
60
|
-
subAdministrativeArea?: string;
|
|
61
|
-
subLocality?: string;
|
|
20
|
+
protectionHeaders?: Record<string, string>;
|
|
62
21
|
}
|
|
63
22
|
/** The request that concludes a deposit the payer had to act on away from the cashier, a 3DS challenge being the case that needs it. */
|
|
64
23
|
export interface DepositContinuationParams {
|
|
@@ -75,8 +34,10 @@ export interface DepositContinuationParams {
|
|
|
75
34
|
sessionKey?: string;
|
|
76
35
|
}
|
|
77
36
|
/**
|
|
78
|
-
* Transaction params for any payment method whose payload is keyed dynamically
|
|
79
|
-
* CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
|
|
37
|
+
* Transaction params for any payment method whose payload is keyed dynamically:
|
|
38
|
+
* - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
|
|
39
|
+
* - Native flows like Apple Pay where the gateway-bound `token` is the only
|
|
40
|
+
* extra key beyond the base TransactionParams.
|
|
80
41
|
* Field keys typically come from `PaymentMethod.inputFields[].paramName`.
|
|
81
42
|
*/
|
|
82
43
|
export interface DynamicTransactionParams extends TransactionParams {
|
package/package.json
CHANGED
package/src/payment-methods.ts
CHANGED
|
@@ -54,13 +54,6 @@ export interface PaymentMethod {
|
|
|
54
54
|
finalTransactionResultCheckEnabled?: boolean;
|
|
55
55
|
encryptionSettings?: EncryptionSettings;
|
|
56
56
|
hostedFields?: HostedFieldsSettings;
|
|
57
|
-
deviceProtection?: DeviceProtectionSettings;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** Its presence is also how the client decides the gateway behind this method profiles at all. */
|
|
61
|
-
export interface DeviceProtectionSettings {
|
|
62
|
-
merchantId: string;
|
|
63
|
-
env: string;
|
|
64
57
|
}
|
|
65
58
|
|
|
66
59
|
export interface EncryptionSettings {
|
package/src/transactions.ts
CHANGED
|
@@ -12,12 +12,7 @@ export interface TransactionParams {
|
|
|
12
12
|
paymentMethodId: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
export interface GatewayProtectionParams {
|
|
17
|
-
protectionHeaders?: Record<string, string>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface CreditcardTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
15
|
+
export interface CreditcardTransactionParams extends TransactionParams {
|
|
21
16
|
cardHolder?: string;
|
|
22
17
|
cardNumber?: string;
|
|
23
18
|
cvc: string;
|
|
@@ -25,47 +20,7 @@ export interface CreditcardTransactionParams extends TransactionParams, GatewayP
|
|
|
25
20
|
expiryYear?: string;
|
|
26
21
|
expiryDate?: string;
|
|
27
22
|
cardToken?: string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export interface ApplePayTransactionParams extends TransactionParams, GatewayProtectionParams {
|
|
31
|
-
/** The authorised `ApplePayPaymentToken`, serialised, opaque to everything but the gateway. */
|
|
32
|
-
token: string;
|
|
33
|
-
billingContact?: ApplePayContact;
|
|
34
|
-
/** Apple returns the payer's email here, not on the billing contact. */
|
|
35
|
-
shippingContact?: ApplePayContact;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* What the cashier needs to open the sheet. Every field describes the merchant, not the payer —
|
|
40
|
-
* `countryCode` included, which is what Apple asks for here.
|
|
41
|
-
*/
|
|
42
|
-
export interface ApplePayParams {
|
|
43
|
-
countryCode: string;
|
|
44
|
-
companyName: string;
|
|
45
|
-
supportedNetworks: string[];
|
|
46
|
-
/** Apple's `ApplePayMerchantCapability` values; a DOM type neither server can name. */
|
|
47
|
-
merchantCapabilities: string[];
|
|
48
|
-
merchantIdentifier?: string;
|
|
49
|
-
requiresContactDetails: boolean;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Apple's own `ApplePayPaymentContact` shape, carried through unchanged: a gateway that wants
|
|
54
|
-
* it expects the field names Apple uses. Only present when the method asks the sheet for it.
|
|
55
|
-
*/
|
|
56
|
-
export interface ApplePayContact {
|
|
57
|
-
addressLines?: string[];
|
|
58
|
-
administrativeArea?: string;
|
|
59
|
-
country?: string;
|
|
60
|
-
countryCode?: string;
|
|
61
|
-
emailAddress?: string;
|
|
62
|
-
familyName?: string;
|
|
63
|
-
givenName?: string;
|
|
64
|
-
locality?: string;
|
|
65
|
-
phoneNumber?: string;
|
|
66
|
-
postalCode?: string;
|
|
67
|
-
subAdministrativeArea?: string;
|
|
68
|
-
subLocality?: string;
|
|
23
|
+
protectionHeaders?: Record<string, string>;
|
|
69
24
|
}
|
|
70
25
|
|
|
71
26
|
/** The request that concludes a deposit the payer had to act on away from the cashier, a 3DS challenge being the case that needs it. */
|
|
@@ -84,8 +39,10 @@ export interface DepositContinuationParams {
|
|
|
84
39
|
}
|
|
85
40
|
|
|
86
41
|
/**
|
|
87
|
-
* Transaction params for any payment method whose payload is keyed dynamically
|
|
88
|
-
* CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
|
|
42
|
+
* Transaction params for any payment method whose payload is keyed dynamically:
|
|
43
|
+
* - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
|
|
44
|
+
* - Native flows like Apple Pay where the gateway-bound `token` is the only
|
|
45
|
+
* extra key beyond the base TransactionParams.
|
|
89
46
|
* Field keys typically come from `PaymentMethod.inputFields[].paramName`.
|
|
90
47
|
*/
|
|
91
48
|
export interface DynamicTransactionParams extends TransactionParams {
|