@authvia/payment-method-create 0.1.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/README.md +336 -0
- package/dist/components/AuthviaPaymentMethodForm.vue.d.ts +65 -0
- package/dist/components/icons/authvia-wallet-svg-icon.vue.d.ts +30 -0
- package/dist/components/internal/AuthviaForgotCardOption.vue.d.ts +11 -0
- package/dist/components/internal/AuthviaFormWithTerms.vue.d.ts +2 -0
- package/dist/components/internal/AuthviaPaymentMethodAddAch.vue.d.ts +187 -0
- package/dist/components/internal/AuthviaPaymentMethodAddAchOnline.vue.d.ts +25 -0
- package/dist/components/internal/AuthviaPaymentMethodAddAchOptions.vue.d.ts +42 -0
- package/dist/components/internal/AuthviaPaymentMethodCard.vue.d.ts +22 -0
- package/dist/components/internal/AuthviaPaymentMethodCreditCard.vue.d.ts +142 -0
- package/dist/components/internal/AuthviaPaymentMethodRestrictions.vue.d.ts +41 -0
- package/dist/components/internal/AuthviaPazeForm.vue.d.ts +48 -0
- package/dist/components/internal/AuthviaPciFooter.vue.d.ts +5 -0
- package/dist/composables/useHostService.d.ts +22 -0
- package/dist/composables/usePaymentMethodService.d.ts +34 -0
- package/dist/composables/usePazeSDK.d.ts +21 -0
- package/dist/composables/useWalletMerchantService.d.ts +15 -0
- package/dist/composables/useWalletTokenService.d.ts +16 -0
- package/dist/entry/index.d.ts +13 -0
- package/dist/entry/web-component.d.ts +92 -0
- package/dist/model/APIOptions.d.ts +3 -0
- package/dist/model/Contact.d.ts +8 -0
- package/dist/model/Merchant.d.ts +8 -0
- package/dist/model/MerchantProductSummary.d.ts +6 -0
- package/dist/model/MerchantProfile.d.ts +22 -0
- package/dist/model/MerchantTheme.d.ts +5 -0
- package/dist/model/PaymentMethod.d.ts +65 -0
- package/dist/model/PaymentMethodAPIError.d.ts +18 -0
- package/dist/model/PaymentMethodBillingAddress.d.ts +15 -0
- package/dist/model/PaymentMethodFilters.d.ts +4 -0
- package/dist/model/TokenGrants.d.ts +14 -0
- package/dist/model/index.d.ts +11 -0
- package/dist/plugins/vuetify-base.d.ts +169 -0
- package/dist/svg/index.d.ts +22 -0
- package/dist/types/index.d.ts +197 -0
- package/dist/utils/apiBaseUrl.d.ts +7 -0
- package/dist/utils/config.d.ts +40 -0
- package/dist/utils/errors.d.ts +32 -0
- package/dist/utils/index.d.ts +69 -0
- package/dist/utils/logger.d.ts +6 -0
- package/dist/utils/spacing.d.ts +39 -0
- package/dist/utils/tokenUtils.d.ts +43 -0
- package/dist/vue-plugin.d.ts +6 -0
- package/dist/vue-plugin.js +2 -0
- package/dist/vue-plugin.umd.cjs +2 -0
- package/dist/walletConstants.d.ts +8 -0
- package/package.json +136 -0
package/README.md
ADDED
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
# Authvia Payment Method Form Web Component
|
|
2
|
+
|
|
3
|
+
A modern, accessible payment method web component built with Vue 3, TypeScript, and Vuetify 3. It is based on the address form component and provides validation, flexible styling options, and can be embedded as a web component or used as a Vue plugin.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🏠 **Google Places Autocomplete** - Intelligent address suggestions
|
|
8
|
+
- 📱 **Responsive Design** - Works on all device sizes
|
|
9
|
+
- 🎨 **Customizable Styling** - Vuetify theming and custom CSS variables
|
|
10
|
+
- ✅ **Form Validation** - Real-time validation with error handling
|
|
11
|
+
- 🔧 **Flexible Configuration** - Multiple props for customization
|
|
12
|
+
- 🌐 **Internationalization Ready** - Built-in translation support
|
|
13
|
+
- 🚀 **Web Component & Vue Module** - Use as web component or Vue plugin
|
|
14
|
+
- 🔒 **Security Focused** - Input sanitization and error handling
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @authvia/customer-payment-method-create
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
### Web Component Usage (Standalone Build)
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<!DOCTYPE html>
|
|
28
|
+
<html lang="en">
|
|
29
|
+
<head>
|
|
30
|
+
<meta charset="UTF-8" />
|
|
31
|
+
<title>Payment Method Form Demo</title>
|
|
32
|
+
|
|
33
|
+
<!-- Vue runtime must be provided globally -->
|
|
34
|
+
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
|
|
35
|
+
|
|
36
|
+
<!-- Vuetify CSS + MDI fonts (required, not bundled) -->
|
|
37
|
+
<link
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
href="https://cdn.jsdelivr.net/npm/vuetify@3.5.0/dist/vuetify.min.css"
|
|
40
|
+
data-vuetify
|
|
41
|
+
/>
|
|
42
|
+
<link
|
|
43
|
+
rel="stylesheet"
|
|
44
|
+
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css"
|
|
45
|
+
data-mdi
|
|
46
|
+
/>
|
|
47
|
+
</head>
|
|
48
|
+
<body>
|
|
49
|
+
<!-- Basic usage -->
|
|
50
|
+
<authvia-payment-method-form
|
|
51
|
+
data-azp="your-client-id"
|
|
52
|
+
data-embedded-submit-label="Save Payment Method"
|
|
53
|
+
></authvia-payment-method-form>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<!-- Load the web component (use either .js or .umd.cjs) -->
|
|
57
|
+
<script src="https://cdn-development.authvia-nonprod.com/web-components/authvia-customer-payment-method-create/authvia-customer-payment-method-create.js"></script>
|
|
58
|
+
</body>
|
|
59
|
+
</html>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Vue Module Usage
|
|
63
|
+
|
|
64
|
+
**Important:** The Vue module does **not** create a Vuetify instance. Your app must provide Vuetify and the MDI font CSS.
|
|
65
|
+
|
|
66
|
+
#### Basic Vuetify Setup
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { createApp } from 'vue'
|
|
70
|
+
import { createVuetify } from 'vuetify'
|
|
71
|
+
import * as components from 'vuetify/components'
|
|
72
|
+
import * as directives from 'vuetify/directives'
|
|
73
|
+
import 'vuetify/styles'
|
|
74
|
+
import '@mdi/font/css/materialdesignicons.css'
|
|
75
|
+
|
|
76
|
+
const vuetify = createVuetify({
|
|
77
|
+
components,
|
|
78
|
+
directives,
|
|
79
|
+
theme: {
|
|
80
|
+
defaultTheme: 'light'
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
const app = createApp(App)
|
|
85
|
+
app.use(vuetify)
|
|
86
|
+
app.mount('#app')
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### Use the component (with Google Maps API key)
|
|
90
|
+
|
|
91
|
+
```vue
|
|
92
|
+
<template>
|
|
93
|
+
<div>
|
|
94
|
+
<AuthviaPaymentMethodForm
|
|
95
|
+
:dataAzp="clientId"
|
|
96
|
+
:dataEmbeddedSubmitLabel="submitLabel"
|
|
97
|
+
@submit="handleSubmit"
|
|
98
|
+
@success="handleSuccess"
|
|
99
|
+
@error="handleError"
|
|
100
|
+
@field-input="handleFieldInput"
|
|
101
|
+
@field-blur="handleFieldBlur"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
106
|
+
<script setup lang="ts">
|
|
107
|
+
import { ref } from 'vue'
|
|
108
|
+
import { AuthviaPaymentMethodForm } from '@authvia/customer-payment-method-create'
|
|
109
|
+
import type { AddressFormData } from '@authvia/customer-payment-method-create'
|
|
110
|
+
|
|
111
|
+
const clientId = ref('your-client-id')
|
|
112
|
+
const submitLabel = ref('Save Payment Method')
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
const handleSubmit = (data: AddressFormData) => {
|
|
118
|
+
console.log('Form submitted:', data)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const handleSuccess = (data: any) => {
|
|
122
|
+
console.log('Success:', data)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const handleError = (error: any) => {
|
|
126
|
+
console.error('Error:', error)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const handleFieldInput = (field: keyof AddressFormData, value: string) => {
|
|
130
|
+
console.log(`Field ${field} changed to:`, value)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const handleFieldBlur = (field: keyof AddressFormData) => {
|
|
134
|
+
console.log(`Field ${field} lost focus`)
|
|
135
|
+
}
|
|
136
|
+
</script>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Vue Plugin Usage
|
|
140
|
+
|
|
141
|
+
**Important:** Your consuming application must configure Vuetify first (see Vue Module Usage above), then use the plugin:
|
|
142
|
+
|
|
143
|
+
**Option 1: Default Import (Recommended for backward compatibility)**
|
|
144
|
+
```typescript
|
|
145
|
+
import { createApp } from 'vue'
|
|
146
|
+
import { createVuetify } from 'vuetify'
|
|
147
|
+
import '@mdi/font/css/materialdesignicons.css'
|
|
148
|
+
import 'vuetify/styles'
|
|
149
|
+
// ... configure Vuetify as above ...
|
|
150
|
+
import AuthviaPaymentMethodForm from '@authvia/customer-payment-method-create'
|
|
151
|
+
import App from './App.vue'
|
|
152
|
+
|
|
153
|
+
const app = createApp(App)
|
|
154
|
+
app.use(vuetify) // Your Vuetify instance
|
|
155
|
+
app.use(AuthviaPaymentMethodForm) // Then use the plugin
|
|
156
|
+
app.mount('#app')
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Option 2: Named Import**
|
|
160
|
+
```typescript
|
|
161
|
+
import { createApp } from 'vue'
|
|
162
|
+
import { createVuetify } from 'vuetify'
|
|
163
|
+
import '@mdi/font/css/materialdesignicons.css'
|
|
164
|
+
import 'vuetify/styles'
|
|
165
|
+
// ... configure Vuetify as above ...
|
|
166
|
+
import { AuthviaPaymentMethodFormPlugin } from '@authvia/customer-payment-method-create'
|
|
167
|
+
import App from './App.vue'
|
|
168
|
+
|
|
169
|
+
const app = createApp(App)
|
|
170
|
+
app.use(vuetify) // Your Vuetify instance
|
|
171
|
+
app.use(AuthviaPaymentMethodFormPlugin) // Then use the plugin
|
|
172
|
+
app.mount('#app')
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Note:**
|
|
176
|
+
- The plugin only registers the component.
|
|
177
|
+
- Vuetify (including icons) is fully controlled by your app; we recommend using the MDI font CSS as shown above.
|
|
178
|
+
- Both default and named imports are supported for backward compatibility.
|
|
179
|
+
|
|
180
|
+
## Props
|
|
181
|
+
|
|
182
|
+
### Authentication Props
|
|
183
|
+
|
|
184
|
+
| Prop | Type | Required | Description |
|
|
185
|
+
|------|------|----------|-------------|
|
|
186
|
+
| `data-token` | `string` | No | Authentication token for API calls |
|
|
187
|
+
| `data-azp` | `string` | Yes | Client identifier |
|
|
188
|
+
|
|
189
|
+
### Form Behavior Props
|
|
190
|
+
|
|
191
|
+
| Prop | Type | Default | Description |
|
|
192
|
+
|------|------|---------|-------------|
|
|
193
|
+
| `data-embedded-submit-label` | `string` | `'Submit Address'` | Text for submit button |
|
|
194
|
+
| `data-embedded-no-button` | `boolean` | `false` | Hide submit button |
|
|
195
|
+
| `data-disable-form` / `dataDisableForm` | `boolean` | `false` | Disable all fields and submit button (read-only) |
|
|
196
|
+
| `data-auto-submit` | `boolean` | `false` | Auto-submit form when it becomes valid (hides button) |
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### API Integration Props
|
|
200
|
+
|
|
201
|
+
| Prop | Type | Description |
|
|
202
|
+
|------|------|-------------|
|
|
203
|
+
| `data-union` | `string` | Union identifier for API address lookup |
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
### Styling Props
|
|
208
|
+
|
|
209
|
+
| Prop | Type | Description |
|
|
210
|
+
|------|------|-------------|
|
|
211
|
+
| `data-input-spacing` | `string` | Spacing between inputs (embedded mode only) |
|
|
212
|
+
| `data-vuetify-props` / `dataVuetifyProps` | `object` / JSON string | Vuetify component props (object in Vue module, JSON string attribute in web component) |
|
|
213
|
+
|
|
214
|
+
## Events
|
|
215
|
+
|
|
216
|
+
| Event | Detail | Description |
|
|
217
|
+
|-------|--------|-------------|
|
|
218
|
+
| `submit` | `AddressFormData` | Form submitted with data |
|
|
219
|
+
| `success` | `{ data, azp }` | Form submission successful |
|
|
220
|
+
| `error` | `{ error, azp }` | Form submission failed |
|
|
221
|
+
| `field-input` | `{ field, value }` | Field value changed |
|
|
222
|
+
| `field-blur` | `{ field }` | Field lost focus |
|
|
223
|
+
|
|
224
|
+
## Types
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
|
|
228
|
+
interface VuetifyProps {
|
|
229
|
+
theme?: {
|
|
230
|
+
primary?: string
|
|
231
|
+
secondary?: string
|
|
232
|
+
accent?: string
|
|
233
|
+
error?: string
|
|
234
|
+
warning?: string
|
|
235
|
+
info?: string
|
|
236
|
+
success?: string
|
|
237
|
+
}
|
|
238
|
+
density?: 'default' | 'compact' | 'comfortable'
|
|
239
|
+
variant?: 'outlined' | 'filled' | 'plain' | 'underlined' | 'solo' | 'solo-inverted' | 'solo-filled'
|
|
240
|
+
textVariant?: 'outlined' | 'filled' | 'plain' | 'underlined' | 'solo' | 'solo-inverted' | 'solo-filled'
|
|
241
|
+
spacing?: {
|
|
242
|
+
inputGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
243
|
+
rowGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
244
|
+
sectionGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
245
|
+
buttonGap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Configuration
|
|
251
|
+
|
|
252
|
+
### Environment Variables
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# API Configuration
|
|
256
|
+
VITE_APP_API_BASE_URL=https://api-dev.authvia.com
|
|
257
|
+
VITE_APP_API_VERSION=v3
|
|
258
|
+
|
|
259
|
+
# Development / diagnostics
|
|
260
|
+
VITE_APP_ENABLE_LOGGING=true
|
|
261
|
+
VITE_APP_ENABLE_DEBUG=true
|
|
262
|
+
VITE_APP_ENABLE_ANALYTICS=false
|
|
263
|
+
VITE_APP_ENABLE_ERROR_REPORTING=false
|
|
264
|
+
VITE_APP_ENABLE_PERFORMANCE_MONITORING=false
|
|
265
|
+
VITE_APP_ENABLE_CSP=true
|
|
266
|
+
VITE_APP_ENABLE_HSTS=false
|
|
267
|
+
VITE_APP_BUILD_TARGET=development
|
|
268
|
+
VITE_APP_SOURCE_MAPS=true
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
## Development
|
|
274
|
+
|
|
275
|
+
### Prerequisites
|
|
276
|
+
|
|
277
|
+
- Node.js 18+
|
|
278
|
+
- npm 9+
|
|
279
|
+
|
|
280
|
+
### Setup
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Install dependencies
|
|
284
|
+
npm install
|
|
285
|
+
|
|
286
|
+
# Start development server
|
|
287
|
+
npm run dev
|
|
288
|
+
|
|
289
|
+
# Build web component
|
|
290
|
+
npm run build:wc
|
|
291
|
+
|
|
292
|
+
# Build Vue module
|
|
293
|
+
npm run build
|
|
294
|
+
|
|
295
|
+
# Type checking
|
|
296
|
+
npm run type-check
|
|
297
|
+
|
|
298
|
+
# Linting
|
|
299
|
+
npm run lint
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
## Bundle & Assets
|
|
304
|
+
|
|
305
|
+
- The **Vue module** externalizes Vue and Vuetify; your app controls Vuetify configuration and icon sets (we recommend the MDI font CSS).
|
|
306
|
+
- The **standalone web component** bundles Vuetify **JavaScript** but expects Vuetify CSS + MDI fonts from the host page.
|
|
307
|
+
- Component CSS is injected by JS (no separate `style.css` export); you don’t need to import any additional styles from this package beyond Vuetify + MDI.
|
|
308
|
+
|
|
309
|
+
## Browser Support
|
|
310
|
+
|
|
311
|
+
- Chrome 88+
|
|
312
|
+
- Firefox 85+
|
|
313
|
+
- Safari 14+
|
|
314
|
+
- Edge 88+
|
|
315
|
+
|
|
316
|
+
## Changelog
|
|
317
|
+
|
|
318
|
+
### Version 1.0.2
|
|
319
|
+
|
|
320
|
+
**Why:** Partners embedding the payment-method-create web component needed end-to-end data submission for credit card (via external web component) and ACH forms, plus a unified `--avwc-*` CSS variable naming convention so host applications can consistently theme the component. This unblocks downstream integration and reduces partner onboarding friction.
|
|
321
|
+
|
|
322
|
+
**Outcome:** `AuthviaPaymentMethodOptions` now wires `@success`/`@error` to both `AuthviaPaymentMethodAddAch` and `AuthviaPaymentMethodCreditCard` sub-components. ACH and credit card `on-success` events emit `{ type, paymentMethodId, use }` payloads instead of bare IDs, incorporating `forgetCard` state. CSS variables are renamed from `--merchant-*`/`--web-component-*` to `--avwc-*` with backward-compatible fallbacks in `variables.css`. A named export `AuthviaPaymentMethodFormPlugin` is added alongside the default export in `src/entry/index.ts`. Verify by confirming ACH and credit card submissions emit the new payload shape and CSS variables cascade correctly from host `:root`.
|
|
323
|
+
|
|
324
|
+
### Version 1.0.3
|
|
325
|
+
|
|
326
|
+
**Why:** The payment-method-create component lacked Storybook stories and unit tests, making it harder for developers to visually verify component behavior and catch regressions. Adding test coverage and Storybook examples reduces risk of shipping broken payment forms and improves onboarding for new contributors.
|
|
327
|
+
|
|
328
|
+
**Outcome:** Added Storybook stories for `AuthviaPaymentMethodForm` covering all payment method configurations (card-only, ACH-only, demo mode, PayPal/Venmo, Paze, restrictions, custom theming via CSS variables). Added unit tests for `walletConstants`, `AuthviaPaymentMethodForm`, `AuthviaForgotCardOption`, `AuthviaFormWithTerms`, `AuthviaPaymentMethodCard`, `AuthviaPaymentMethodRestrictions`, `AuthviaPciFooter`, `useHostService`, `usePaymentMethodService`, `usePazeSDK`, `useWalletMerchantService`, `useWalletTokenService`, `apiBaseUrl`, `config`, `errors`, and `logger`. Fixed a duplicate-filtering bug in `useWalletMerchantService.tenderTypes` (`!== index` → `=== index`). Bound `data-avwc-disable-form` to `dataDemoMode` in `AuthviaPaymentMethodCreditCard`. Verify via `npm test` and Storybook UI.
|
|
329
|
+
|
|
330
|
+
## License
|
|
331
|
+
|
|
332
|
+
MIT License - see LICENSE file for details.
|
|
333
|
+
|
|
334
|
+
## Support
|
|
335
|
+
|
|
336
|
+
For support and questions, please contact the Authvia UI Team.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { AuthviaPaymentMethodFormProps as Props, PaymentMethodFormData, PaymentMethodRestrictions } from '../types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
4
|
+
rootRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
5
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
error: (error: any) => any;
|
|
7
|
+
success: (data: any) => any;
|
|
8
|
+
submit: (data: PaymentMethodFormData) => any;
|
|
9
|
+
ready: () => any;
|
|
10
|
+
"payment-method-created": (paymentMethodId: string) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
12
|
+
onError?: ((error: any) => any) | undefined;
|
|
13
|
+
onSuccess?: ((data: any) => any) | undefined;
|
|
14
|
+
onSubmit?: ((data: PaymentMethodFormData) => any) | undefined;
|
|
15
|
+
onReady?: (() => any) | undefined;
|
|
16
|
+
"onPayment-method-created"?: ((paymentMethodId: string) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
variant: "outlined" | "filled" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled";
|
|
19
|
+
paze: {
|
|
20
|
+
amount?: string;
|
|
21
|
+
clientId?: string;
|
|
22
|
+
profileId?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
};
|
|
25
|
+
paypal: {
|
|
26
|
+
venmo?: boolean;
|
|
27
|
+
merchantId: string;
|
|
28
|
+
clientId: string;
|
|
29
|
+
redirectUrl: string;
|
|
30
|
+
};
|
|
31
|
+
ach: {
|
|
32
|
+
demoMode?: boolean;
|
|
33
|
+
online?: boolean;
|
|
34
|
+
nameOnAccount?: string;
|
|
35
|
+
routingNumber?: string;
|
|
36
|
+
accountNumber?: string;
|
|
37
|
+
streetAddress?: string;
|
|
38
|
+
city?: string;
|
|
39
|
+
state?: string;
|
|
40
|
+
country?: string;
|
|
41
|
+
postalCode?: string;
|
|
42
|
+
};
|
|
43
|
+
color: string;
|
|
44
|
+
forgetDefault: boolean | string;
|
|
45
|
+
customerRef: string;
|
|
46
|
+
token: string;
|
|
47
|
+
borderRadius: string;
|
|
48
|
+
merchantId: string;
|
|
49
|
+
forgetHidden: boolean | string;
|
|
50
|
+
intent: string;
|
|
51
|
+
restrictions: PaymentMethodRestrictions[];
|
|
52
|
+
card: {
|
|
53
|
+
allow?: boolean;
|
|
54
|
+
demoMode?: boolean;
|
|
55
|
+
nameOnCard?: string;
|
|
56
|
+
streetAddress?: string;
|
|
57
|
+
city?: string;
|
|
58
|
+
state?: string;
|
|
59
|
+
country?: string;
|
|
60
|
+
postalCode?: string;
|
|
61
|
+
};
|
|
62
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
63
|
+
rootRef: HTMLDivElement;
|
|
64
|
+
}, HTMLDivElement>;
|
|
65
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
path: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
size: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
fill: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
}>, {
|
|
14
|
+
fillColor: import('vue').ComputedRef<string>;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
path: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
size: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
fill: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
27
|
+
}>> & Readonly<{}>, {
|
|
28
|
+
size: string;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
forgetDefault?: boolean;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
+
"update:forgetCard": (value: boolean) => any;
|
|
6
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
7
|
+
"onUpdate:forgetCard"?: ((value: boolean) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
forgetDefault: boolean;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Ref, ComputedRef, PropType } from 'vue';
|
|
2
|
+
import { PaymentMethod, PaymentMethodBillingAddress } from '../../model';
|
|
3
|
+
export interface P_ACHValues {
|
|
4
|
+
nameOnAccount: string;
|
|
5
|
+
accountNumber: string;
|
|
6
|
+
routingNumber: string;
|
|
7
|
+
accountType: string;
|
|
8
|
+
streetAddress: string;
|
|
9
|
+
city: string;
|
|
10
|
+
state: string;
|
|
11
|
+
country: string;
|
|
12
|
+
postalCode: string;
|
|
13
|
+
}
|
|
14
|
+
export interface Props {
|
|
15
|
+
dataDemoMode?: boolean;
|
|
16
|
+
dataSubmitLabel?: string;
|
|
17
|
+
dataPlaid?: Record<string, unknown>;
|
|
18
|
+
forgetHidden?: boolean;
|
|
19
|
+
forgetDefault?: boolean;
|
|
20
|
+
authToken: string;
|
|
21
|
+
customerRef?: string;
|
|
22
|
+
dataBillingAddress?: PaymentMethodBillingAddress;
|
|
23
|
+
intent?: string;
|
|
24
|
+
merchantId?: string;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
27
|
+
dataDemoMode: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
dataSubmitLabel: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
dataPlaid: {
|
|
36
|
+
type: ObjectConstructor;
|
|
37
|
+
required: false;
|
|
38
|
+
};
|
|
39
|
+
forgetHidden: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
forgetDefault: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
authToken: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
customerRef: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
};
|
|
54
|
+
dataBillingAddress: {
|
|
55
|
+
type: PropType<PaymentMethodBillingAddress>;
|
|
56
|
+
required: false;
|
|
57
|
+
};
|
|
58
|
+
intent: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
required: false;
|
|
61
|
+
};
|
|
62
|
+
merchantId: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
};
|
|
65
|
+
variant: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
required: false;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
color: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
required: false;
|
|
73
|
+
};
|
|
74
|
+
borderRadius: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
required: false;
|
|
77
|
+
};
|
|
78
|
+
}>, {
|
|
79
|
+
accountTypes: {
|
|
80
|
+
savings: string;
|
|
81
|
+
checking: string;
|
|
82
|
+
};
|
|
83
|
+
fieldVariant: ComputedRef<string>;
|
|
84
|
+
fieldVariantSafe: ComputedRef<any>;
|
|
85
|
+
formData: P_ACHValues;
|
|
86
|
+
isWorking: Ref<boolean, boolean>;
|
|
87
|
+
isFormValid: ComputedRef<boolean>;
|
|
88
|
+
errorsType: Ref<{
|
|
89
|
+
other: string | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
other: string | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
computedSubmitLabel: ComputedRef<string>;
|
|
94
|
+
handleSubmit: () => Promise<void>;
|
|
95
|
+
isActiveTab: Ref<boolean, boolean>;
|
|
96
|
+
addButtonToggle: (value?: boolean) => void;
|
|
97
|
+
address: Ref<HTMLInputElement, HTMLInputElement>;
|
|
98
|
+
resetFormAddressData: () => void;
|
|
99
|
+
activeMerchant: ComputedRef<string | undefined>;
|
|
100
|
+
isPaymentMethodAdded: Ref<boolean, boolean>;
|
|
101
|
+
paymentMethodResponse: Ref<PaymentMethod | undefined, PaymentMethod | undefined>;
|
|
102
|
+
isAddressFieldDisabled: (fieldValue: string | undefined) => boolean;
|
|
103
|
+
azp: string;
|
|
104
|
+
handleAddressFormSubmit: (data: PaymentMethodBillingAddress) => void;
|
|
105
|
+
handleUpdateForgetCard: (_value: boolean) => void;
|
|
106
|
+
addressFormRef: Ref<any, any>;
|
|
107
|
+
formRef: Ref<any, any>;
|
|
108
|
+
streetAddress: string;
|
|
109
|
+
city: string;
|
|
110
|
+
state: string;
|
|
111
|
+
country: string;
|
|
112
|
+
postalCode: string;
|
|
113
|
+
googleMapsApiKey: string;
|
|
114
|
+
isAddressFormValid: (isValid: boolean) => void;
|
|
115
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("error" | "success" | "submit")[], "error" | "success" | "submit", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
116
|
+
dataDemoMode: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
120
|
+
dataSubmitLabel: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
124
|
+
dataPlaid: {
|
|
125
|
+
type: ObjectConstructor;
|
|
126
|
+
required: false;
|
|
127
|
+
};
|
|
128
|
+
forgetHidden: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
};
|
|
132
|
+
forgetDefault: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: boolean;
|
|
135
|
+
};
|
|
136
|
+
authToken: {
|
|
137
|
+
type: StringConstructor;
|
|
138
|
+
required: true;
|
|
139
|
+
};
|
|
140
|
+
customerRef: {
|
|
141
|
+
type: StringConstructor;
|
|
142
|
+
};
|
|
143
|
+
dataBillingAddress: {
|
|
144
|
+
type: PropType<PaymentMethodBillingAddress>;
|
|
145
|
+
required: false;
|
|
146
|
+
};
|
|
147
|
+
intent: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
required: false;
|
|
150
|
+
};
|
|
151
|
+
merchantId: {
|
|
152
|
+
type: StringConstructor;
|
|
153
|
+
};
|
|
154
|
+
variant: {
|
|
155
|
+
type: StringConstructor;
|
|
156
|
+
required: false;
|
|
157
|
+
default: string;
|
|
158
|
+
};
|
|
159
|
+
color: {
|
|
160
|
+
type: StringConstructor;
|
|
161
|
+
required: false;
|
|
162
|
+
};
|
|
163
|
+
borderRadius: {
|
|
164
|
+
type: StringConstructor;
|
|
165
|
+
required: false;
|
|
166
|
+
};
|
|
167
|
+
}>> & Readonly<{
|
|
168
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
169
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
170
|
+
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
171
|
+
}>, {
|
|
172
|
+
variant: string;
|
|
173
|
+
forgetDefault: boolean;
|
|
174
|
+
forgetHidden: boolean;
|
|
175
|
+
dataDemoMode: boolean;
|
|
176
|
+
dataSubmitLabel: string;
|
|
177
|
+
}, {}, {
|
|
178
|
+
AuthviaFormWithTerms: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
179
|
+
AuthviaForgotCardOption: import('vue').DefineComponent<import('./AuthviaForgotCardOption.vue').Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
180
|
+
"update:forgetCard": (value: boolean) => any;
|
|
181
|
+
}, string, import('vue').PublicProps, Readonly<import('./AuthviaForgotCardOption.vue').Props> & Readonly<{
|
|
182
|
+
"onUpdate:forgetCard"?: ((value: boolean) => any) | undefined;
|
|
183
|
+
}>, {
|
|
184
|
+
forgetDefault: boolean;
|
|
185
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
186
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
187
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
authToken: string;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
5
|
+
handleContinue: () => void;
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"close-ach-options": () => any;
|
|
8
|
+
"ach-option-select": () => any;
|
|
9
|
+
"get-plaid-data": (accountData: unknown) => any;
|
|
10
|
+
"plaid-initialize": () => any;
|
|
11
|
+
"plaid-exit": () => any;
|
|
12
|
+
"plaid-error": () => any;
|
|
13
|
+
"plaid-event": (eventName: unknown) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
15
|
+
"onClose-ach-options"?: (() => any) | undefined;
|
|
16
|
+
"onAch-option-select"?: (() => any) | undefined;
|
|
17
|
+
"onGet-plaid-data"?: ((accountData: unknown) => any) | undefined;
|
|
18
|
+
"onPlaid-initialize"?: (() => any) | undefined;
|
|
19
|
+
"onPlaid-exit"?: (() => any) | undefined;
|
|
20
|
+
"onPlaid-error"?: (() => any) | undefined;
|
|
21
|
+
"onPlaid-event"?: ((eventName: unknown) => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
|
+
plaidsdkRef: HTMLButtonElement;
|
|
24
|
+
}, any>;
|
|
25
|
+
export default _default;
|