@paynext/sdk 1.1.0 → 1.2.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/dist/index.d.ts +10 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { PayPalButtonStyle } from '@paypal/paypal-js';
|
|
2
2
|
|
|
3
|
+
export declare type AcceptedCardNetworks = Partial<Record<CardNetworkMethod, CardType[]>>;
|
|
4
|
+
|
|
3
5
|
export declare interface ApplePayRecurringPaymentLineItem {
|
|
4
6
|
label: string;
|
|
5
7
|
amount: string;
|
|
@@ -24,11 +26,16 @@ export declare interface AttemptResult {
|
|
|
24
26
|
cardType: string;
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
declare const CARD_NETWORK_METHODS: readonly [PaymentMethod.CARD, PaymentMethod.APPLE_PAY, PaymentMethod.GOOGLE_PAY];
|
|
30
|
+
|
|
31
|
+
declare type CardNetworkMethod = (typeof CARD_NETWORK_METHODS)[number];
|
|
32
|
+
|
|
27
33
|
export declare enum CardType {
|
|
28
34
|
Visa = "visa",
|
|
29
35
|
Mastercard = "mastercard",
|
|
30
36
|
Discover = "discover",
|
|
31
|
-
JCB = "jcb"
|
|
37
|
+
JCB = "jcb",
|
|
38
|
+
AmericanExpress = "amex"
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
export declare interface CheckoutError {
|
|
@@ -297,7 +304,7 @@ export declare interface LoadedResult {
|
|
|
297
304
|
|
|
298
305
|
export declare type Locale = 'ar' | 'en' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'es' | 'et' | 'fi' | 'fil' | 'fr' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'ru' | 'mt' | 'no' | 'nl' | 'pl' | 'pt' | 'ro' | 'uk' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'sr' | 'is' | 'nl-BE';
|
|
299
306
|
|
|
300
|
-
declare const NON_UPDATABLE_CONFIG_KEYS: readonly ["clientToken", "environment", "apiVersion", "variant", "styles", "errorMessageText", "returnUrl", "applePayMpanEnabled", "applePayRecurringPaymentRequest", "onCheckoutLoaded", "onCheckoutAttempt", "beforeCheckoutAttempt", "onCheckoutComplete", "onCheckoutFail", "onCheckoutBlocked"];
|
|
307
|
+
declare const NON_UPDATABLE_CONFIG_KEYS: readonly ["clientToken", "environment", "apiVersion", "variant", "styles", "errorMessageText", "returnUrl", "applePayMpanEnabled", "applePayRecurringPaymentRequest", "acceptedCardNetworks", "onCheckoutLoaded", "onCheckoutAttempt", "beforeCheckoutAttempt", "onCheckoutComplete", "onCheckoutFail", "onCheckoutBlocked"];
|
|
301
308
|
|
|
302
309
|
export declare enum PaymentMethod {
|
|
303
310
|
PAYPAL = "PAYPAL",
|
|
@@ -524,6 +531,7 @@ export declare interface PayNextConfig {
|
|
|
524
531
|
paymentsEnabled?: boolean;
|
|
525
532
|
applePayMpanEnabled?: boolean;
|
|
526
533
|
applePayRecurringPaymentRequest?: ApplePayRecurringPaymentRequest;
|
|
534
|
+
acceptedCardNetworks?: AcceptedCardNetworks;
|
|
527
535
|
onCheckoutLoaded?: (result: LoadedResult) => void;
|
|
528
536
|
onCheckoutAttempt?: (result: AttemptResult) => void;
|
|
529
537
|
beforeCheckoutAttempt?: (result: AttemptResult) => boolean | Promise<boolean>;
|