Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: components/payments/payment_request.mojom

Issue 2637603002: [Payments] Use formatter currency code on desktop (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.payments.mojom"] 5 [JavaPackage="org.chromium.payments.mojom"]
6 module payments.mojom; 6 module payments.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 26 matching lines...) Expand all
37 struct PaymentCurrencyAmount { 37 struct PaymentCurrencyAmount {
38 // The most common identifiers are three-letter alphabetic codes as defined 38 // The most common identifiers are three-letter alphabetic codes as defined
39 // by [ISO4217] (for example, "USD" for US Dollars), however any string of at 39 // by [ISO4217] (for example, "USD" for US Dollars), however any string of at
40 // most 2048 characters is considered valid. 40 // most 2048 characters is considered valid.
41 string currency; 41 string currency;
42 42
43 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction 43 // ISO 20022 CurrencyAnd30Amount. Up to 30 total digits. Up to 10 fraction
44 // digits. Separated by a dot. 44 // digits. Separated by a dot.
45 string value; 45 string value;
46 46
47 // currencySystem is a URL that indicates the currency system that the 47 // currency_system is a URL that indicates the currency system that the
48 // currency identifier belongs to. By default, the value is 48 // currency identifier belongs to. By default, the value is
49 // urn:iso:std:iso:4217 indicating that currency is defined by [ISO4217] 49 // urn:iso:std:iso:4217 indicating that currency is defined by [ISO4217]
50 // (for example, USD for US Dollars). 50 // (for example, USD for US Dollars).
51 string? currencySystem; 51 string? currency_system;
52 }; 52 };
53 53
54 struct PaymentResponse { 54 struct PaymentResponse {
55 string method_name; 55 string method_name;
56 56
57 // Payment method specific JSON string that is built either by the browser or 57 // Payment method specific JSON string that is built either by the browser or
58 // a payment app, for example Android Pay. Browser ensures that the string can 58 // a payment app, for example Android Pay. Browser ensures that the string can
59 // be successfully parsed into base::JSONParser. Renderer parses this string 59 // be successfully parsed into base::JSONParser. Renderer parses this string
60 // via v8::JSON::Parse() and hands off the result to the merchant website. 60 // via v8::JSON::Parse() and hands off the result to the merchant website.
61 // There's no one format for this object, so more specific types cannot be 61 // There's no one format for this object, so more specific types cannot be
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 }; 205 };
206 206
207 enum PaymentComplete { 207 enum PaymentComplete {
208 SUCCESS, 208 SUCCESS,
209 FAIL, 209 FAIL,
210 UNKNOWN 210 UNKNOWN
211 }; 211 };
212 212
213 interface PaymentRequest { 213 interface PaymentRequest {
214 Init(PaymentRequestClient client, 214 Init(PaymentRequestClient client,
215 array<PaymentMethodData> methodData, 215 array<PaymentMethodData> method_data,
216 PaymentDetails details, 216 PaymentDetails details,
217 PaymentOptions options); 217 PaymentOptions options);
218 Show(); 218 Show();
219 UpdateWith(PaymentDetails details); 219 UpdateWith(PaymentDetails details);
220 Abort(); 220 Abort();
221 Complete(PaymentComplete result); 221 Complete(PaymentComplete result);
222 CanMakePayment(); 222 CanMakePayment();
223 }; 223 };
OLDNEW
« no previous file with comments | « components/payments/payment_details_validation.cc ('k') | third_party/WebKit/Source/modules/payments/PaymentRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698