richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
219 stars 77 forks source link

Unrecognized create() parameter #132

Closed elfoxus closed 2 years ago

elfoxus commented 3 years ago

Hi, I am currently on version 11. I have some problem with creating stripe card components(number, expiry date, cvc). What I see in console is message Unrecognized create() parameter: classes.webkitAutoFill is not recognized parameter. (..). What can I do with this problem? Thanks.

richnologies commented 3 years ago

Hi @elfoxus,

Happy to help you, but I'm going to need more info on how are you creating and mounting your elements in order to be able to reproduce the issue. For example, here is a Stackblitz instance running a very simple card that just creates a token:

https://stackblitz.com/edit/ngx-stripe-issue-132?devtoolsheight=33&file=src/app/app.component.ts

Maybe you can fork it and make some changes so it's similar to what you have. Minimal example that causes the error would great.

Thanks,

R

elfoxus commented 3 years ago

First of all, thank you for quick reponse.

What I am about is this fragment of code:

    classes: {
      webkitAutofill: 'StripeElement--webkit-autofill'
    },
    style: {
      base: {
        iconColor: '#666EE8',
        color: '#31325F',
        fontWeight: '300',
        fontFamily: '"Helvetica Neue", Helvetica, sans-serif',
        fontSize: '18px',
        '::placeholder': {
          color: '#CFD7E0'
        }
      }
    }
  };

I did not provide this, so I see some error in console

classes: {
      webkitAutofill: 'StripeElement--webkit-autofill'
    },

But still where is this class coming from? I am missing something here.

richnologies commented 3 years ago

My fault, I just put that code because I thought you had. This options come from here:

https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-classes-webkitAutofill

You can add specific classes but is no necessary. If you check that stackblitz like again, you'll see I've removed that class and still no console errors

elfoxus commented 3 years ago

I see. I'm almost done doing my example, I will provide it in few minutes.

elfoxus commented 3 years ago

https://stackblitz.com/edit/ngx-stripe-issue-132-expnpx?file=src/app/app.component.ts

I would be glad if you could take a look