ethercreative / web-payments

Web Payments for Craft Commerce
Other
5 stars 7 forks source link

Invalid value for PaymentRequest update() #5

Open DarrenLumber opened 4 years ago

DarrenLumber commented 4 years ago

Whilst attempting to update using window.payButton.refresh(); the JS console reports the following error:

1 Uncaught (in promise) IntegrationError: Invalid value for PaymentRequest update(): displayItems.1.amount should be an amount in the currency's subunit. You specified: 994.9999999999999.

I think the problem "item" is the shipping price which should be $9.95 and feels somewhat similar to issue #4

WebPayment 1.0.3 Craft Commerce 2.2.7 Craft CMS 3.3.15 PHP 7.3.1