Open imme64 opened 6 years ago
Same for me
same here: Uncaught (in promise): TypeError: Payment.fns.restrictNumeric is not a function
Any fix or PR for this could be appreciated
I found the issue in the code:
directives/cc-cvc-format.directive.ts:
change this:
Payment.fns.formatCardCVC(element);
Payment.fns.restrictNumeric(element);
for:
Payment.formatCardCVC(element);
Payment.restrictNumeric(element);
directives/cc-expiry-format.directive.ts:
change:
Payment.fns.formatCardExpiry(element);
Payment.fns.restrictNumeric(element);
for this:
Payment.formatCardExpiry(element);
Payment.restrictNumeric(element);
directives/cc-number-format.directive.ts:
change:
Payment.fns.restrictNumeric(element);
for this:
Payment.restrictNumeric(element);
this should fixed all the issues. I haven't fully tested everything, but taking a look to the payment library, some of the functions are inside the fns
property and some other are not. Please create a PR with this fix right away.
I could only use your great directives by adding the following code to my project:
Somehow the 'payment' dependency seems to have changed. Otherwise I cannot explain why it does work for you but not for me.