{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/payment-request/issues/721","repository_url":"https://api.github.com/repos/w3c/payment-request","labels_url":"https://api.github.com/repos/w3c/payment-request/issues/721/labels{/name}","comments_url":"https://api.github.com/repos/w3c/payment-request/issues/721/comments","events_url":"https://api.github.com/repos/w3c/payment-request/issues/721/events","html_url":"https://github.com/w3c/payment-request/pull/721","id":330116559,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMjAzMTgz","number":721,"title":"teach retry() about payerErrors","user":{"login":"marcoscaceres","id":870154,"node_id":"MDQ6VXNlcjg3MDE1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/870154?v=4","gravatar_id":"","url":"https://api.github.com/users/marcoscaceres","html_url":"https://github.com/marcoscaceres","followers_url":"https://api.github.com/users/marcoscaceres/followers","following_url":"https://api.github.com/users/marcoscaceres/following{/other_user}","gists_url":"https://api.github.com/users/marcoscaceres/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoscaceres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoscaceres/subscriptions","organizations_url":"https://api.github.com/users/marcoscaceres/orgs","repos_url":"https://api.github.com/users/marcoscaceres/repos","events_url":"https://api.github.com/users/marcoscaceres/events{/privacy}","received_events_url":"https://api.github.com/users/marcoscaceres/received_events","type":"User","site_admin":false},"labels":[{"id":543429511,"node_id":"MDU6TGFiZWw1NDM0Mjk1MTE=","url":"https://api.github.com/repos/w3c/payment-request/labels/Blocked","name":"Blocked","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-07T04:51:47Z","updated_at":"2018-06-25T20:39:50Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/w3c/payment-request/pulls/721","html_url":"https://github.com/w3c/payment-request/pull/721","diff_url":"https://github.com/w3c/payment-request/pull/721.diff","patch_url":"https://github.com/w3c/payment-request/pull/721.patch"},"body":"BUILDS ON #720 - This is part 2 of 5. It adds:\n\n * `retry()` argument for validation errors: `retry(PaymentValidationErrors errorFields)`\n * `PaymentValidationErrors` dictionary\n * `PayerErrorFields` dictionary \n * Adds shippingAddressErrors to PaymentValidationErrors\n  \nThe following tasks have been completed:\n\n * [x] Confirmed there are no ReSpec errors/warnings.\n * [ ] Added Web platform tests (link)\n * [ ] added MDN Docs (link)\n\nImplementation commitment:\n\n * [ ] Safari (link to issue)\n * [ ] Chrome (link to issue)\n * [ ] Firefox (link to issue)\n * [ ] Edge (public signal)\n\nImpact on Payment Handler spec? \nUnknown.\n \n## Example\nVia payerErrors, the user now knows what's actually wrong with the payment.  \n\n```JS\nasync function doPaymentRequest() {\n  const request = new PaymentRequest(methodData, details, options);\n  const response = await request.show();\n  try {\n    await recursiveValidate(request, response);\n  } catch (err) { // retry aborted.\n    console.error(err);\n    return;\n  }\n  await response.complete(\"success\");\n}\n\nasync function recursiveValidate(request, response) {\n  const promisesToFixThings = [];\n  const payerErrors = await validatePayerInput(response);\n  if (!payerErrors) {\n    return;\n  }\n  await response.retry({ payerErrors });\n  return recursiveValidate(request, response);\n}\n\ndoPaymentRequest();\n```\n\n\n<!--\n    This comment and the below content is programatically generated.\n    You may add a comma-separated list of anchors you'd like a\n    direct link to below (e.g. #idl-serializers, #idl-sequence):\n\n    Don't remove this comment or modify anything below this line.\n    If you don't want a preview generated for this pull request,\n    just replace the whole of this comment's content by \"no preview\"\n    and remove what's below.\n-->\n***\n<a href=\"https://pr-preview.s3.amazonaws.com/w3c/payment-request/pull/721.html\" title=\"Last updated on Jun 21, 2018, 5:17 PM GMT (d2411e1)\">Preview</a> | <a href=\"https://pr-preview.s3.amazonaws.com/w3c/payment-request/721/9470b78...d2411e1.html\" title=\"Last updated on Jun 21, 2018, 5:17 PM GMT (d2411e1)\">Diff</a>"},"comment":{"url":"https://api.github.com/repos/w3c/payment-request/issues/comments/400087869","html_url":"https://github.com/w3c/payment-request/pull/721#issuecomment-400087869","issue_url":"https://api.github.com/repos/w3c/payment-request/issues/721","id":400087869,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDA4Nzg2OQ==","user":{"login":"marcoscaceres","id":870154,"node_id":"MDQ6VXNlcjg3MDE1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/870154?v=4","gravatar_id":"","url":"https://api.github.com/users/marcoscaceres","html_url":"https://github.com/marcoscaceres","followers_url":"https://api.github.com/users/marcoscaceres/followers","following_url":"https://api.github.com/users/marcoscaceres/following{/other_user}","gists_url":"https://api.github.com/users/marcoscaceres/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoscaceres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoscaceres/subscriptions","organizations_url":"https://api.github.com/users/marcoscaceres/orgs","repos_url":"https://api.github.com/users/marcoscaceres/repos","events_url":"https://api.github.com/users/marcoscaceres/events{/privacy}","received_events_url":"https://api.github.com/users/marcoscaceres/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T20:39:50Z","updated_at":"2018-06-25T20:39:50Z","author_association":"MEMBER","body":"Filed https://github.com/w3c/payment-request/issues/736 to drop `Error`."}}
{"actor":{"display_login":"marcoscaceres"}}