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 ShippingAddress { | 10 struct ShippingAddress { |
11 // ISO 3166 country code. Two upper case ASCII letters. | 11 // ISO 3166 country code. Two upper case ASCII letters. |
12 string region_code; | 12 string region_code; |
13 | 13 |
14 array<string> address_line; | 14 array<string> address_line; |
15 string administrative_area; | 15 string administrative_area; |
16 string locality; | 16 string locality; |
17 string dependent_locality; | 17 string dependent_locality; |
18 string postal_code; | 18 string postal_code; |
19 string sorting_code; | 19 string sorting_code; |
20 | 20 |
21 // Optional shortest ISO 639 language code. Two or three lower case ASCII | 21 // Optional shortest ISO 639 language code. Two or three lower case ASCII |
22 // letters. | 22 // letters. |
23 string language_code; | 23 string language_code; |
24 | 24 |
25 // Optional ISO 1524 script code. Four ASCII letters. The first letter is | 25 // Optional ISO 15924 script code. Four ASCII letters. The first letter is |
26 // upper case; the rest are lower case. | 26 // upper case; the rest are lower case. |
27 string script_code; | 27 string script_code; |
28 | 28 |
29 string organization; | 29 string organization; |
30 string recipient; | 30 string recipient; |
31 }; | 31 }; |
32 | 32 |
33 struct PaymentResponse { | 33 struct PaymentResponse { |
34 string method_name; | 34 string method_name; |
35 | 35 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // parses the string via base::JSONParser and passes a part of the JSON | 96 // parses the string via base::JSONParser and passes a part of the JSON |
97 // object to the payment app, for example Android Pay. There's no one | 97 // object to the payment app, for example Android Pay. There's no one |
98 // format for this object, so richer types cannot be used. A simple | 98 // format for this object, so richer types cannot be used. A simple |
99 // example: | 99 // example: |
100 // | 100 // |
101 // {"https://android.com/pay": {"gateway": "stripe"}} | 101 // {"https://android.com/pay": {"gateway": "stripe"}} |
102 string stringified_data); | 102 string stringified_data); |
103 Abort(); | 103 Abort(); |
104 Complete(bool success); | 104 Complete(bool success); |
105 }; | 105 }; |
OLD | NEW |