@bizzsv/bizz-payment 1.4.2 → 1.5.0-dev
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.cjs +37 -25
- package/dist/index.d.ts +26 -0
- package/dist/index.global.js +37 -25
- package/dist/index.js +399 -94
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare class BizzPaymentForm {
|
|
|
19
19
|
private currentAmount;
|
|
20
20
|
private currentValues;
|
|
21
21
|
private pointsPaymentContext;
|
|
22
|
+
private nakaPollingInterval;
|
|
22
23
|
constructor(config: PaymentFormConfig);
|
|
23
24
|
/**
|
|
24
25
|
* Subscribe to host-side events.
|
|
@@ -31,6 +32,7 @@ export declare class BizzPaymentForm {
|
|
|
31
32
|
private applyFixedAmountFromOrderTemplate;
|
|
32
33
|
private renderForm;
|
|
33
34
|
private notifyCountriesLoadError;
|
|
35
|
+
private postMessageToIframe;
|
|
34
36
|
private resetForm;
|
|
35
37
|
private setSubmitLoading;
|
|
36
38
|
private setToken;
|
|
@@ -42,9 +44,15 @@ export declare class BizzPaymentForm {
|
|
|
42
44
|
private sendReadyEmitter;
|
|
43
45
|
private sendSizingEmitter;
|
|
44
46
|
private sendSuccess;
|
|
47
|
+
private handleCryptoPayment;
|
|
48
|
+
private handleNakaTerminalFailure;
|
|
49
|
+
private startNakaPolling;
|
|
50
|
+
private stopNakaPolling;
|
|
45
51
|
destroy(): void;
|
|
46
52
|
}
|
|
47
53
|
|
|
54
|
+
declare type CryptoTransactionStatus = 'IN_PROGRESS' | 'OPEN' | 'PENDING' | 'SUCCESS' | 'COMPLETED' | 'PAID' | 'OVERPAID' | 'EXPIRED' | 'CANCELED' | 'CANCELLED' | 'FAILED' | 'REJECTED' | 'UNDERPAID' | string;
|
|
55
|
+
|
|
48
56
|
declare type Environment = 'production' | 'sandbox';
|
|
49
57
|
|
|
50
58
|
declare interface FormCustomHeader {
|
|
@@ -55,6 +63,8 @@ declare interface FormCustomHeader {
|
|
|
55
63
|
date?: boolean;
|
|
56
64
|
}
|
|
57
65
|
|
|
66
|
+
declare type NakaTransactionStatus = CryptoTransactionStatus;
|
|
67
|
+
|
|
58
68
|
export declare interface PaymentFormConfig {
|
|
59
69
|
iframeTarget: string;
|
|
60
70
|
i18n?: PaymentFormI18n;
|
|
@@ -65,6 +75,7 @@ export declare interface PaymentFormConfig {
|
|
|
65
75
|
totalAmount?: number;
|
|
66
76
|
header?: boolean | FormCustomHeader;
|
|
67
77
|
environment?: Environment;
|
|
78
|
+
redirectUrl?: string;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
declare type PaymentFormEventMap = {
|
|
@@ -143,7 +154,22 @@ export declare type PaymentFormMessage = {
|
|
|
143
154
|
default: string;
|
|
144
155
|
points: string;
|
|
145
156
|
installments: string;
|
|
157
|
+
crypto?: string;
|
|
146
158
|
};
|
|
159
|
+
} | {
|
|
160
|
+
type: 'payment-form:naka-checkout';
|
|
161
|
+
redirectUrl: string;
|
|
162
|
+
chargeId: string;
|
|
163
|
+
} | {
|
|
164
|
+
type: 'payment-form:naka-status';
|
|
165
|
+
status: NakaTransactionStatus;
|
|
166
|
+
} | {
|
|
167
|
+
type: 'payment-form:naka-callback';
|
|
168
|
+
status: string;
|
|
169
|
+
chargeId?: string;
|
|
170
|
+
orderNumber?: string;
|
|
171
|
+
} | {
|
|
172
|
+
type: 'payment-form:load-crypto-countries';
|
|
147
173
|
} | {
|
|
148
174
|
type: 'payment-form:sizing';
|
|
149
175
|
width: number;
|