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 28 matching lines...) Expand all Loading... |
39 // ISO 4217 currency code. Three upper case ASCII letters. | 39 // ISO 4217 currency code. Three upper case ASCII letters. |
40 string currency; | 40 string currency; |
41 | 41 |
42 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction | 42 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction |
43 // digits. Separated by a dot. | 43 // digits. Separated by a dot. |
44 string value; | 44 string value; |
45 }; | 45 }; |
46 | 46 |
47 struct PaymentResponse { | 47 struct PaymentResponse { |
48 string method_name; | 48 string method_name; |
49 PaymentCurrencyAmount total_amount; | |
50 | 49 |
51 // Payment method specific JSON string that is built either by the browser or | 50 // Payment method specific JSON string that is built either by the browser or |
52 // a payment app, for example Android Pay. Browser ensures that the string can | 51 // a payment app, for example Android Pay. Browser ensures that the string can |
53 // be successfully parsed into base::JSONParser. Renderer parses this string | 52 // be successfully parsed into base::JSONParser. Renderer parses this string |
54 // via v8::JSON::Parse() and hands off the result to the merchant website. | 53 // via v8::JSON::Parse() and hands off the result to the merchant website. |
55 // There's no one format for this object, so richer types cannot be used. A | 54 // There's no one format for this object, so richer types cannot be used. A |
56 // simple example: | 55 // simple example: |
57 // | 56 // |
58 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} | 57 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} |
59 string stringified_details; | 58 string stringified_details; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 118 |
120 interface PaymentRequest { | 119 interface PaymentRequest { |
121 SetClient(PaymentRequestClient client); | 120 SetClient(PaymentRequestClient client); |
122 Show(array<PaymentMethodData> methodData, | 121 Show(array<PaymentMethodData> methodData, |
123 PaymentDetails details, | 122 PaymentDetails details, |
124 PaymentOptions options); | 123 PaymentOptions options); |
125 UpdateWith(PaymentDetails details); | 124 UpdateWith(PaymentDetails details); |
126 Abort(); | 125 Abort(); |
127 Complete(PaymentComplete result); | 126 Complete(PaymentComplete result); |
128 }; | 127 }; |
OLD | NEW |