Closed Bug 1318994 Opened 8 years ago Closed 2 years ago

Implement dev tools support for Payment Request API

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: marcosc, Unassigned)

References

(Blocks 1 open bug, )

Details

The Payment Request API requires basic error reporting (DOMExceptions include informative errors)... obviously, we want these to show up in the error console. 

Not sure if we normally localize such messages or not.
Component: Developer Tools → Developer Tools: Console
A "slight" problem with the W3C Payment Request API is that 99.9% of all new payment initiatives are based on Android & iOS "Apps".

Will the Payment Request API change this?  No, it won't because:
- There are no useful security solutions in the Web browser platform of the kind needed for payments
- Storing payment credentials in browsers would limit payments to the Web

Another problem is that the payment UI will be owned by the browser, something the payment providers are unlikely to appreciate.

That is, what's *really missing* is a useful method for communicating between the Web and native "Apps" including "Wallets".  Android Intents are way off in functionality.
(In reply to Marcos Caceres [:marcosc] from comment #0)
> The Payment Request API requires basic error reporting (DOMExceptions
> include informative errors)... obviously, we want these to show up in the
> error console. 
> 
> Not sure if we normally localize such messages or not.

If the errors are thrown as DOMExceptions then they should automatically show up in the console, although of course they will need an informative message. I know at least some DOMException messages are non-localized, but I'm not sure if there's a rule for when one would or wouldn't be.

If we need custom messages (like a warning that we don't want to expose to the page but we do want to show to web devs through the console), this can be done using nsContentUtils::ReportToConsole: https://dxr.mozilla.org/mozilla-central/source/dom/base/nsContentUtils.cpp?#3618.  Typically that message would be localized, but you can use ReportToConsoleNonLocalized if for some reason it shouldn't be.

For an example of this, see the mixed content warning displayed on this page: https://people-mozilla.org/~tvyas/mixeddisplay.html.  That logs the LoadingMixedDisplayContent2 string in the LogMixedContentMessage function here: https://dxr.mozilla.org/mozilla-central/source/dom/security/nsMixedContentBlocker.cpp#226
Priority: -- → P3
Severity: normal → enhancement
Product: Firefox → DevTools

Closing since there's no plan to move forward with WebPayments (see Bug 1721229)

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.