- From: aestes <notifications@github.com>
- Date: Tue, 23 Jan 2018 09:12:08 -0800
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 23 January 2018 17:13:05 UTC
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