| 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 { |
| 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 country; |
| 13 | 13 |
| 14 array<string> address_line; | 14 array<string> address_line; |
| 15 string administrative_area; | 15 string region; |
| 16 string locality; | 16 string city; |
| 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 15924 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 string careOf; |
| 32 string phone; |
| 31 }; | 33 }; |
| 32 | 34 |
| 33 struct PaymentResponse { | 35 struct PaymentResponse { |
| 34 string method_name; | 36 string method_name; |
| 35 | 37 |
| 36 // Payment method specific JSON string that is built either by the browser or | 38 // Payment method specific JSON string that is built either by the browser or |
| 37 // a payment app, for example Android Pay. Browser ensures that the string can | 39 // a payment app, for example Android Pay. Browser ensures that the string can |
| 38 // be successfully parsed into base::JSONParser. Renderer parses this string | 40 // be successfully parsed into base::JSONParser. Renderer parses this string |
| 39 // via v8::JSON::Parse() and hands off the result to the merchant website. | 41 // via v8::JSON::Parse() and hands off the result to the merchant website. |
| 40 // There's no one format for this object, so richer types cannot be used. A | 42 // There's no one format for this object, so richer types cannot be used. A |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // object to the payment app, for example Android Pay. There's no one | 102 // object to the payment app, for example Android Pay. There's no one |
| 101 // format for this object, so richer types cannot be used. A simple | 103 // format for this object, so richer types cannot be used. A simple |
| 102 // example: | 104 // example: |
| 103 // | 105 // |
| 104 // {"https://android.com/pay": {"gateway": "stripe"}} | 106 // {"https://android.com/pay": {"gateway": "stripe"}} |
| 105 string stringified_data); | 107 string stringified_data); |
| 106 UpdateWith(PaymentDetails details); | 108 UpdateWith(PaymentDetails details); |
| 107 Abort(); | 109 Abort(); |
| 108 Complete(bool success); | 110 Complete(bool success); |
| 109 }; | 111 }; |
| OLD | NEW |