@motopays/pay-form 2.6.6 → 2.6.7-rc.2
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/CHANGELOG.md +12 -0
- package/README.md +8 -1
- package/index.d.ts +5 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.7-rc.2
|
|
4
|
+
### Added
|
|
5
|
+
- New analytics event `pay-validation-error` emitted when the user attempts to pay but the form is invalid.
|
|
6
|
+
- Fired when the `Pay` button is clicked while card requisites are invalid.
|
|
7
|
+
- Fired when the Apple Pay or Google Pay button is clicked while the form is not payable.
|
|
8
|
+
- Payload `IPayValidationErrorAnalytics`:
|
|
9
|
+
- `button`: `'pay' | 'applepay' | 'googlepay'`
|
|
10
|
+
- `invalidComponents`: `string[]` — keys of enabled components that are not filled or not valid.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
3
15
|
## 2.6.6
|
|
4
16
|
### Added
|
|
5
17
|
- Redesign of cvv input on card verification, card selection dropdown instead of list, confirmation dialog on card removal
|
package/README.md
CHANGED
|
@@ -571,6 +571,7 @@ For receiving analytics listen analyticsTracked events.
|
|
|
571
571
|
'apms-show-button-click' - the apm collapse text has been clicked. Payload: ICardAnalytics.<br>
|
|
572
572
|
'master-click' - the master checkbox has been clicked. <br>
|
|
573
573
|
'master-focus' - the master checkbox has been clicked. <br>
|
|
574
|
+
'pay-validation-error' - the payment was attempted but validation failed. Emitted when the 'Pay' button is clicked while card requisites are invalid, or when an Apple Pay / Google Pay button is clicked while the form is not payable. Payload: IPayValidationErrorAnalytics.<br>
|
|
574
575
|
|
|
575
576
|
Examples of dynamic event types (number inserting):
|
|
576
577
|
 1. Example of the first checkbox: 'charge-term-checkbox-0-check'
|
|
@@ -625,7 +626,8 @@ type TAnalyticsServiceAction =
|
|
|
625
626
|
| ServiceAction<'cards-toggle-button-click', ICardListAnalytics>
|
|
626
627
|
| ServiceAction<'remove-card-button-click', ICardAnalytics>
|
|
627
628
|
| ServiceAction<'select-card-button-click', ICardAnalytics>
|
|
628
|
-
| ServiceAction<'apms-show-button-click', ICardAnalytics
|
|
629
|
+
| ServiceAction<'apms-show-button-click', ICardAnalytics>
|
|
630
|
+
| ServiceAction<'pay-validation-error', IPayValidationErrorAnalytics>;
|
|
629
631
|
|
|
630
632
|
|
|
631
633
|
//payload types
|
|
@@ -645,6 +647,11 @@ interface IUserPreferencesAnalytics {
|
|
|
645
647
|
name: string;
|
|
646
648
|
text: string;
|
|
647
649
|
}
|
|
650
|
+
|
|
651
|
+
interface IPayValidationErrorAnalytics {
|
|
652
|
+
button: string; // 'pay' | 'applepay' | 'googlepay'
|
|
653
|
+
invalidComponents: string[]; // keys of components that are enabled but not filled or not valid
|
|
654
|
+
}
|
|
648
655
|
```
|
|
649
656
|
|
|
650
657
|
### Linkify
|
package/index.d.ts
CHANGED
|
@@ -347,7 +347,11 @@ export interface IUserPreferencesAnalytics {
|
|
|
347
347
|
name: string;
|
|
348
348
|
text: string;
|
|
349
349
|
}
|
|
350
|
-
export
|
|
350
|
+
export interface IPayValidationErrorAnalytics {
|
|
351
|
+
button: string;
|
|
352
|
+
invalidComponents: string[];
|
|
353
|
+
}
|
|
354
|
+
export type TAnalyticsServiceAction = ServiceAction<"init-start"> | ServiceAction<"loading-finish"> | ServiceAction<"card-number-field-focus"> | ServiceAction<"expiration-date-field-focus"> | ServiceAction<"cvv-field-focus"> | ServiceAction<"card-holder-field-focus"> | ServiceAction<"number-field-focus"> | ServiceAction<"master-click"> | ServiceAction<"master-focus"> | ServiceAction<`charge-term-checkbox${`-${number}`}-focus`, IChargeTermsAnalytics> | ServiceAction<`charge-term-checkbox${`-${number}`}-check`, IChargeTermsAnalytics> | ServiceAction<`charge-term-checkbox${`-${number}`}-uncheck`, IChargeTermsAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-focus`, IUserPreferencesAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-check`, IUserPreferencesAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-uncheck`, IUserPreferencesAnalytics> | ServiceAction<"pay-button-focus"> | ServiceAction<"pay-button-click"> | ServiceAction<`${string}-button-focus`> | ServiceAction<`${string}-button-click`> | ServiceAction<"add-card-button-focus"> | ServiceAction<"add-card-button-click"> | ServiceAction<"card-options-button-click", ICardAnalytics> | ServiceAction<"cards-toggle-button-click", ICardListAnalytics> | ServiceAction<"remove-card-button-click", ICardAnalytics> | ServiceAction<"select-card-button-click", ICardAnalytics> | ServiceAction<"apms-show-button-click", ICardAnalytics> | ServiceAction<"pay-validation-error", IPayValidationErrorAnalytics>;
|
|
351
355
|
export interface IApmsShowAnalytics {
|
|
352
356
|
show: boolean;
|
|
353
357
|
}
|