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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // a payment app, for example Android Pay. Browser ensures that the string can | 52 // a payment app, for example Android Pay. Browser ensures that the string can |
53 // be successfully parsed into base::JSONParser. Renderer parses this string | 53 // be successfully parsed into base::JSONParser. Renderer parses this string |
54 // via v8::JSON::Parse() and hands off the result to the merchant website. | 54 // 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 | 55 // There's no one format for this object, so richer types cannot be used. A |
56 // simple example: | 56 // simple example: |
57 // | 57 // |
58 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} | 58 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} |
59 string stringified_details; | 59 string stringified_details; |
60 | 60 |
61 PaymentAddress? shipping_address; | 61 PaymentAddress? shipping_address; |
62 string? shipping_option_id; | 62 string? shipping_option; |
63 string? payer_email; | 63 string? payer_email; |
64 string? payer_phone; | 64 string? payer_phone; |
65 }; | 65 }; |
66 | 66 |
67 interface PaymentRequestClient { | 67 interface PaymentRequestClient { |
68 OnShippingAddressChange(PaymentAddress address); | 68 OnShippingAddressChange(PaymentAddress address); |
69 OnShippingOptionChange(string shipping_option_id); | 69 OnShippingOptionChange(string shipping_option_id); |
70 OnPaymentResponse(PaymentResponse response); | 70 OnPaymentResponse(PaymentResponse response); |
71 OnError(); | 71 OnError(); |
72 OnComplete(); | 72 OnComplete(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 interface PaymentRequest { | 118 interface PaymentRequest { |
119 SetClient(PaymentRequestClient client); | 119 SetClient(PaymentRequestClient client); |
120 Show(array<PaymentMethodData> methodData, | 120 Show(array<PaymentMethodData> methodData, |
121 PaymentDetails details, | 121 PaymentDetails details, |
122 PaymentOptions options); | 122 PaymentOptions options); |
123 UpdateWith(PaymentDetails details); | 123 UpdateWith(PaymentDetails details); |
124 Abort(); | 124 Abort(); |
125 Complete(PaymentComplete result); | 125 Complete(PaymentComplete result); |
126 }; | 126 }; |
OLD | NEW |