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.payments.mojom"] | 5 [JavaPackage="org.chromium.payments.mojom"] |
6 module payments.mojom; | 6 module payments.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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 // Payment method specific JSON string that is built either by the browser or | 57 // Payment method specific JSON string that is built either by the browser or |
58 // a payment app, for example Android Pay. Browser ensures that the string can | 58 // a payment app, for example Android Pay. Browser ensures that the string can |
59 // be successfully parsed into base::JSONParser. Renderer parses this string | 59 // be successfully parsed into base::JSONParser. Renderer parses this string |
60 // via v8::JSON::Parse() and hands off the result to the merchant website. | 60 // via v8::JSON::Parse() and hands off the result to the merchant website. |
61 // There's no one format for this object, so more specific types cannot be | 61 // There's no one format for this object, so more specific types cannot be |
62 // used. A simple example: | 62 // used. A simple example: |
63 // | 63 // |
64 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} | 64 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} |
65 string stringified_details; | 65 string stringified_details; |
66 | 66 |
67 string requestId; | |
please use gerrit instead
2017/03/27 16:22:36
The string is never modified inside of the browser
rwlbuis
2017/03/27 20:45:29
Done.
| |
67 PaymentAddress? shipping_address; | 68 PaymentAddress? shipping_address; |
68 string? shipping_option; | 69 string? shipping_option; |
69 string? payer_name; | 70 string? payer_name; |
70 string? payer_email; | 71 string? payer_email; |
71 string? payer_phone; | 72 string? payer_phone; |
72 }; | 73 }; |
73 | 74 |
74 enum PaymentErrorReason { | 75 enum PaymentErrorReason { |
75 UNKNOWN, | 76 UNKNOWN, |
76 USER_CANCEL, | 77 USER_CANCEL, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 array<PaymentItem> additional_display_items; | 182 array<PaymentItem> additional_display_items; |
182 PaymentMethodData method_data; | 183 PaymentMethodData method_data; |
183 }; | 184 }; |
184 | 185 |
185 struct PaymentDetails { | 186 struct PaymentDetails { |
186 PaymentItem total; | 187 PaymentItem total; |
187 array<PaymentItem> display_items; | 188 array<PaymentItem> display_items; |
188 array<PaymentShippingOption> shipping_options; | 189 array<PaymentShippingOption> shipping_options; |
189 array<PaymentDetailsModifier> modifiers; | 190 array<PaymentDetailsModifier> modifiers; |
190 string error = ""; | 191 string error = ""; |
192 string? id; | |
please use gerrit instead
2017/03/27 16:22:36
Add a comment about where this string comes from a
rwlbuis
2017/03/27 20:45:29
Done.
| |
191 }; | 193 }; |
192 | 194 |
193 enum PaymentShippingType { | 195 enum PaymentShippingType { |
194 SHIPPING, | 196 SHIPPING, |
195 DELIVERY, | 197 DELIVERY, |
196 PICKUP | 198 PICKUP |
197 }; | 199 }; |
198 | 200 |
199 struct PaymentOptions { | 201 struct PaymentOptions { |
200 bool request_payer_name; | 202 bool request_payer_name; |
(...skipping 13 matching lines...) Expand all Loading... | |
214 Init(PaymentRequestClient client, | 216 Init(PaymentRequestClient client, |
215 array<PaymentMethodData> method_data, | 217 array<PaymentMethodData> method_data, |
216 PaymentDetails details, | 218 PaymentDetails details, |
217 PaymentOptions options); | 219 PaymentOptions options); |
218 Show(); | 220 Show(); |
219 UpdateWith(PaymentDetails details); | 221 UpdateWith(PaymentDetails details); |
220 Abort(); | 222 Abort(); |
221 Complete(PaymentComplete result); | 223 Complete(PaymentComplete result); |
222 CanMakePayment(); | 224 CanMakePayment(); |
223 }; | 225 }; |
OLD | NEW |