richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
221 stars 75 forks source link

[BUG] Payment Request Button throws error in console #231

Closed yuriityrpych0611 closed 1 year ago

yuriityrpych0611 commented 1 year ago

Hello,

I have issues with ngx stripe request button that it asks about using paymentRequest.canMakePayment() before mounting the Element. And the same error comes in console on your official website where you show example of using

image
yuriityrpych0611 commented 1 year ago

I tried to call that paymentRequest.canMakePayment() but it shows that it is not avaiable

richnologies commented 1 year ago

Hey @yuriityrpych0611, can you provide a small snippet of code on what are you doing. That would help me to replicate faster. Also, please indicate what version of Angular, ngx-stripe and @stripe/stripe-js you're using

Thanks in advance

yuriityrpych0611 commented 1 year ago

Hey, I am using

 "@angular/common": "~15.2.0",
"@stripe/stripe-js": "1.54.1",
 "ngx-stripe": "^15.7.1".

In order to replicate that issue enough just to launch that code snippet from here.

Just to add this with default options

<ngx-stripe-payment-request-button
  [paymentOptions]="paymentRequestOptions"
  (paymentMethod)="onPaymentMethod($event)"
  (shippingaddresschange)="onShippingAddressChange($event)"
  (notavailable)="onNotAvailable()"
></ngx-stripe-payment-request-button>
richnologies commented 1 year ago

Hey @yuriityrpych0611, thanks for reporting this issue. I've release a new version 15.7.2 that should address that problem. Please let me know if that works for you, so I can publish the other Angular versions too

Thanks

yuriityrpych0611 commented 1 year ago

Hey, yes it resolved that error. Thank you