Trying to implement ApplePay for Web using ApplePay.js. If the user enters an invalid shipping address, I'd like to highlight an error on the paysheet so that the user has a chance to correct the issue. I see there is an ApplePayError class here: https://developer.apple.com/documentation/applepayjs/applepayerror, however I have no idea how to utilize this class. I've tried this with no luck:
var err = new ApplePayError("shippingContactInvalid", "postalAddress", "Address is invalid");
Is this even right? It doesn't display any error on the paysheet so I think it's wrong but I don't know how to do this and I can't seem to find any information about it's usage. Can someone point me in the right direction here?