| 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 CurrencyAmount 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 110 |
| 112 interface PaymentRequest { | 111 interface PaymentRequest { |
| 113 SetClient(PaymentRequestClient client); | 112 SetClient(PaymentRequestClient client); |
| 114 Show(array<PaymentMethodData> methodData, | 113 Show(array<PaymentMethodData> methodData, |
| 115 PaymentDetails details, | 114 PaymentDetails details, |
| 116 PaymentOptions options); | 115 PaymentOptions options); |
| 117 UpdateWith(PaymentDetails details); | 116 UpdateWith(PaymentDetails details); |
| 118 Abort(); | 117 Abort(); |
| 119 Complete(bool success); | 118 Complete(bool success); |
| 120 }; | 119 }; |
| OLD | NEW |