richnologies / ngx-stripe

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

Can't omit "Element" from handleCardPayment() #72

Closed SUVOLewis closed 5 years ago

SUVOLewis commented 5 years ago

Running on an Angular 7 project with ngx-stripe version "^7.4.2".

What I'm trying to do: Pass the client secret from a constructed PaymentIntent from my server along with the user's default payment source into "handleCardPayment()". This means that I am passing in the secret, NO element, and the HandleCardPaymentOptions.

For some reason, the options object are being read-in as an "Element"

image

However, it does work if I call .stripe on the stripe service, so using "this.stripeService.stripe.handleCardPayment(secret, options)". This works as expected.

Is there a reason I can't pass in just the secret and the options when calling handleCardPayment() on the service? I'm unsure if this is intentional or a bug.

Thanks in advance!

nickdnk commented 5 years ago

Fixed in 7.4.3.