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

Side by Side Diff: third_party/WebKit/public/platform/modules/payments/payment_request.mojom

Issue 2038423002: Adding support for phone and email. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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.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 10 matching lines...) Expand all
21 // Optional shortest ISO 639 language code. Two or three lower case ASCII 21 // Optional shortest ISO 639 language code. Two or three lower case ASCII
22 // letters. 22 // letters.
23 string language_code; 23 string language_code;
24 24
25 // Optional ISO 15924 script code. Four ASCII letters. The first letter is 25 // Optional ISO 15924 script code. Four ASCII letters. The first letter is
26 // upper case; the rest are lower case. 26 // upper case; the rest are lower case.
27 string script_code; 27 string script_code;
28 28
29 string organization; 29 string organization;
30 string recipient; 30 string recipient;
31 string phone;
please use gerrit instead 2016/06/06 15:43:42 Remove
31 }; 32 };
32 33
33 struct PaymentResponse { 34 struct PaymentResponse {
34 string method_name; 35 string method_name;
35 36
36 // Payment method specific JSON string that is built either by the browser or 37 // Payment method specific JSON string that is built either by the browser or
37 // a payment app, for example Android Pay. Browser ensures that the string can 38 // a payment app, for example Android Pay. Browser ensures that the string can
38 // be successfully parsed into base::JSONParser. Renderer parses this string 39 // be successfully parsed into base::JSONParser. Renderer parses this string
39 // via v8::JSON::Parse() and hands off the result to the merchant website. 40 // via v8::JSON::Parse() and hands off the result to the merchant website.
40 // There's no one format for this object, so richer types cannot be used. A 41 // There's no one format for this object, so richer types cannot be used. A
41 // simple example: 42 // simple example:
42 // 43 //
43 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"} 44 // {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"}
44 string stringified_details; 45 string stringified_details;
46 string? payer_email;
47 string? payer_phone;
please use gerrit instead 2016/06/06 15:43:42 Let's put payer_email and payer_phone at the botto
45 48
46 PaymentAddress? shipping_address; 49 PaymentAddress? shipping_address;
47 string? shipping_option_id; 50 string? shipping_option_id;
48 }; 51 };
49 52
50 interface PaymentRequestClient { 53 interface PaymentRequestClient {
51 OnShippingAddressChange(PaymentAddress address); 54 OnShippingAddressChange(PaymentAddress address);
52 OnShippingOptionChange(string shipping_option_id); 55 OnShippingOptionChange(string shipping_option_id);
53 OnPaymentResponse(PaymentResponse response); 56 OnPaymentResponse(PaymentResponse response);
54 OnError(); 57 OnError();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // object to the payment app, for example Android Pay. There's no one 103 // object to the payment app, for example Android Pay. There's no one
101 // format for this object, so richer types cannot be used. A simple 104 // format for this object, so richer types cannot be used. A simple
102 // example: 105 // example:
103 // 106 //
104 // {"https://android.com/pay": {"gateway": "stripe"}} 107 // {"https://android.com/pay": {"gateway": "stripe"}}
105 string stringified_data); 108 string stringified_data);
106 UpdateWith(PaymentDetails details); 109 UpdateWith(PaymentDetails details);
107 Abort(); 110 Abort();
108 Complete(bool success); 111 Complete(bool success);
109 }; 112 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698