- From: David I. Lehn <dil@lehn.org>
- Date: Tue, 11 Oct 2011 14:14:36 -0400
- To: Manu Sporny <msporny@digitalbazaar.com>
- Cc: Web Payments <public-webpayments@w3.org>
On Sat, Oct 8, 2011 at 6:45 PM, Manu Sporny <msporny@digitalbazaar.com> wrote: > I've just published a date-stamped Editors Draft for the Payment Links > specification: > > http://payswarm.com/specs/ED/payment-links/2011-10-08/ > You can combine this payment spec with the registerProtocolHandler API [1] in newer browser releases to do something cool. On your payment processing site (ex: payment.example.com) have some JavaScript code on the main page: <script type="text/javascript"> if(navigator && navigator.registerProtocolHandler) { navigator.registerProtocolHandler("web+payment","https://payment.example.com/pay?uri=%s","Pay for Stuff!"); } </script> That will pop up a dialog asking if you want to associate "web+payment" links with your site. Then, any site on the net can have links like the following: <a rel="payment" href="web+payment:?amount=10.00¤cy=USD&to=dil@lehn.org">Give Dave $10!</a> Click on that and your browser will go off to: https://payment.example.com/pay?uri=web%2Bpayment%3A%3Famount%3D10.00%26currency%3DUSD%26to%3Ddil%40lehn.org The server can parse the URI, pull out the payment link params, and process the payment. Nice eh? Obviously there would need to be some standards to specify how the "to" part worked and so on but the browser plumbing is working today in at least recent Chromium builds. [1] https://developer.mozilla.org/En/DOM/Window.navigator.registerProtocolHandler -dave
Received on Tuesday, 11 October 2011 18:15:09 UTC