From 14becfac00e669b0082566c21543d9b5be5c7391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Thu, 15 Nov 2018 17:08:19 +1100 Subject: [PATCH 1/5] Warn when errorFields don't match request[[options]] --- index.html | 71 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 3803c8fc..2833ff85 100644 --- a/index.html +++ b/index.html @@ -3111,26 +3111,63 @@

  • Set response.[[\retryPromise]] to retryPromise.
  • -
  • - If errorFields's paymentMethod member was passed, - and if required by the specification that defines - response's payment method, then convert - errorFields paymentMethod to an IDL value of the - type specified there. Otherwise, convert to - object. -
  • -
  • If conversion results in a exception error: +
  • If errorFields was passed:
      -
    1. Reject retryPromise with error. +
    2. Optionally, show a warning in the developer console if any of + the following are true: +
        +
      1. + request.[[\options]]["requestPayerName"] if false, and + errorFields["payer"]["name"] is present. +
      2. +
      3. + request.[[\options]]["requestPayerEmail"] if false, and + errorFields["payer"]["email"] is present. +
      4. +
      5. + request.[[\options]]["requestPayerPhone"] if false, and + errorFields["payer"]["phone"] is present. +
      6. +
      7. + request.[[\options]]["requestShipping"] if false, and + errorFields["shippingAddress"] has any + members present. +
      8. +
    3. -
    4. Set user agent's payment request is showing - boolean to false. +
    5. + If errorFields["paymentMethod] member was + passed, and if required by the specification that defines + response's payment method, then convert + errorFields's paymentMethod member to an IDL + value of the type specified there. Otherwise, convert to + object.
    6. -
    7. Return. +
    8. If conversion results in a exception error: +
        +
      1. Reject retryPromise with error. +
      2. +
      3. Set user agent's payment request is showing + boolean to false. +
      4. +
      5. Return. +
      6. +
  • From 333a2175b1c9a323369907b10547961996359283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Mon, 19 Nov 2018 12:28:52 +1100 Subject: [PATCH 2/5] chore(.travis): enable respec-validator --- .travis.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..c2756fe7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +dist: trusty +language: node_js +node_js: + - lts/* +branches: + only: + - gh-pages + +install: + - npm install respec-validator + +script: + - npx respec-validator --gh-token=$GH_TOKEN + +cache: + directories: + - node_modules From 788ee799afa2851743e36af9037bbefa1a711bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Fri, 23 Nov 2018 19:39:38 +1100 Subject: [PATCH 3/5] Revert "chore(.travis): enable respec-validator" This reverts commit 9bb0bea8e42715756e827277a4cf9b606eea3f0b. --- .travis.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c2756fe7..00000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -dist: trusty -language: node_js -node_js: - - lts/* -branches: - only: - - gh-pages - -install: - - npm install respec-validator - -script: - - npx respec-validator --gh-token=$GH_TOKEN - -cache: - directories: - - node_modules From 3cbbd37a99cf88c3354b1318a11987a04a3cf650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Tue, 27 Nov 2018 12:35:44 +1100 Subject: [PATCH 4/5] fix typo --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 2833ff85..059c4618 100644 --- a/index.html +++ b/index.html @@ -3118,28 +3118,28 @@

    1. request.[[\options]]["requestPayerName"] if false, and + "PaymentOptions">requestPayerName"] is false, and errorFields["payer"]["name"] is present.
    2. request.[[\options]]["requestPayerEmail"] if false, and + "PaymentOptions">requestPayerEmail"] is false, and errorFields["payer"]["email"] is present.
    3. request.[[\options]]["requestPayerPhone"] if false, and + "PaymentOptions">requestPayerPhone"] is false, and errorFields["payer"]["phone"] is present.
    4. request.[[\options]]["requestShipping"] if false, and + "PaymentOptions">requestShipping"] is false, and errorFields["shippingAddress"] has any members present. From 744302ba5a594408bc2b769ccb98a96d4eb2800d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Wed, 28 Nov 2018 16:52:33 +1100 Subject: [PATCH 5/5] Review feedback --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index 059c4618..29b150d7 100644 --- a/index.html +++ b/index.html @@ -3141,8 +3141,7 @@

      request.[[\options]]["requestShipping"] is false, and errorFields["shippingAddress"] has any - members present. + "PaymentValidationErrors">shippingAddress"] is present.