diff --git a/index.html b/index.html index 52e74ef6..f285be53 100644 --- a/index.html +++ b/index.html @@ -357,7 +357,7 @@

allowpaymentrequest, then throw a "SecurityError" DOMException. -
  • Let parsedMethodData be an empty list. +
  • Let serializedMethodData be an empty list.
  • Process payment methods:
      @@ -373,7 +373,7 @@

      informing the developer that each payment method needs to include at least one payment method identifier. -
    1. Let parsedData be the result of +
    2. Let serializedData be the result of JSON-serializing paymentMethod.data into a string, if the
    3. Add the tuple (paymentMethod.supportedMethods, - parsedData) to parsedMethodData. + serializedData) to + serializedMethodData.
  • @@ -473,6 +474,8 @@

    +
  • Let serializedModifierData be an empty list. +
  • Process payment details modifiers:
    1. Let modifiers be an empty @@ -524,14 +527,27 @@

  • +
  • Let serializedData be the result of + JSON-serializing modifier.data into a string, if + the data + member of modifier is present, or null if it + is not. Rethrow any exceptions. +
  • +
  • Add serializedData to + serializedModifierData. +
  • +
  • Remove the + data member of modifier, if it is + present. +
  • -
  • Set details.modifiers to - modifiers. -
  • +
  • Set details.modifiers to modifiers. +
  • If the error member of @@ -549,8 +565,11 @@

  • Set request.[[\details]] to details.
  • -
  • Set request.[[\parsedMethodData]] to - parsedMethodData. +
  • Set request.[[\serializedModifierData]] to + serializedModifierData. +
  • +
  • Set request.[[\serializedMethodData]] to + serializedMethodData.
  • Set the value of request's shippingOption attribute to @@ -620,7 +639,7 @@

    in parallel.

  • For each paymentMethod in - request.[[\parsedMethodData]]: + request.[[\serializedMethodData]]:
    1. Consult the appropriate payment apps to see if they support any of the payment method identifiers given by the @@ -644,6 +663,12 @@

      preference of the user when presenting payment methods and applications.

      +

      + The payment app should be sent the appropriate data from + request in order to guide the user through the payment + process. This includes the various attributes and internal slots + of request. +

      The acceptPromise will later be resolved by the user accepts the payment request algorithm through @@ -752,7 +777,7 @@

      parallel.

    2. For each methodData in - request.[[\parsedMethodData]]: + request.[[\serializedMethodData]]:
      1. If methodData.supportedMethods @@ -824,7 +849,7 @@

        - [[\parsedMethodData]] + [[\serializedMethodData]] The methodData supplied to the constructor, but @@ -832,6 +857,18 @@

        or null for data (instead of the original object form). + + + [[\serializedModifierData]] + + + A list containing the serialized string form of each data member for each + corresponding item in the sequence + [[\details]].modifier, or + null if no such member was present. + + [[\details]] @@ -840,7 +877,12 @@

        The current PaymentDetails for the payment request initially supplied to the constructor and then updated with calls to updateWith(). + "PaymentRequestUpdateEvent.updateWith">updateWith(). Note + that all data + members of PaymentDetailsModifier instances contained in + the modifiers member + will be removed, as they are instead stored in serialized form in + the [[\serializedModifierData]] internal slot. @@ -1147,9 +1189,9 @@

        data
        - data is a JSON-serializable object that provides - optional information that might be needed by the supported payment - methods. + data is an object that provides optional information + that might be needed by the supported payment methods. If supplied, + it will be JSON-serialized.
        @@ -1940,6 +1982,8 @@

      2. Let modifiers be the sequence details.modifiers.
      3. +
      4. Let serializedModifierData be an empty list. +
      5. For each PaymentDetailsModifier modifier in modifiers:
          @@ -1949,8 +1993,9 @@

          "PaymentItem.amount">amount.value is not a valid decimal monetary value, then set - modifiers to an empty sequence, and jump to - the step labeled copy modifiers below. + modifiers to an empty sequence and + serializedModifierData to an empty list, and + jump to the step labeled copy modifiers below.
        1. If the additionalDisplayItems member of modifier is present, then for each @@ -1964,17 +2009,41 @@

        2. If amountValue is not a valid decimal monetary value, then set - modifiers to an empty sequence, and jump - to the step labeled copy modifiers below. + modifiers to an empty sequence and + serializedModifierData to an empty list, + and jump to the step labeled copy + modifiers below.
      6. +
      7. Let serializedData be the result of + JSON-serializing modifier.data into a string, + if the data member of + modifier is present, or null if it is not. + If JSON-serializing throws an exception, then + set modifiers to an empty sequence and + serializedModifierData to an empty list, + and jump to the step labeled copy modifiers + below. +
      8. +
      9. Add serializedData to + serializedModifierData. +
      10. +
      11. Remove the data member of + modifier, if it is present. +
    3. - Copy modifiers: Copy modifiers to the - modifiers field - of target.[[\details]]. + Copy modifiers: Set + target.[[\details]].modifiers to + modifiers, and set + target.[[\serializedModifierData]] to + serializedModifierData.
  • @@ -2346,12 +2415,6 @@

    The terms Promise, internal slot, TypeError, JSON.stringify, and JSON.parse are defined by [[!ECMA-262-2015]]. -

    - The term JSON-serializable object used in this - specification is not well defined; see issue - #307. -

    The term JSON-serialize