w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
489 stars 135 forks source link

PaymentDetailsUpdate needs to include payerErrors #766

Closed marcoscaceres closed 5 years ago

marcoscaceres commented 6 years ago

There is bug in the current spec, whereby merchant can't signal payer-related fixes via updateWith():

// user tries to fix email
response.onpayerdetailschange = ev => {
   if (!isValidPayerDetails(response)) {
       const payerErrors = getPayerErrors(response);
       // Oh wooops, `payerErrors` doesn't exist on `PaymentDetailsUpdate`
       ev.updateWith({ payerErrors });
   }
}

Same applies to paymentMethod errors.