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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 PaymentAddress? shipping_address; | 48 PaymentAddress? shipping_address; |
49 string? shipping_option_id; | 49 string? shipping_option_id; |
50 }; | 50 }; |
51 | 51 |
52 interface PaymentRequestClient { | 52 interface PaymentRequestClient { |
53 OnShippingAddressChange(PaymentAddress address); | 53 OnShippingAddressChange(PaymentAddress address); |
54 OnShippingOptionChange(string shipping_option_id); | 54 OnShippingOptionChange(string shipping_option_id); |
55 OnPaymentResponse(PaymentResponse response); | 55 OnPaymentResponse(PaymentResponse response); |
56 OnError(); | 56 OnError(); |
57 OnComplete(); | 57 OnComplete(); |
| 58 OnAbort(bool aborted_successfully); |
58 }; | 59 }; |
59 | 60 |
60 // The currency amount that the renderer provides to the browser process. The | 61 // The currency amount that the renderer provides to the browser process. The |
61 // browser shows the amount in UI and forwards it on to the payment app, if it | 62 // browser shows the amount in UI and forwards it on to the payment app, if it |
62 // requires the amount. | 63 // requires the amount. |
63 struct CurrencyAmount { | 64 struct CurrencyAmount { |
64 // ISO 4217 currency code. Three upper case ASCII letters. | 65 // ISO 4217 currency code. Three upper case ASCII letters. |
65 string currency_code; | 66 string currency_code; |
66 | 67 |
67 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction | 68 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // object to the payment app, for example Android Pay. There's no one | 104 // object to the payment app, for example Android Pay. There's no one |
104 // format for this object, so richer types cannot be used. A simple | 105 // format for this object, so richer types cannot be used. A simple |
105 // example: | 106 // example: |
106 // | 107 // |
107 // {"https://android.com/pay": {"gateway": "stripe"}} | 108 // {"https://android.com/pay": {"gateway": "stripe"}} |
108 string stringified_data); | 109 string stringified_data); |
109 UpdateWith(PaymentDetails details); | 110 UpdateWith(PaymentDetails details); |
110 Abort(); | 111 Abort(); |
111 Complete(bool success); | 112 Complete(bool success); |
112 }; | 113 }; |
OLD | NEW |