@bizzsv/bizz-payment 1.2.4-dev → 1.3.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.cjs +60 -283
- package/dist/index.d.ts +29 -0
- package/dist/index.global.js +60 -283
- package/dist/index.js +358 -154
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -11,12 +11,14 @@ export declare class BizzPaymentForm {
|
|
|
11
11
|
private serverErrorHandler;
|
|
12
12
|
private orchestrator;
|
|
13
13
|
private paymentIntent;
|
|
14
|
+
private points;
|
|
14
15
|
private countryContent;
|
|
15
16
|
private processPayment;
|
|
16
17
|
private stateContent;
|
|
17
18
|
private amountEvaluation;
|
|
18
19
|
private currentAmount;
|
|
19
20
|
private currentValues;
|
|
21
|
+
private pointsPaymentContext;
|
|
20
22
|
constructor(config: PaymentFormConfig);
|
|
21
23
|
/**
|
|
22
24
|
* Subscribe to host-side events.
|
|
@@ -28,11 +30,15 @@ export declare class BizzPaymentForm {
|
|
|
28
30
|
*/
|
|
29
31
|
private applyFixedAmountFromOrderTemplate;
|
|
30
32
|
private renderForm;
|
|
33
|
+
private notifyCountriesLoadError;
|
|
31
34
|
private resetForm;
|
|
32
35
|
private setSubmitLoading;
|
|
33
36
|
private setToken;
|
|
34
37
|
private sendAlert;
|
|
35
38
|
private sendFailureEmitter;
|
|
39
|
+
private processPointsPayment;
|
|
40
|
+
private resetPointsPayButton;
|
|
41
|
+
private handlePointsBalance;
|
|
36
42
|
private sendReadyEmitter;
|
|
37
43
|
private sendSizingEmitter;
|
|
38
44
|
private sendSuccess;
|
|
@@ -54,6 +60,7 @@ export declare interface PaymentFormConfig {
|
|
|
54
60
|
i18n?: PaymentFormI18n;
|
|
55
61
|
branchCode: string;
|
|
56
62
|
paymentRequestCode?: string;
|
|
63
|
+
paymentOrderCode?: string;
|
|
57
64
|
description?: string;
|
|
58
65
|
totalAmount?: number;
|
|
59
66
|
header?: boolean | FormCustomHeader;
|
|
@@ -115,12 +122,26 @@ export declare type PaymentFormMessage = {
|
|
|
115
122
|
} | {
|
|
116
123
|
type: 'payment-form:success';
|
|
117
124
|
paymentIntent: PaymentIntentSuccessResponse;
|
|
125
|
+
} | {
|
|
126
|
+
type: 'payment-form:points-balance';
|
|
127
|
+
balance: PointsBalanceView;
|
|
128
|
+
} | {
|
|
129
|
+
type: 'payment-form:points-pay';
|
|
130
|
+
} | {
|
|
131
|
+
type: 'payment-form:points-pay-reset';
|
|
118
132
|
} | {
|
|
119
133
|
type: 'payment-form:states-loaded';
|
|
120
134
|
states: State[];
|
|
121
135
|
} | {
|
|
122
136
|
type: 'payment-form:validate-amount';
|
|
123
137
|
amount: string;
|
|
138
|
+
} | {
|
|
139
|
+
type: 'payment-form:update-forms';
|
|
140
|
+
forms: {
|
|
141
|
+
default: string;
|
|
142
|
+
points: string;
|
|
143
|
+
installments: string;
|
|
144
|
+
};
|
|
124
145
|
} | {
|
|
125
146
|
type: 'payment-form:sizing';
|
|
126
147
|
width: number;
|
|
@@ -167,6 +188,14 @@ declare interface PaymentIntentSuccessResponse {
|
|
|
167
188
|
};
|
|
168
189
|
}
|
|
169
190
|
|
|
191
|
+
declare interface PointsBalanceView {
|
|
192
|
+
availableCents: number;
|
|
193
|
+
availablePoints: number;
|
|
194
|
+
currency: string;
|
|
195
|
+
purchaseCents: number;
|
|
196
|
+
purchasePoints: number;
|
|
197
|
+
}
|
|
198
|
+
|
|
170
199
|
declare type State = {
|
|
171
200
|
id: string;
|
|
172
201
|
name: string;
|