Index: components/payments/mojom/payment_app.mojom |
diff --git a/components/payments/mojom/payment_app.mojom b/components/payments/mojom/payment_app.mojom |
index f7eae0a4fdd2158202c5876c31694f92853ee763..5cc4e3bca4ea82398d46887aada18e412b7d4cb5 100644 |
--- a/components/payments/mojom/payment_app.mojom |
+++ b/components/payments/mojom/payment_app.mojom |
@@ -28,12 +28,30 @@ struct PaymentAppManifest { |
array<PaymentAppOption> options; |
}; |
+enum PaymentHandlerStatus { |
+ SUCCESS, |
+ NOT_IMPLEMENTED, |
+ NOT_FOUND, |
+ NO_ACTIVE_WORKER, |
+ STORAGE_OPERATION_FAILED, |
+}; |
+ |
+struct PaymentInstrument { |
+ string name; |
+ array<string> enabled_methods; |
+ string stringified_capabilities; |
+}; |
+ |
interface PaymentManager { |
Init(string service_worker_scope); |
SetManifest(PaymentAppManifest payment_app_manifest) |
=> (PaymentAppManifestError error); |
GetManifest() |
=> (PaymentAppManifest payment_app_manifest, PaymentAppManifestError error); |
+ SetPaymentInstrument(string instrumentKey, PaymentInstrument instrument) |
+ => (PaymentHandlerStatus status); |
+ GetPaymentInstrument(string instrumentKey) |
+ => (PaymentInstrument instrument, PaymentHandlerStatus status); |
}; |
struct PaymentAppRequest { |