@flopay/vue 1.14.5 → 1.14.6
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/automatic-payment-button.d.ts +277 -0
- package/dist/buyer-identity-fallback.d.ts +82 -0
- package/dist/card-setup-entry.d.ts +2 -160
- package/dist/context.d.ts +56 -0
- package/dist/direct-paypal-button.d.ts +325 -0
- package/dist/{card-setup-entry.d.cts → flopay-card-setup.d.ts} +17 -19
- package/dist/flopay-checkout.d.ts +435 -0
- package/dist/{payment-method-setup-entry.d.cts → flopay-payment-method-setup-main.d.ts} +17 -21
- package/dist/hooks.d.ts +22 -0
- package/dist/hosted-setup.d.ts +116 -0
- package/dist/index.d.ts +20 -1947
- package/dist/payment-method-setup-entry.d.ts +2 -156
- package/dist/payment-method-setup-paypal.d.ts +108 -0
- package/dist/processing-overlay.d.ts +82 -0
- package/dist/provider.d.ts +76 -0
- package/dist/saved-payment.d.ts +44 -0
- package/dist/split-card-form.d.ts +691 -0
- package/dist/stripe-elements.d.ts +280 -0
- package/dist/stripe-paypal-continuation.d.ts +28 -0
- package/dist/vault-card-fields.d.ts +118 -0
- package/package.json +5 -5
- package/dist/hosted-setup-jpaaXDFA.d.cts +0 -33
- package/dist/hosted-setup-jpaaXDFA.d.ts +0 -33
- package/dist/index.d.cts +0 -1947
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import type { CheckoutAccount, CheckoutButtonMethod, CheckoutSession, DeclineEvent, FloPayAppearance, PaymentResult } from '@flopay/shared';
|
|
2
|
+
import { FloPayError } from '@flopay/shared';
|
|
3
|
+
import { type PropType } from 'vue';
|
|
4
|
+
/**
|
|
5
|
+
* The approved Stripe-routed PayPal payment React's `PayPalButtonInner` hands
|
|
6
|
+
* to the form's `onTokenizedBody` (`dispatchTokenizedBody` → `/process`).
|
|
7
|
+
*/
|
|
8
|
+
export interface StripePayPalTokenizedBody {
|
|
9
|
+
id?: string;
|
|
10
|
+
type: 'card';
|
|
11
|
+
threeDSecureActionResultTokenId?: string;
|
|
12
|
+
isPaypal: true;
|
|
13
|
+
}
|
|
14
|
+
/** The overrides React's redirect tile passes with that body. */
|
|
15
|
+
export interface StripePayPalTokenizedOverrides {
|
|
16
|
+
accountPatch?: Partial<CheckoutAccount>;
|
|
17
|
+
sessionId?: string;
|
|
18
|
+
nonce?: string;
|
|
19
|
+
paymentMethodCategory?: 'paypal';
|
|
20
|
+
presentationMode: 'redirect';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The form's click gate, as React's `runBeforeButtonClick` answers it: the
|
|
24
|
+
* redirect tile asks for `paypal`, the wallet row for the wallet's button
|
|
25
|
+
* method.
|
|
26
|
+
*/
|
|
27
|
+
export type StripePayPalBeforeClick = (method: CheckoutButtonMethod) => Promise<{
|
|
28
|
+
proceed: boolean;
|
|
29
|
+
accountPatch?: Partial<CheckoutAccount>;
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
nonce?: string;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Advertised Stripe wallets and APMs, rendered on the session's own Stripe
|
|
35
|
+
* account. Each Elements group's `setupFutureUsage` comes only from
|
|
36
|
+
* {@link resolveSetupFutureUsage}; intents are created through the billing
|
|
37
|
+
* API's session-scoped `/intents` with the session nonce, and client-observed
|
|
38
|
+
* declines go to `/intents/decline` with no tokens or PII. Stripe.js is
|
|
39
|
+
* imported lazily, so a card-only checkout never loads it.
|
|
40
|
+
*/
|
|
41
|
+
export declare const StripePaymentMethods: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
42
|
+
session: {
|
|
43
|
+
type: PropType<CheckoutSession | null>;
|
|
44
|
+
default: null;
|
|
45
|
+
};
|
|
46
|
+
sessionId: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
nonce: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
billingApiUrl: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
required: true;
|
|
57
|
+
};
|
|
58
|
+
publishableKey: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
methods: {
|
|
63
|
+
type: PropType<string[]>;
|
|
64
|
+
required: true;
|
|
65
|
+
};
|
|
66
|
+
/** `payment` for checkout, `setup` for payment-method setup. */
|
|
67
|
+
intentKind: {
|
|
68
|
+
type: PropType<'payment' | 'setup'>;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
currency: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: undefined;
|
|
74
|
+
};
|
|
75
|
+
amount: {
|
|
76
|
+
type: NumberConstructor;
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* React's `totalAmount`: the cart total due today, in minor units. When it
|
|
81
|
+
* is given on a checkout (`intentKind: 'payment'`), the wallet row follows
|
|
82
|
+
* React's wallet group: its Elements mode, amount and capture method come
|
|
83
|
+
* from the shared `resolveWalletModeOptions` (setup mode for a $0 total),
|
|
84
|
+
* and its intent is `totalAmount > 0 ? 'payment' : 'setup'`.
|
|
85
|
+
*/
|
|
86
|
+
totalAmount: {
|
|
87
|
+
type: NumberConstructor;
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
90
|
+
returnUrl: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: undefined;
|
|
93
|
+
};
|
|
94
|
+
/** The theme's appearance, normalized for Stripe Elements (React's setup branch does the same). */
|
|
95
|
+
appearance: {
|
|
96
|
+
type: PropType<FloPayAppearance>;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* React's `stripePayPalPresentation`, which the form resolves from its
|
|
101
|
+
* `walletPresentation` prop through the shared
|
|
102
|
+
* `resolveStripePayPalPresentation`. With `redirect`, Stripe-routed PayPal
|
|
103
|
+
* leaves the wallet row and renders as React's full-page "Pay with PayPal"
|
|
104
|
+
* redirect tile, which resumes the payment when the buyer returns.
|
|
105
|
+
*/
|
|
106
|
+
paypalPresentation: {
|
|
107
|
+
type: PropType<'popup' | 'redirect'>;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* The form's click gate (React's `runBeforeButtonClick`), run by the
|
|
112
|
+
* redirect tile and by the wallet row's Express Checkout click.
|
|
113
|
+
*/
|
|
114
|
+
runBeforeButtonClick: {
|
|
115
|
+
type: PropType<StripePayPalBeforeClick>;
|
|
116
|
+
default: undefined;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* React's `onTokenizedBody={dispatchTokenizedBody}` for the redirect tile:
|
|
120
|
+
* the form posts `/process` with the approved payment. Without it, the
|
|
121
|
+
* tile reports `complete` itself, as this component's wallet row does.
|
|
122
|
+
*/
|
|
123
|
+
onTokenizedBody: {
|
|
124
|
+
type: PropType<(body: StripePayPalTokenizedBody, overrides: StripePayPalTokenizedOverrides) => void>;
|
|
125
|
+
default: undefined;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* React's `isProcessing={isSubmitting}`: while the form is processing, the
|
|
129
|
+
* PayPal redirect tile and the APM button are disabled and ignore clicks.
|
|
130
|
+
*/
|
|
131
|
+
isProcessing: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* The form's storage-free stand-in for the click-time account patch React
|
|
137
|
+
* restores from its `localStorage` continuation (issue #410, triage AC 4:
|
|
138
|
+
* Vue never stores it). On an authorized redirect return it is asked once
|
|
139
|
+
* for the account, with the returned session id; what it answers goes to
|
|
140
|
+
* `onTokenizedBody` as the attempt's `accountPatch`. A throw or no answer
|
|
141
|
+
* continues without one, because the payment is already authorized.
|
|
142
|
+
*/
|
|
143
|
+
recoverAccountPatch: {
|
|
144
|
+
type: PropType<(sessionId: string) => Promise<Partial<CheckoutAccount> | undefined>>;
|
|
145
|
+
default: undefined;
|
|
146
|
+
};
|
|
147
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
150
|
+
/** The buyer confirmed a wallet or APM and its element validated: the attempt starts. */
|
|
151
|
+
submitting: () => true;
|
|
152
|
+
complete: (_result: PaymentResult) => true;
|
|
153
|
+
decline: (_decline: DeclineEvent) => true;
|
|
154
|
+
error: (_error: FloPayError) => true;
|
|
155
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
156
|
+
session: {
|
|
157
|
+
type: PropType<CheckoutSession | null>;
|
|
158
|
+
default: null;
|
|
159
|
+
};
|
|
160
|
+
sessionId: {
|
|
161
|
+
type: StringConstructor;
|
|
162
|
+
required: true;
|
|
163
|
+
};
|
|
164
|
+
nonce: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
default: undefined;
|
|
167
|
+
};
|
|
168
|
+
billingApiUrl: {
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
required: true;
|
|
171
|
+
};
|
|
172
|
+
publishableKey: {
|
|
173
|
+
type: StringConstructor;
|
|
174
|
+
required: true;
|
|
175
|
+
};
|
|
176
|
+
methods: {
|
|
177
|
+
type: PropType<string[]>;
|
|
178
|
+
required: true;
|
|
179
|
+
};
|
|
180
|
+
/** `payment` for checkout, `setup` for payment-method setup. */
|
|
181
|
+
intentKind: {
|
|
182
|
+
type: PropType<'payment' | 'setup'>;
|
|
183
|
+
default: string;
|
|
184
|
+
};
|
|
185
|
+
currency: {
|
|
186
|
+
type: StringConstructor;
|
|
187
|
+
default: undefined;
|
|
188
|
+
};
|
|
189
|
+
amount: {
|
|
190
|
+
type: NumberConstructor;
|
|
191
|
+
default: number;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* React's `totalAmount`: the cart total due today, in minor units. When it
|
|
195
|
+
* is given on a checkout (`intentKind: 'payment'`), the wallet row follows
|
|
196
|
+
* React's wallet group: its Elements mode, amount and capture method come
|
|
197
|
+
* from the shared `resolveWalletModeOptions` (setup mode for a $0 total),
|
|
198
|
+
* and its intent is `totalAmount > 0 ? 'payment' : 'setup'`.
|
|
199
|
+
*/
|
|
200
|
+
totalAmount: {
|
|
201
|
+
type: NumberConstructor;
|
|
202
|
+
default: undefined;
|
|
203
|
+
};
|
|
204
|
+
returnUrl: {
|
|
205
|
+
type: StringConstructor;
|
|
206
|
+
default: undefined;
|
|
207
|
+
};
|
|
208
|
+
/** The theme's appearance, normalized for Stripe Elements (React's setup branch does the same). */
|
|
209
|
+
appearance: {
|
|
210
|
+
type: PropType<FloPayAppearance>;
|
|
211
|
+
default: undefined;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* React's `stripePayPalPresentation`, which the form resolves from its
|
|
215
|
+
* `walletPresentation` prop through the shared
|
|
216
|
+
* `resolveStripePayPalPresentation`. With `redirect`, Stripe-routed PayPal
|
|
217
|
+
* leaves the wallet row and renders as React's full-page "Pay with PayPal"
|
|
218
|
+
* redirect tile, which resumes the payment when the buyer returns.
|
|
219
|
+
*/
|
|
220
|
+
paypalPresentation: {
|
|
221
|
+
type: PropType<'popup' | 'redirect'>;
|
|
222
|
+
default: string;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* The form's click gate (React's `runBeforeButtonClick`), run by the
|
|
226
|
+
* redirect tile and by the wallet row's Express Checkout click.
|
|
227
|
+
*/
|
|
228
|
+
runBeforeButtonClick: {
|
|
229
|
+
type: PropType<StripePayPalBeforeClick>;
|
|
230
|
+
default: undefined;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* React's `onTokenizedBody={dispatchTokenizedBody}` for the redirect tile:
|
|
234
|
+
* the form posts `/process` with the approved payment. Without it, the
|
|
235
|
+
* tile reports `complete` itself, as this component's wallet row does.
|
|
236
|
+
*/
|
|
237
|
+
onTokenizedBody: {
|
|
238
|
+
type: PropType<(body: StripePayPalTokenizedBody, overrides: StripePayPalTokenizedOverrides) => void>;
|
|
239
|
+
default: undefined;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* React's `isProcessing={isSubmitting}`: while the form is processing, the
|
|
243
|
+
* PayPal redirect tile and the APM button are disabled and ignore clicks.
|
|
244
|
+
*/
|
|
245
|
+
isProcessing: {
|
|
246
|
+
type: BooleanConstructor;
|
|
247
|
+
default: boolean;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* The form's storage-free stand-in for the click-time account patch React
|
|
251
|
+
* restores from its `localStorage` continuation (issue #410, triage AC 4:
|
|
252
|
+
* Vue never stores it). On an authorized redirect return it is asked once
|
|
253
|
+
* for the account, with the returned session id; what it answers goes to
|
|
254
|
+
* `onTokenizedBody` as the attempt's `accountPatch`. A throw or no answer
|
|
255
|
+
* continues without one, because the payment is already authorized.
|
|
256
|
+
*/
|
|
257
|
+
recoverAccountPatch: {
|
|
258
|
+
type: PropType<(sessionId: string) => Promise<Partial<CheckoutAccount> | undefined>>;
|
|
259
|
+
default: undefined;
|
|
260
|
+
};
|
|
261
|
+
}>> & Readonly<{
|
|
262
|
+
onComplete?: ((_result: PaymentResult) => any) | undefined;
|
|
263
|
+
onDecline?: ((_decline: DeclineEvent) => any) | undefined;
|
|
264
|
+
onError?: ((_error: FloPayError) => any) | undefined;
|
|
265
|
+
onSubmitting?: (() => any) | undefined;
|
|
266
|
+
}>, {
|
|
267
|
+
session: CheckoutSession | null;
|
|
268
|
+
nonce: string;
|
|
269
|
+
intentKind: "payment" | "setup";
|
|
270
|
+
currency: string;
|
|
271
|
+
amount: number;
|
|
272
|
+
totalAmount: number;
|
|
273
|
+
returnUrl: string;
|
|
274
|
+
appearance: FloPayAppearance;
|
|
275
|
+
paypalPresentation: "popup" | "redirect";
|
|
276
|
+
runBeforeButtonClick: StripePayPalBeforeClick;
|
|
277
|
+
onTokenizedBody: (body: StripePayPalTokenizedBody, overrides: StripePayPalTokenizedOverrides) => void;
|
|
278
|
+
isProcessing: boolean;
|
|
279
|
+
recoverAccountPatch: (sessionId: string) => Promise<Partial<CheckoutAccount> | undefined>;
|
|
280
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface StripePayPalContinuation {
|
|
2
|
+
attempt: string;
|
|
3
|
+
sessionId: string;
|
|
4
|
+
nonce?: string;
|
|
5
|
+
}
|
|
6
|
+
/** A random, URL-safe marker for one redirect attempt. */
|
|
7
|
+
export declare function createStripePayPalAttempt(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Saves the continuation before Stripe redirects. Returns whether storage
|
|
10
|
+
* accepted it (a redirect must not start without it).
|
|
11
|
+
*/
|
|
12
|
+
export declare function saveStripePayPalContinuation(continuation: StripePayPalContinuation): boolean;
|
|
13
|
+
/** Removes the continuation (an inline confirm or a consumed return spends it). */
|
|
14
|
+
export declare function clearStripePayPalContinuation(): void;
|
|
15
|
+
/**
|
|
16
|
+
* The PayPal `return_url`: this page without Stripe's redirect parameters or
|
|
17
|
+
* an earlier attempt marker, carrying `attempt` when given.
|
|
18
|
+
*/
|
|
19
|
+
export declare function stripePayPalReturnUrl(attempt?: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* The saved continuation, only when this page is a Stripe return carrying its
|
|
22
|
+
* attempt marker.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readStripePayPalReturnContinuation(): StripePayPalContinuation | null;
|
|
25
|
+
/** Whether this page load is the return of a Stripe-routed PayPal redirect this tab started. */
|
|
26
|
+
export declare function hasStripePayPalReturn(): boolean;
|
|
27
|
+
/** Consumes the continuation and strips Stripe's parameters and the attempt marker from the URL. */
|
|
28
|
+
export declare function consumeStripePayPalReturn(): void;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { CardCaptureAdapter, VaultCardThemeColors } from '@flopay/shared';
|
|
2
|
+
import { type CSSProperties, type PropType } from 'vue';
|
|
3
|
+
/** Props for {@link VaultCardFields} (React's `VaultCardFieldsProps`; callbacks are emits). */
|
|
4
|
+
export interface VaultCardFieldsProps {
|
|
5
|
+
/** The card-capture adapter (typically `useFloPay().value.cardCapture()`). */
|
|
6
|
+
capture: CardCaptureAdapter;
|
|
7
|
+
/** Server-rendered hosted vault widget HTML (the session's `vault.html`). */
|
|
8
|
+
html: string;
|
|
9
|
+
/** Per-session integrity token (the vault block's `messageToken`). */
|
|
10
|
+
messageToken?: string;
|
|
11
|
+
/** Exact origin expected for the widget's terminal `postMessage` outcomes. */
|
|
12
|
+
expectedOrigin?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The form sits behind the backend's production human check (the vault
|
|
15
|
+
* block's `verification.required`, sdk#414). Forwarded to the adapter so a
|
|
16
|
+
* pre-submit frame `error` (check failed, expired or unavailable) is not
|
|
17
|
+
* reported as a vault load failure; it is still emitted as `error`.
|
|
18
|
+
*/
|
|
19
|
+
verificationRequired?: boolean;
|
|
20
|
+
/** Theme colors pushed into the hosted widget live; `null` is the classic reset. */
|
|
21
|
+
theme?: VaultCardThemeColors | null;
|
|
22
|
+
/** Final, localized submit wording, applied live without a remount. */
|
|
23
|
+
submitLabel?: string | null;
|
|
24
|
+
/** Inline styles for the container the widget mounts into. */
|
|
25
|
+
containerStyle?: CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Renders the backend-served hosted vault card widget. The widget owns the
|
|
29
|
+
* card fields, the submit button, the charge and 3DS; this component only
|
|
30
|
+
* injects it through the {@link CardCaptureAdapter} (the SDK's `cardCapture`)
|
|
31
|
+
* and relays its `ready` / `error` / `validation` lifecycle as Vue events.
|
|
32
|
+
*/
|
|
33
|
+
export declare const VaultCardFields: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
34
|
+
capture: {
|
|
35
|
+
type: PropType<CardCaptureAdapter>;
|
|
36
|
+
default: undefined;
|
|
37
|
+
};
|
|
38
|
+
html: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
messageToken: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
expectedOrigin: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
verificationRequired: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
theme: {
|
|
55
|
+
type: PropType<VaultCardThemeColors | null>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
submitLabel: {
|
|
59
|
+
type: PropType<string | null>;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
containerStyle: {
|
|
63
|
+
type: PropType<CSSProperties>;
|
|
64
|
+
default: undefined;
|
|
65
|
+
};
|
|
66
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
67
|
+
[key: string]: any;
|
|
68
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
69
|
+
ready: () => true;
|
|
70
|
+
error: (_message: string | null) => true;
|
|
71
|
+
validation: (_message: string | null) => true;
|
|
72
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
73
|
+
capture: {
|
|
74
|
+
type: PropType<CardCaptureAdapter>;
|
|
75
|
+
default: undefined;
|
|
76
|
+
};
|
|
77
|
+
html: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
default: undefined;
|
|
80
|
+
};
|
|
81
|
+
messageToken: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
expectedOrigin: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: undefined;
|
|
88
|
+
};
|
|
89
|
+
verificationRequired: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: undefined;
|
|
92
|
+
};
|
|
93
|
+
theme: {
|
|
94
|
+
type: PropType<VaultCardThemeColors | null>;
|
|
95
|
+
default: undefined;
|
|
96
|
+
};
|
|
97
|
+
submitLabel: {
|
|
98
|
+
type: PropType<string | null>;
|
|
99
|
+
default: undefined;
|
|
100
|
+
};
|
|
101
|
+
containerStyle: {
|
|
102
|
+
type: PropType<CSSProperties>;
|
|
103
|
+
default: undefined;
|
|
104
|
+
};
|
|
105
|
+
}>> & Readonly<{
|
|
106
|
+
onError?: ((_message: string | null) => any) | undefined;
|
|
107
|
+
onReady?: (() => any) | undefined;
|
|
108
|
+
onValidation?: ((_message: string | null) => any) | undefined;
|
|
109
|
+
}>, {
|
|
110
|
+
capture: CardCaptureAdapter;
|
|
111
|
+
html: string;
|
|
112
|
+
messageToken: string;
|
|
113
|
+
expectedOrigin: string;
|
|
114
|
+
verificationRequired: boolean;
|
|
115
|
+
theme: VaultCardThemeColors | null;
|
|
116
|
+
submitLabel: string | null;
|
|
117
|
+
containerStyle: CSSProperties;
|
|
118
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flopay/vue",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@flopay/js": "1.14.
|
|
40
|
-
"@flopay/shared": "1.14.
|
|
39
|
+
"@flopay/js": "1.14.6",
|
|
40
|
+
"@flopay/shared": "1.14.6",
|
|
41
41
|
"@paypal/paypal-js": "^10.1.0",
|
|
42
42
|
"@stripe/stripe-js": "^9.17.0"
|
|
43
43
|
},
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@vue/test-utils": "^2.4.6",
|
|
50
50
|
"jsdom": "^29.1.1",
|
|
51
51
|
"tsup": "^8.3.0",
|
|
52
|
-
"typescript": "^
|
|
52
|
+
"typescript": "^7.0.2",
|
|
53
53
|
"vitest": "4.1.12",
|
|
54
54
|
"vue": "3.5.45"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
|
-
"build": "tsup",
|
|
57
|
+
"build": "tsup && tsc -p tsconfig.build.json",
|
|
58
58
|
"dev": "tsup --watch",
|
|
59
59
|
"typecheck": "tsc --noEmit",
|
|
60
60
|
"test": "vitest run",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { SavedCardDisplay, FloPayError, FloPayErrorType } from '@flopay/shared';
|
|
2
|
-
|
|
3
|
-
/** Verified terminal result from a no-charge setup. */
|
|
4
|
-
interface FloPayCardSetupCompleteEvent {
|
|
5
|
-
status: 'succeeded';
|
|
6
|
-
sessionId: string;
|
|
7
|
-
/** Present when the backend terminal message includes the saved-card display DTO. */
|
|
8
|
-
paymentMethod?: SavedCardDisplay;
|
|
9
|
-
}
|
|
10
|
-
/** Provider-neutral terminal decline from verification. */
|
|
11
|
-
interface FloPayCardSetupDeclineEvent {
|
|
12
|
-
status: 'declined';
|
|
13
|
-
sessionId: string;
|
|
14
|
-
reason?: string;
|
|
15
|
-
message?: string;
|
|
16
|
-
}
|
|
17
|
-
/** Abandoned setup result emitted when the component unmounts pre-terminally. */
|
|
18
|
-
interface FloPayCardSetupCancelEvent {
|
|
19
|
-
status: 'cancelled';
|
|
20
|
-
sessionId: string;
|
|
21
|
-
}
|
|
22
|
-
/** Structured technical/validation failure from a setup surface. */
|
|
23
|
-
declare class FloPayCardSetupError extends FloPayError {
|
|
24
|
-
readonly retryable: boolean;
|
|
25
|
-
constructor(message: string, type: FloPayErrorType, options: {
|
|
26
|
-
code: string;
|
|
27
|
-
retryable: boolean;
|
|
28
|
-
param?: string;
|
|
29
|
-
statusCode?: number;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { type FloPayCardSetupCancelEvent as F, type FloPayCardSetupCompleteEvent as a, type FloPayCardSetupDeclineEvent as b, FloPayCardSetupError as c };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { SavedCardDisplay, FloPayError, FloPayErrorType } from '@flopay/shared';
|
|
2
|
-
|
|
3
|
-
/** Verified terminal result from a no-charge setup. */
|
|
4
|
-
interface FloPayCardSetupCompleteEvent {
|
|
5
|
-
status: 'succeeded';
|
|
6
|
-
sessionId: string;
|
|
7
|
-
/** Present when the backend terminal message includes the saved-card display DTO. */
|
|
8
|
-
paymentMethod?: SavedCardDisplay;
|
|
9
|
-
}
|
|
10
|
-
/** Provider-neutral terminal decline from verification. */
|
|
11
|
-
interface FloPayCardSetupDeclineEvent {
|
|
12
|
-
status: 'declined';
|
|
13
|
-
sessionId: string;
|
|
14
|
-
reason?: string;
|
|
15
|
-
message?: string;
|
|
16
|
-
}
|
|
17
|
-
/** Abandoned setup result emitted when the component unmounts pre-terminally. */
|
|
18
|
-
interface FloPayCardSetupCancelEvent {
|
|
19
|
-
status: 'cancelled';
|
|
20
|
-
sessionId: string;
|
|
21
|
-
}
|
|
22
|
-
/** Structured technical/validation failure from a setup surface. */
|
|
23
|
-
declare class FloPayCardSetupError extends FloPayError {
|
|
24
|
-
readonly retryable: boolean;
|
|
25
|
-
constructor(message: string, type: FloPayErrorType, options: {
|
|
26
|
-
code: string;
|
|
27
|
-
retryable: boolean;
|
|
28
|
-
param?: string;
|
|
29
|
-
statusCode?: number;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { type FloPayCardSetupCancelEvent as F, type FloPayCardSetupCompleteEvent as a, type FloPayCardSetupDeclineEvent as b, FloPayCardSetupError as c };
|