OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [JavaPackage="org.chromium.mojom.payments"] | 5 [JavaPackage="org.chromium.mojom.payments"] |
6 module blink.mojom; | 6 module blink.mojom; |
7 | 7 |
8 // The shipping address that the browser process provides to the renderer | 8 // The shipping address that the browser process provides to the renderer |
9 // process. Built either by the browser or a payment app. | 9 // process. Built either by the browser or a payment app. |
10 struct PaymentAddress { | 10 struct PaymentAddress { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // blink::JSONObject::toJSONString() to generate this string. The browser | 98 // blink::JSONObject::toJSONString() to generate this string. The browser |
99 // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data)) | 99 // parses the string via JSONObject(JsonSanitizer.sanitize(stringified_data)) |
100 // and passes a part of the JSON object to the payment app, for example | 100 // and passes a part of the JSON object to the payment app, for example |
101 // Android Pay. There's no one format for this object, so richer types cannot | 101 // Android Pay. There's no one format for this object, so richer types cannot |
102 // be used. A simple example: | 102 // be used. A simple example: |
103 // | 103 // |
104 // {"gateway": "stripe"} | 104 // {"gateway": "stripe"} |
105 string stringified_data; | 105 string stringified_data; |
106 }; | 106 }; |
107 | 107 |
| 108 enum PaymentComplete { |
| 109 SUCCESS, |
| 110 FAIL, |
| 111 UNKNOWN |
| 112 }; |
| 113 |
108 interface PaymentRequest { | 114 interface PaymentRequest { |
109 SetClient(PaymentRequestClient client); | 115 SetClient(PaymentRequestClient client); |
110 Show(array<PaymentMethodData> methodData, | 116 Show(array<PaymentMethodData> methodData, |
111 PaymentDetails details, | 117 PaymentDetails details, |
112 PaymentOptions options); | 118 PaymentOptions options); |
113 UpdateWith(PaymentDetails details); | 119 UpdateWith(PaymentDetails details); |
114 Abort(); | 120 Abort(); |
115 Complete(bool success); | 121 Complete(PaymentComplete result); |
116 }; | 122 }; |
OLD | NEW |