richnologies / ngx-stripe

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

Cant import #7

Closed einewton closed 7 years ago

einewton commented 7 years ago

I get this error following your instruction...

When I add this line I get the error: NgxStripeModule.forRoot({       apiKey: 'your-stripe-publishable key'     }),

Error: Error TS2345 (TS) Argument of type '{ apiKey: string; }' is not assignable to parameter of type 'string'.

Please help. I am using Angular 4.4.4 with angular-cli

richnologies commented 7 years ago

Sorrry, docs were wrong. No need for the object, just pass the apiKey directly to the forRoot method.

I update the readme, so you can check it there

einewton commented 7 years ago

Thank you so much for your support on this. Please also update npmjs as that is where I originally got your example.