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

Side by Side Diff: chrome/test/data/payments/payment_request_id.js

Issue 2770193003: Implement request id in PaymentDetailsInit (Closed)
Patch Set: Add comment in mojom Created 3 years, 8 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
(Empty)
1 /*
2 * Copyright 2017 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 /* global PaymentRequest:false */
please use gerrit instead 2017/03/27 21:16:05 No longer necessary, because latest linters are aw
8
9 var request;
please use gerrit instead 2017/03/27 21:16:05 Not necessary.
10
11 /**
12 * Launches the PaymentRequest UI including a details.id and prints the
13 * resulting requestId.
14 */
15 function buy() { // eslint-disable-line no-unused-vars
16 try {
17 new PaymentRequest(
18 [{supportedMethods: ['visa']}],
19 {id: 'my_payment_id',
20 total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}})
21 .show()
22 .then(function(resp) {
23 resp.complete('success')
24 .then(function() {
25 print(resp.requestId);
26 })
27 .catch(function(error) {
28 print(error.message);
29 });
30 })
31 .catch(function(error) {
32 print(error.message);
33 });
34 } catch (error) {
35 print(error.message);
36 }
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698