diff --git a/index.html b/index.html index 6aba8907..311bbf09 100644 --- a/index.html +++ b/index.html @@ -273,6 +273,11 @@

PaymentRequest interface

// Process shipping address change }); + payment.addEventListener("processingpayment", function (processingEvent) { + // Use processingEvent.app, processingEvent.requestId in such a way + // that recovery from incomplete payments is possible. + }); + payment.show().then(function(paymentResponse) { // Process paymentResponse // paymentResponse.methodName contains the selected payment method @@ -1085,6 +1090,11 @@

Summary

PaymentRequestUpdateEvent The user chooses a new shipping option. + + processingpayment + PaymentProcessingEvent + A payment app has been selected that will cause an exchange of currency. + @@ -1212,6 +1222,29 @@

updateWith()

+
+

PaymentProcessingEvent

+
+        [Constructor(DOMString type, optional PaymentProcessingEventInit eventInitDict)]
+        interface PaymentProcessingEvent : Event {
+        };
+
+        dictionary PaymentProcessingEvent : EventInit {
+          readonly attribute DOMString appName;
+          readonly attribute DOMString requestId;
+        };
+        
+

+ The appName and requestId provided in PaymentProcessingEvent are in anticipation of + Payment Apps that process payment exposing funnctionality that allows for + querying on the completion status of a payment.

+

The PaymentProcessingEvent enables the payee to store uniquely + identifying information such that it is possible to query the selected Payment App + about the status of an attempted payment.

+

It is recommended that the payee persistently store this information for use + in the event of an unexpected failure during payment processing.

+
+

@@ -1301,6 +1334,22 @@

User accepts the payment request algorithm

to pay. It MUST run the following steps:

    +
  1. + Let processing event be a new PaymentProcessingEvent. +
  2. +
  3. + Set the appName attribute value of processing event to the identifier + for the payment app that the user selected to accept the payment. +
  4. +
  5. + Set the requestId attribute value of processing event to the identifier + provided by the payment app. +
  6. +
  7. + Send the PaymentProcessingEvent event and wait for successful completion of this + message. This happens stictly before transfering control to the Payment App + for processing. +
  8. Let request be the PaymentRequest object that the user is interacting with. @@ -1329,6 +1378,10 @@

    User accepts the payment request algorithm

    Set the methodName attribute value of response to the payment method identifier for the payment method that the user selected to accept the payment.
  9. +
  10. + Set the appName attribute value of response to the payment app identifier + for the payment app that the user selected to accept the payment. +
  11. Set the details attribute value of response to a JSON-serializable object containing the payment method specific message used by the merchant to process @@ -1405,4 +1458,4 @@

    Exposing user information

    - \ No newline at end of file +