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

Unified Diff: components/payments/payment_request.mojom

Issue 2470463002: Add data parameter to payment details modifier. (Closed)
Patch Set: Rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: components/payments/payment_request.mojom
diff --git a/components/payments/payment_request.mojom b/components/payments/payment_request.mojom
index 9d95c51a60dcee6f551ccbcab524d8aee2e86216..bc428667c2765c0a9eb7620387c3d84b43540edc 100644
--- a/components/payments/payment_request.mojom
+++ b/components/payments/payment_request.mojom
@@ -58,8 +58,8 @@ struct PaymentResponse {
// a payment app, for example Android Pay. Browser ensures that the string can
// be successfully parsed into base::JSONParser. Renderer parses this string
// via v8::JSON::Parse() and hands off the result to the merchant website.
- // There's no one format for this object, so richer types cannot be used. A
- // simple example:
+ // There's no one format for this object, so more specific types cannot be
+ // used. A simple example:
//
// {"nameOnCard": "Jon Doe", "pan": "4111 1111 1111 1111"}
string stringified_details;
@@ -106,10 +106,34 @@ struct PaymentShippingOption {
bool selected;
};
-struct PaymentDetailsModifier {
+struct PaymentMethodData {
array<string> supported_methods;
+
+ // A JSON string built by the renderer from a JavaScript object that the
+ // merchant website provides. The renderer uses
+ // blink::JSONObject::toJSONString() to generate this string. The browser does
+ // not parse the string and passes it as-is directly to payment apps. There's
+ // no one format for this object, so more specific types cannot be used. A
+ // simple example:
+ //
+ // {"gateway": "stripe"}
+ string stringified_data;
+
+ // Android Pay specific method data is parsed in the renderer.
+ // https://developers.google.com/web/fundamentals/getting-started/primers/payment-request/android-pay
+ // TODO(rouslan): Stop parsing Android Pay data. http://crbug.com/620173
+ AndroidPayEnvironment environment;
+ string? merchant_name;
+ string? merchant_id;
+ array<AndroidPayCardNetwork> allowed_card_networks;
+ AndroidPayTokenization tokenization_type;
+ array<AndroidPayTokenizationParameter> parameters;
+};
+
+struct PaymentDetailsModifier {
PaymentItem? total;
array<PaymentItem> additional_display_items;
+ PaymentMethodData method_data;
};
struct PaymentDetails {
@@ -157,30 +181,6 @@ struct AndroidPayTokenizationParameter {
string? value;
};
-struct PaymentMethodData {
- array<string> supported_methods;
-
- // A JSON string built by the renderer from a JavaScript object that the
- // merchant website provides. The renderer uses
- // blink::JSONObject::toJSONString() to generate this string. The browser does
- // not parse the string and passes it as-is directly to payment apps. There's
- // no one format for this object, so richer types cannot be used. A simple
- // example:
- //
- // {"gateway": "stripe"}
- string stringified_data;
-
- // Android Pay specific method data is parsed in the renderer.
- // https://developers.google.com/web/fundamentals/getting-started/primers/payment-request/android-pay
- // TODO(rouslan): Stop parsing Android Pay data. http://crbug.com/620173
- AndroidPayEnvironment environment;
- string? merchant_name;
- string? merchant_id;
- array<AndroidPayCardNetwork> allowed_card_networks;
- AndroidPayTokenization tokenization_type;
- array<AndroidPayTokenizationParameter> parameters;
-};
-
enum PaymentComplete {
SUCCESS,
FAIL,

Powered by Google App Engine
This is Rietveld 408576698