javascriptapplepayapplepayjs

How to change the displayed price format on ApplePayJS?


I'm working with ApplePayJS and would like to change the price format (e.g. 1,200.00 € instead of 1 200 € for example). I tried to edit the parameters of the completeShippingContactSelection method, trying to replace the newTotal.amount value since it was apparently accepting a string, but replacing that value by any other non-int value throws an (anonymous) error while trying to pay.

Is there a way to have a custom price format with ApplePayJS?


Solution

  • There is apparently no way to customise the price formatting for the user, the price format being defined by the language and locale defined on the device itself in the settings of the iOS or macOS device: enter image description here