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 package org.chromium.chrome.browser.payments; | 5 package org.chromium.chrome.browser.payments; |
6 | 6 |
7 import android.graphics.drawable.Drawable; | 7 import android.graphics.drawable.Drawable; |
8 | 8 |
9 import org.chromium.chrome.browser.payments.ui.PaymentOption; | 9 import org.chromium.chrome.browser.payments.ui.PaymentOption; |
| 10 import org.chromium.payments.mojom.PaymentDetailsModifier; |
10 import org.chromium.payments.mojom.PaymentItem; | 11 import org.chromium.payments.mojom.PaymentItem; |
11 import org.chromium.payments.mojom.PaymentMethodData; | 12 import org.chromium.payments.mojom.PaymentMethodData; |
12 | 13 |
13 import java.util.List; | 14 import java.util.List; |
14 import java.util.Map; | 15 import java.util.Map; |
15 import java.util.Set; | 16 import java.util.Set; |
16 | 17 |
17 import javax.annotation.Nullable; | 18 import javax.annotation.Nullable; |
18 | 19 |
19 /** | 20 /** |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 */ | 68 */ |
68 public abstract Set<String> getInstrumentMethodNames(); | 69 public abstract Set<String> getInstrumentMethodNames(); |
69 | 70 |
70 /** | 71 /** |
71 * Invoke the payment app to retrieve the instrument details. | 72 * Invoke the payment app to retrieve the instrument details. |
72 * | 73 * |
73 * The callback will be invoked with the resulting payment details or error. | 74 * The callback will be invoked with the resulting payment details or error. |
74 * | 75 * |
75 * @param merchantName The name of the merchant. | 76 * @param merchantName The name of the merchant. |
76 * @param origin The origin of this merchant. | 77 * @param origin The origin of this merchant. |
77 * @param total The total amount. | |
78 * @param items The shopping cart items. | |
79 * @param methodDataMap The payment-method specific data for all applicable
payment methods, | 78 * @param methodDataMap The payment-method specific data for all applicable
payment methods, |
80 * e.g., whether the app should be invoked in test or p
roduction, a | 79 * e.g., whether the app should be invoked in test or p
roduction, a |
81 * merchant identifier, or a public key. | 80 * merchant identifier, or a public key. |
| 81 * @param total The total amount. |
| 82 * @param displayItems The shopping cart items. |
| 83 * @param modifiers The relevant payment details modifiers. |
82 * @param callback The object that will receive the instrument details. | 84 * @param callback The object that will receive the instrument details. |
83 */ | 85 */ |
84 public abstract void invokePaymentApp(String merchantName, String origin, Pa
ymentItem total, | 86 public abstract void invokePaymentApp(String merchantName, String origin, |
85 List<PaymentItem> cart, Map<String, PaymentMethodData> methodDataMap
, | 87 Map<String, PaymentMethodData> methodDataMap, PaymentItem total, |
| 88 List<PaymentItem> displayItems, Map<String, PaymentDetailsModifier>
modifiers, |
86 InstrumentDetailsCallback callback); | 89 InstrumentDetailsCallback callback); |
87 | 90 |
88 /** | 91 /** |
89 * Cleans up any resources held by the payment instrument. For example, clos
es server | 92 * Cleans up any resources held by the payment instrument. For example, clos
es server |
90 * connections. | 93 * connections. |
91 */ | 94 */ |
92 public abstract void dismissInstrument(); | 95 public abstract void dismissInstrument(); |
93 } | 96 } |
OLD | NEW |