Re: [w3c/payment-request] redact full shipping address from event until payment response (#648)

You'd need to wait for [onpaymentauthorized](https://developer.apple.com/documentation/applepayjs/applepaysession/1778020-onpaymentauthorized) then do something like this:

```
session.onpaymentauthorized = (event) => {
    if (isPOBox(event.payment.shippingContact))
        session.completePayment(STATUS_FAILURE, [ new ApplePayError('shippingContactInvalid', 'addressLines', 'Cannot ship to P.O. boxes') ]);
};
```

The user would be prompted to correct the shipping address and retry the payment.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/648#issuecomment-359861956

Received on Tuesday, 23 January 2018 17:13:05 UTC