@rebilly/framepay-vue 1.1.6 → 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/README.md +66 -46
- package/dist/build.js +199 -14
- package/package.json +29 -20
package/README.md
CHANGED
|
@@ -4,53 +4,55 @@
|
|
|
4
4
|
|
|
5
5
|
Supported: Vue 2.4+
|
|
6
6
|
|
|
7
|
-
This is the repo for the official Vue.js wrapper for Rebilly's [FramePay](https://rebilly.
|
|
7
|
+
This is the repo for the official Vue.js wrapper for Rebilly's [FramePay](https://www.rebilly.com/docs/developer-docs/framepay/). This package provides a flexible set of methods and components to allow drop-in support of FramePay in any Vue 2.4+ project.
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
|
-
- [
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
17
|
-
|
|
18
|
-
- [
|
|
19
|
-
|
|
20
|
-
- [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- [
|
|
43
|
-
|
|
44
|
-
- [
|
|
45
|
-
- [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- [
|
|
10
|
+
- [framepay-vue](#framepay-vue)
|
|
11
|
+
- [Table of Contents](#table-of-contents)
|
|
12
|
+
- [FramePay Documentation](#framepay-documentation)
|
|
13
|
+
- [Demos](#demos)
|
|
14
|
+
- [Installation](#installation)
|
|
15
|
+
- [Getting Started](#getting-started)
|
|
16
|
+
- [Initialization](#initialization)
|
|
17
|
+
- [At startup](#at-startup)
|
|
18
|
+
- [On a component (rebilly-form, rebilly-card etc)](#on-a-component-rebilly-form-rebilly-card-etc)
|
|
19
|
+
- [Lazy loading Framepay files](#lazy-loading-framepay-files)
|
|
20
|
+
- [Usage](#usage)
|
|
21
|
+
- [Digital wallets](#digital-wallets)
|
|
22
|
+
- [With rebilly-form](#with-rebilly-form)
|
|
23
|
+
- [With rebilly-form and custom submit logic](#with-rebilly-form-and-custom-submit-logic)
|
|
24
|
+
- [With rebilly-token](#with-rebilly-token)
|
|
25
|
+
- [Handle token manually](#handle-token-manually)
|
|
26
|
+
- [Advanced Options](#advanced-options)
|
|
27
|
+
- [Multiple Payment Methods](#multiple-payment-methods)
|
|
28
|
+
- [v-if](#v-if)
|
|
29
|
+
- [v-show](#v-show)
|
|
30
|
+
- [Styling](#styling)
|
|
31
|
+
- [Built in Styling](#built-in-styling)
|
|
32
|
+
- [Custom Styling](#custom-styling)
|
|
33
|
+
- [Events](#events)
|
|
34
|
+
- [`rebilly-form`](#rebilly-form)
|
|
35
|
+
- [on payment method components](#on-payment-method-components)
|
|
36
|
+
- [Validation](#validation)
|
|
37
|
+
- [Element IDs](#element-ids)
|
|
38
|
+
- [Available Components and Methods](#available-components-and-methods)
|
|
39
|
+
- [Methods](#methods)
|
|
40
|
+
- [`createToken` Proxy Method](#createtoken-proxy-method)
|
|
41
|
+
- [The `Rebilly` Object](#the-rebilly-object)
|
|
42
|
+
- [Components](#components)
|
|
43
|
+
- [`RebillyForm`](#rebillyform)
|
|
44
|
+
- [`RebillyToken`](#rebillytoken)
|
|
45
|
+
- [Payment Method Components](#payment-method-components)
|
|
46
|
+
- [Combined Credit Card field](#combined-credit-card-field)
|
|
47
|
+
- [Separate Credit Card fields](#separate-credit-card-fields)
|
|
48
|
+
- [Separate Bank Account fields](#separate-bank-account-fields)
|
|
49
|
+
- [IBAN (International Bank Account Number) field](#iban-international-bank-account-number-field)
|
|
50
|
+
- [Props](#props)
|
|
51
|
+
- [Further Reading](#further-reading)
|
|
50
52
|
|
|
51
53
|
## FramePay Documentation
|
|
52
54
|
|
|
53
|
-
For more information on FramePay see its [official documentation](https://rebilly.
|
|
55
|
+
For more information on FramePay see its [official documentation](https://www.rebilly.com/docs/developer-docs/framepay/).
|
|
54
56
|
|
|
55
57
|
## Demos
|
|
56
58
|
- [Basic card example](https://codesandbox.io/s/framepay-vue-basic-card-example-ydr7s)
|
|
@@ -161,20 +163,36 @@ The script will only be loaded the first time `created()` is called, so you can
|
|
|
161
163
|
`framepay-vue` offers three sets of payment method components:
|
|
162
164
|
|
|
163
165
|
- `RebillyCard` automatically mounts the combined credit card payment method
|
|
164
|
-
- `RebillyCardCvv`, `
|
|
166
|
+
- `RebillyCardCvv`, `RebillycardExpiration`, and `RebillyCardNumber` mount three separate components for collecting credit info
|
|
165
167
|
- `RebillyBankAccountNumber`, `RebillyBankAccountType`, and `RebillyBankRoutingNumber` mount the `ach` (bank account) payment method
|
|
168
|
+
- `RebillyDigitalWallet` and `RebillyApplePay` mount Google Pay and Apple Pay respectively. These two methods are different from the rest, as they require additional inputs and emit the payment token with a separate event.
|
|
166
169
|
|
|
167
170
|
Two more components are also offered for convenience:
|
|
168
171
|
|
|
169
172
|
- `RebillyForm` wraps a regular HTML `form`. It automatically detects payment method components and performs token creation/injection when the form is submitted. It is the simplest way to get started with `framepay-vue`.
|
|
170
173
|
- `RebillyToken` can be added to any standard form, and when present will automatically receive the token created by `createToken()`. You do not need to use `RebillyToken` if you are using `RebillyForm` already.
|
|
171
174
|
|
|
175
|
+
#### Digital wallets
|
|
176
|
+
`RebillyDigitaWallet` and `RebillyApplePay` are used like so:
|
|
177
|
+
```html
|
|
178
|
+
<rebilly-apple-pay
|
|
179
|
+
:form="form"
|
|
180
|
+
:extraData="extraData"
|
|
181
|
+
@token-ready="handleToken"
|
|
182
|
+
/>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
whereas:
|
|
186
|
+
* `:form` is the DOM element of your payment form (this does not need to be `<rebilly-form>`, it could be any DOM element).
|
|
187
|
+
* `:extraData` is an object containing any additional information you'd like to supply for the token creation.
|
|
188
|
+
* `@token-ready` is an event emitted once the payment token has been generated and its payload contains the token object.
|
|
189
|
+
|
|
172
190
|
#### With rebilly-form
|
|
173
191
|
|
|
174
192
|
The default behavior of `RebillyForm` is to intercept the regular submit event, execute `Rebilly.createToken()`, and then submit the form with the newly created token attached. Any inputs that include `data-rebilly` attribute with the appropriate value will be sent to `Rebilly.createToken()`.
|
|
175
193
|
|
|
176
194
|
```html
|
|
177
|
-
<rebilly-form @error="" :extraData="{}">
|
|
195
|
+
<rebilly-form @error="" @token-ready="" :extraData="{}">
|
|
178
196
|
<input data-rebilly="firstName">
|
|
179
197
|
<input data-rebilly="lastName">
|
|
180
198
|
<rebilly-card></rebilly-card>
|
|
@@ -195,6 +213,8 @@ Any DOM attributes you attach to `RebillyForm` will automatically be passed to t
|
|
|
195
213
|
|
|
196
214
|
`@error` will expose the error message returned if the `Rebilly.createToken()` request failed. You can inspect `error.message` and `error.code`.
|
|
197
215
|
|
|
216
|
+
`@token-ready` will expose the token object, if a digital wallet element was mounted in the form.
|
|
217
|
+
|
|
198
218
|
See here for all arguments to `extraData`: https://rebilly.github.io/framepay-docs/reference/rebilly.html#extra-data.
|
|
199
219
|
|
|
200
220
|
See here for list of `data-rebilly` types: https://rebilly.github.io/framepay-docs/reference/rebilly.html#data-rebilly-fields.
|
|
@@ -466,14 +486,14 @@ These components handle the mount/unmount lifecycle of a Framepay field, and can
|
|
|
466
486
|
|
|
467
487
|
##### Combined Credit Card field
|
|
468
488
|
|
|
469
|
-
- `RebillyCard` - mounts a combined payment card field for card number, CVV and
|
|
489
|
+
- `RebillyCard` - mounts a combined payment card field for card number, CVV and expiration
|
|
470
490
|
|
|
471
491
|
##### Separate Credit Card fields
|
|
472
492
|
|
|
473
493
|
These elements must all be mounted in the same form in order to successfully create a token.
|
|
474
494
|
|
|
475
495
|
- `RebillyCardCvv` - mounts a CVV field
|
|
476
|
-
- `
|
|
496
|
+
- `RebillycardExpiration` - mounts a credit card expiration field
|
|
477
497
|
- `RebillyCardNumber` - mounts a credit card number field
|
|
478
498
|
|
|
479
499
|
##### Separate Bank Account fields
|
package/dist/build.js
CHANGED
|
@@ -110,7 +110,9 @@ function initializeRebilly () {
|
|
|
110
110
|
Rebilly.initialize(configuration);
|
|
111
111
|
}
|
|
112
112
|
} catch (e) {
|
|
113
|
-
throw new InitializeError(
|
|
113
|
+
throw new InitializeError({
|
|
114
|
+
details: e
|
|
115
|
+
});
|
|
114
116
|
}
|
|
115
117
|
});
|
|
116
118
|
});
|
|
@@ -121,11 +123,13 @@ function initializeRebilly () {
|
|
|
121
123
|
var REBILLY_CARD = 'card';
|
|
122
124
|
var REBILLY_CARD_CVV = 'cardCvv';
|
|
123
125
|
var REBILLY_CARD_NUMBER = 'cardNumber';
|
|
124
|
-
var REBILLY_CARD_EXPIRATION = '
|
|
126
|
+
var REBILLY_CARD_EXPIRATION = 'cardExpiration';
|
|
125
127
|
var REBILLY_BBAN_ACCOUNT_TYPE = 'accountType';
|
|
126
128
|
var REBILLY_BBAN_ROUTING_NUMBER = 'routingNumber';
|
|
127
129
|
var REBILLY_BBAN_ACCOUNT_NUMBER = 'accountNumber';
|
|
128
130
|
var REBILLY_IBAN = 'iban';
|
|
131
|
+
var REBILLY_DIGITAL_WALLET = 'digitalWallet';
|
|
132
|
+
var REBILLY_APPLE_PAY = 'applePay';
|
|
129
133
|
var FIELD_TYPES = {
|
|
130
134
|
REBILLY_CARD: REBILLY_CARD,
|
|
131
135
|
REBILLY_CARD_CVV: REBILLY_CARD_CVV,
|
|
@@ -134,7 +138,9 @@ var FIELD_TYPES = {
|
|
|
134
138
|
REBILLY_BBAN_ACCOUNT_TYPE: REBILLY_BBAN_ACCOUNT_TYPE,
|
|
135
139
|
REBILLY_BBAN_ROUTING_NUMBER: REBILLY_BBAN_ROUTING_NUMBER,
|
|
136
140
|
REBILLY_BBAN_ACCOUNT_NUMBER: REBILLY_BBAN_ACCOUNT_NUMBER,
|
|
137
|
-
REBILLY_IBAN: REBILLY_IBAN
|
|
141
|
+
REBILLY_IBAN: REBILLY_IBAN,
|
|
142
|
+
REBILLY_DIGITAL_WALLET: REBILLY_DIGITAL_WALLET,
|
|
143
|
+
REBILLY_APPLE_PAY: REBILLY_APPLE_PAY
|
|
138
144
|
};
|
|
139
145
|
|
|
140
146
|
function createToken (form, extraData) {
|
|
@@ -183,13 +189,13 @@ function _objectSpread2(target) {
|
|
|
183
189
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
184
190
|
|
|
185
191
|
if (i % 2) {
|
|
186
|
-
ownKeys(source, true).forEach(function (key) {
|
|
192
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
|
187
193
|
_defineProperty(target, key, source[key]);
|
|
188
194
|
});
|
|
189
195
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
190
196
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
191
197
|
} else {
|
|
192
|
-
ownKeys(source).forEach(function (key) {
|
|
198
|
+
ownKeys(Object(source)).forEach(function (key) {
|
|
193
199
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
194
200
|
});
|
|
195
201
|
}
|
|
@@ -297,8 +303,8 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
|
|
|
297
303
|
|
|
298
304
|
options._ssrRegister = hook;
|
|
299
305
|
} else if (style) {
|
|
300
|
-
hook = shadowMode ? function () {
|
|
301
|
-
style.call(this, createInjectorShadow(this.$root.$options.shadowRoot));
|
|
306
|
+
hook = shadowMode ? function (context) {
|
|
307
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
302
308
|
} : function (context) {
|
|
303
309
|
style.call(this, createInjector(context));
|
|
304
310
|
};
|
|
@@ -323,8 +329,6 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
|
|
|
323
329
|
return script;
|
|
324
330
|
}
|
|
325
331
|
|
|
326
|
-
var normalizeComponent_1 = normalizeComponent;
|
|
327
|
-
|
|
328
332
|
/* script */
|
|
329
333
|
const __vue_script__ = script;
|
|
330
334
|
|
|
@@ -355,15 +359,19 @@ __vue_render__._withStripped = true;
|
|
|
355
359
|
|
|
356
360
|
/* style inject SSR */
|
|
357
361
|
|
|
362
|
+
/* style inject shadow dom */
|
|
363
|
+
|
|
358
364
|
|
|
359
365
|
|
|
360
|
-
|
|
366
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
361
367
|
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
362
368
|
__vue_inject_styles__,
|
|
363
369
|
__vue_script__,
|
|
364
370
|
__vue_scope_id__,
|
|
365
371
|
__vue_is_functional_template__,
|
|
366
372
|
__vue_module_identifier__,
|
|
373
|
+
false,
|
|
374
|
+
undefined,
|
|
367
375
|
undefined,
|
|
368
376
|
undefined
|
|
369
377
|
);
|
|
@@ -406,20 +414,23 @@ __vue_render__$1._withStripped = true;
|
|
|
406
414
|
|
|
407
415
|
/* style inject SSR */
|
|
408
416
|
|
|
417
|
+
/* style inject shadow dom */
|
|
418
|
+
|
|
409
419
|
|
|
410
420
|
|
|
411
|
-
|
|
421
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
412
422
|
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
413
423
|
__vue_inject_styles__$1,
|
|
414
424
|
__vue_script__$1,
|
|
415
425
|
__vue_scope_id__$1,
|
|
416
426
|
__vue_is_functional_template__$1,
|
|
417
427
|
__vue_module_identifier__$1,
|
|
428
|
+
false,
|
|
429
|
+
undefined,
|
|
418
430
|
undefined,
|
|
419
431
|
undefined
|
|
420
432
|
);
|
|
421
433
|
|
|
422
|
-
/* eslint-disable func-names */
|
|
423
434
|
var BaseElementMixin = {
|
|
424
435
|
render: function render(createElement) {
|
|
425
436
|
return createElement('div', {
|
|
@@ -485,6 +496,162 @@ var BaseElementMixin = {
|
|
|
485
496
|
}
|
|
486
497
|
};
|
|
487
498
|
|
|
499
|
+
var DigitalWalletMixin = {
|
|
500
|
+
render: function render(createElement) {
|
|
501
|
+
return createElement('div', {
|
|
502
|
+
domProps: {
|
|
503
|
+
id: this.mountId
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
},
|
|
507
|
+
props: {
|
|
508
|
+
id: {
|
|
509
|
+
type: String
|
|
510
|
+
},
|
|
511
|
+
configuration: {},
|
|
512
|
+
form: {},
|
|
513
|
+
extraData: {}
|
|
514
|
+
},
|
|
515
|
+
data: function data() {
|
|
516
|
+
return {
|
|
517
|
+
element: null,
|
|
518
|
+
mountId: this.id ? this.id : "".concat(this.$options.name, "-mount")
|
|
519
|
+
};
|
|
520
|
+
},
|
|
521
|
+
methods: {
|
|
522
|
+
mountElement: function mountElement(selector) {
|
|
523
|
+
var _this = this;
|
|
524
|
+
|
|
525
|
+
initializeRebilly(this.configuration).then(function (Rebilly) {
|
|
526
|
+
try {
|
|
527
|
+
var form = document.getElementById('rebilly-form') || _this.form;
|
|
528
|
+
|
|
529
|
+
if (_this.elementType === 'digitalWallet') {
|
|
530
|
+
_this.element = Rebilly.digitalWallet.mount(selector, {
|
|
531
|
+
type: 'googlePay',
|
|
532
|
+
form: form,
|
|
533
|
+
extraData: _this.extraData
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
_this.element.on('ready', function () {
|
|
537
|
+
return _this.$emit('ready');
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
_this.element.on('change', function (e) {
|
|
541
|
+
return _this.$emit('change', e);
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
_this.element.on('focus', function () {
|
|
545
|
+
return _this.$emit('focus');
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
_this.element.on('blur', function () {
|
|
549
|
+
return _this.$emit('blur');
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
_this.element.on('error', function () {
|
|
553
|
+
return _this.$emit('error');
|
|
554
|
+
});
|
|
555
|
+
} else if (_this.elementType === 'applePay') {
|
|
556
|
+
_this.element = Rebilly.applePay.mount(selector, {
|
|
557
|
+
form: form,
|
|
558
|
+
extraData: _this.extraData
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
Rebilly.on('token-ready', function (token) {
|
|
563
|
+
// https://github.com/vuejs/vue/issues/4332#issuecomment-263444492
|
|
564
|
+
// Emit token on the element level:
|
|
565
|
+
_this.$emit('token-ready', token); // Emit token on the RebillyForm level:
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
_this.$parent.$emit('token-ready', token);
|
|
569
|
+
});
|
|
570
|
+
} catch (e) {
|
|
571
|
+
throw new MountError({
|
|
572
|
+
details: e
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
watch: {
|
|
579
|
+
configuration: function configuration(value) {
|
|
580
|
+
if (value) {
|
|
581
|
+
updateConfig(value);
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
created: function created() {
|
|
586
|
+
this.mountElement("#".concat(this.mountId));
|
|
587
|
+
},
|
|
588
|
+
beforeDestroy: function beforeDestroy() {
|
|
589
|
+
if (this.element) {
|
|
590
|
+
this.element.destroy();
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
var ApplePayMixin = {
|
|
596
|
+
render: function render(createElement) {
|
|
597
|
+
return createElement('div', {
|
|
598
|
+
domProps: {
|
|
599
|
+
id: this.mountId
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
},
|
|
603
|
+
props: {
|
|
604
|
+
id: {
|
|
605
|
+
type: String
|
|
606
|
+
},
|
|
607
|
+
configuration: {}
|
|
608
|
+
},
|
|
609
|
+
data: function data() {
|
|
610
|
+
return {
|
|
611
|
+
element: null,
|
|
612
|
+
mountId: this.id ? this.id : "".concat(this.$options.name, "-mount")
|
|
613
|
+
};
|
|
614
|
+
},
|
|
615
|
+
methods: {
|
|
616
|
+
mountElement: function mountElement(selector) {
|
|
617
|
+
var _this = this;
|
|
618
|
+
|
|
619
|
+
initializeRebilly(this.configuration).then(function (Rebilly) {
|
|
620
|
+
try {
|
|
621
|
+
_this.element = Rebilly.applePay.mount(selector);
|
|
622
|
+
Rebilly.on('token-ready', function (token) {
|
|
623
|
+
// https://github.com/vuejs/vue/issues/4332#issuecomment-263444492
|
|
624
|
+
// Emit token on the element level:
|
|
625
|
+
_this.$emit('token-ready', token); // Emit token on the RebillyForm level:
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
_this.$parent.$emit('token-ready', token);
|
|
629
|
+
});
|
|
630
|
+
} catch (e) {
|
|
631
|
+
throw new MountError({
|
|
632
|
+
details: e
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
watch: {
|
|
639
|
+
configuration: function configuration(value) {
|
|
640
|
+
if (value) {
|
|
641
|
+
updateConfig(value);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
created: function created() {
|
|
646
|
+
this.mountElement("#".concat(this.mountId));
|
|
647
|
+
},
|
|
648
|
+
beforeDestroy: function beforeDestroy() {
|
|
649
|
+
if (this.element) {
|
|
650
|
+
this.element.destroy();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
|
|
488
655
|
var RebillyCard = {
|
|
489
656
|
name: 'rebilly-card',
|
|
490
657
|
data: function data() {
|
|
@@ -504,7 +671,7 @@ var RebillyCardCvv = {
|
|
|
504
671
|
mixins: [BaseElementMixin]
|
|
505
672
|
};
|
|
506
673
|
var RebillyCardExpiration = {
|
|
507
|
-
name: 'rebilly-card-
|
|
674
|
+
name: 'rebilly-card-expiration',
|
|
508
675
|
data: function data() {
|
|
509
676
|
return {
|
|
510
677
|
elementType: FIELD_TYPES.REBILLY_CARD_EXPIRATION
|
|
@@ -557,6 +724,24 @@ var RebillyIban = {
|
|
|
557
724
|
},
|
|
558
725
|
mixins: [BaseElementMixin]
|
|
559
726
|
};
|
|
727
|
+
var RebillyDigitalWallet = {
|
|
728
|
+
name: 'rebilly-digital-wallet',
|
|
729
|
+
data: function data() {
|
|
730
|
+
return {
|
|
731
|
+
elementType: FIELD_TYPES.REBILLY_DIGITAL_WALLET
|
|
732
|
+
};
|
|
733
|
+
},
|
|
734
|
+
mixins: [DigitalWalletMixin]
|
|
735
|
+
};
|
|
736
|
+
var RebillyApplePay = {
|
|
737
|
+
name: 'rebilly-apple-pay',
|
|
738
|
+
data: function data() {
|
|
739
|
+
return {
|
|
740
|
+
elementType: FIELD_TYPES.REBILLY_APPLE_PAY
|
|
741
|
+
};
|
|
742
|
+
},
|
|
743
|
+
mixins: [ApplePayMixin]
|
|
744
|
+
};
|
|
560
745
|
|
|
561
746
|
var FramePay = {
|
|
562
747
|
install: function install(Vue) {
|
|
@@ -567,4 +752,4 @@ var FramePay = {
|
|
|
567
752
|
};
|
|
568
753
|
|
|
569
754
|
export default FramePay;
|
|
570
|
-
export { RebillyBbanAccountNumber, RebillyBbanAccountType, RebillyBbanRoutingNumber, RebillyCard, RebillyCardCvv, RebillyCardExpiration, RebillyCardNumber, FIELD_TYPES as RebillyFieldTypes, RebillyForm, RebillyIban, RebillyToken, createToken, updateConfig };
|
|
755
|
+
export { RebillyApplePay, RebillyBbanAccountNumber, RebillyBbanAccountType, RebillyBbanRoutingNumber, RebillyCard, RebillyCardCvv, RebillyCardExpiration, RebillyCardNumber, RebillyDigitalWallet, FIELD_TYPES as RebillyFieldTypes, __vue_component__ as RebillyForm, RebillyIban, __vue_component__$1 as RebillyToken, createToken, updateConfig };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebilly/framepay-vue",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Official Vue wrapper for Rebilly
|
|
5
|
-
"author": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Official Vue wrapper for Rebilly FramePay",
|
|
5
|
+
"author": "Rebilly",
|
|
6
6
|
"repository": "https://github.com/Rebilly/framepay-vue",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/build.js",
|
|
@@ -18,37 +18,44 @@
|
|
|
18
18
|
"framepay-vue"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"serve": "cd ./dev-app && vue-cli-service serve",
|
|
22
21
|
"build": "rollup -c",
|
|
22
|
+
"cypress:headless": "cypress run",
|
|
23
|
+
"cypress:gui": "cypress open",
|
|
23
24
|
"lint": "vue-cli-service lint",
|
|
24
|
-
"
|
|
25
|
-
"test
|
|
25
|
+
"serve": "cd ./dev-app && vue-cli-service serve",
|
|
26
|
+
"test": "run-s test:unit test:e2e",
|
|
27
|
+
"test:e2e": "run-p -r serve cypress:headless",
|
|
28
|
+
"test:e2e:gui": "run-p -r serve cypress:gui",
|
|
26
29
|
"test:unit": "vue-cli-service test:unit"
|
|
27
30
|
},
|
|
28
31
|
"peerDependencies": {
|
|
29
32
|
"vue": "^2.4.0"
|
|
30
33
|
},
|
|
31
34
|
"dependencies": {
|
|
32
|
-
"core-js": "^
|
|
35
|
+
"core-js": "^3.8.0",
|
|
33
36
|
"dotenv": "^8.0.0"
|
|
34
37
|
},
|
|
35
38
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@vue/cli-plugin-
|
|
38
|
-
"@vue/cli-plugin-eslint": "^
|
|
39
|
-
"@vue/cli-plugin-unit-jest": "^
|
|
40
|
-
"@vue/cli-service": "^
|
|
41
|
-
"@vue/eslint-config-airbnb": "^
|
|
42
|
-
"@vue/test-utils": "1.
|
|
39
|
+
"@testing-library/cypress": "^7.0.2",
|
|
40
|
+
"@vue/cli-plugin-babel": "^4.5.9",
|
|
41
|
+
"@vue/cli-plugin-eslint": "^4.5.9",
|
|
42
|
+
"@vue/cli-plugin-unit-jest": "^4.5.9",
|
|
43
|
+
"@vue/cli-service": "^4.5.9",
|
|
44
|
+
"@vue/eslint-config-airbnb": "^5.1.0",
|
|
45
|
+
"@vue/test-utils": "^1.1.1",
|
|
43
46
|
"babel-core": "7.0.0-bridge.0",
|
|
44
47
|
"babel-eslint": "^10.0.1",
|
|
45
|
-
"babel-jest": "^
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
48
|
+
"babel-jest": "^26.6.3",
|
|
49
|
+
"cypress": "^6.0.1",
|
|
50
|
+
"cypress-iframe": "^1.0.1",
|
|
51
|
+
"eslint": "^7.14.0",
|
|
52
|
+
"eslint-plugin-cypress": "^2.11.2",
|
|
53
|
+
"eslint-plugin-vue": "^7.1.0",
|
|
54
|
+
"npm-run-all": "^4.1.5",
|
|
55
|
+
"rollup": "^2.33.3",
|
|
49
56
|
"rollup-plugin-babel": "^4.3.2",
|
|
50
57
|
"rollup-plugin-commonjs": "^10.0.0",
|
|
51
|
-
"rollup-plugin-vue": "^5.
|
|
58
|
+
"rollup-plugin-vue": "^5.1.9",
|
|
52
59
|
"vue": "^2.4.0",
|
|
53
60
|
"vue-template-compiler": "^2.5.21"
|
|
54
61
|
},
|
|
@@ -59,13 +66,15 @@
|
|
|
59
66
|
},
|
|
60
67
|
"extends": [
|
|
61
68
|
"plugin:vue/essential",
|
|
69
|
+
"plugin:cypress/recommended",
|
|
62
70
|
"@vue/airbnb"
|
|
63
71
|
],
|
|
64
72
|
"rules": {
|
|
65
73
|
"indent": [
|
|
66
74
|
"error",
|
|
67
75
|
4
|
|
68
|
-
]
|
|
76
|
+
],
|
|
77
|
+
"func-names": "off"
|
|
69
78
|
},
|
|
70
79
|
"parserOptions": {
|
|
71
80
|
"parser": "babel-eslint"
|