From d3200c6c734ee2c9bf9f35c90655da2a16de3a4a Mon Sep 17 00:00:00 2001 From: rvm4 Date: Sun, 10 Apr 2016 16:01:41 -0400 Subject: [PATCH 1/2] provide shipping address in PaymentResponse --- specs/paymentrequest.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/specs/paymentrequest.html b/specs/paymentrequest.html index e7a3c6de..85c2a2fd 100644 --- a/specs/paymentrequest.html +++ b/specs/paymentrequest.html @@ -770,8 +770,9 @@

ShippingAddress interface

If the requestShipping flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then the user agent will populate the - shippingAddress field of the PaymentRequest object with - the user's selected shipping address. + shippingAddress field of the PaymentRequest and ultimately the + PaymentResponse object with the user's selected shipping address after + the user has accepted the payment.

The fields of the ShippingAddress interface are @@ -820,6 +821,7 @@

PaymentResponse interface

interface PaymentResponse { readonly attribute DOMString methodName; readonly attribute object details; + readonly attribute ShippingAddress? shippingAddress; Promise<void> complete(boolean success); }; @@ -840,6 +842,12 @@

PaymentResponse interface

A JSON-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine successful fund transfer. +
shippingAddress
+
+ If the requestShipping flag was set to true in the PaymentOptions + passed to the PaymentRequest constructor, then shippingAddress will + be the full and final shipping address chosen by the user. +
From f485a7a0b85bf37d4fbd2452429329282cebcc47 Mon Sep 17 00:00:00 2001 From: Ade Bateman Date: Thu, 28 Apr 2016 17:16:10 -0700 Subject: [PATCH 2/2] Add note to emphasise that the `details` field is populated by the app --- specs/paymentrequest.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/paymentrequest.html b/specs/paymentrequest.html index 85c2a2fd..1e4e0d69 100644 --- a/specs/paymentrequest.html +++ b/specs/paymentrequest.html @@ -840,7 +840,8 @@

PaymentResponse interface

details
A JSON-serializable object that provides a payment method specific message used by the merchant to - process the transaction and determine successful fund transfer. + process the transaction and determine successful fund transfer. This data is returned by the payment app + that satisfies the payment request.
shippingAddress