Copyright © 1999 W3C
(MIT,
INRIA,
Keio), All Rights Reserved. W3C
liability,
trademark,
document
use and
software
licensing rules apply.
This specification provides an extensible way to embed in a Web page all the information necessary to initialize a micropayment (amounts and currencies, payment systems, etc). This embedding allows different micropayment electronic wallets to coexist in a interoperable manner.
The
Micropayment
Markup Working Group (W3C Members only), with this 1999 June 9th Public
Working Draft, invites comment on our specification for "Common Markup for
Web Micropayment Systems".
This Working Group is part of the
Micropayment task within
the ECommerce Activity.
The W3C Membership and other interested parties are invited to review this
public specification and report implementation experience. Please send comments
to the publicly archived
list www-micropay-comments@w3.org
(archive).
While we welcome
implementation experience reports, the Micropayment Markup Working Group
will not allow early implementation to constrain its ability to make changes
to this specification prior to final release .
This Working Draft may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to use W3C Working Drafts as reference
material or to cite them as other than "work in progress".
A list of current W3C working drafts can be found at
http://www.w3.org/TR.
Changes from last version are marked with yellow background
Micropayments provide an alternative revenue source for content providers (initially of text and pictures, presumably multimedia later on) beyond advertising and subscriptions. Micropayments may also provide revenue streams for service providers (database lookup, proxy services etc.).
Currently, there is no clear definition of a "Web micropayment" that encompasses all systems claiming to be micropayment systems. However, these systems all share the goal of minimizing the cost overhead of a single transaction. Most of these micropayment systems try to save costs, both monetary (bank and transactions) and network (packet round trips). To do so, systems embed vital information in hyperlinks, using proprietary encodings.
This document proposes an extensible and interoperable way to embed in a Web page all the information necessary to initialize a micropayment.
Several types of payment systems exist on the Web today:
All these types of systems share a common requirement: the ability to attach payment information to transaction (e.g., pricing).
Today, a merchant willing to support multiple payment systems needs to embed in each Web page payment information specific to each target system, using a proprietary encoding for each one. Proprietary encodings introduce redundancy of information and extra work for Web page authors. This situation motivates the need for a common markup supported by multiple payment systems.
As the systems listed above are all in various stages between final design, pilots and early adoption phase, it is crucial to specify the common markup as quickly as possible (to not disturb the market and before a large base would need to migrate to a new format). Rapid market development is likely to close this window of opportunity by the end of the year 2000 with the growth of the installed user base.
Obviously, the time for developing a common markup supporting multiple payment system appears well chosen.
Micropayment usually involves three parties, a customer C who makes the payment, a Merchant M who receives the payment and a broker B who keeps accounts for the parties concerned.
This document will mainly consider the two parties Customer (Client) C and Merchant (Server) M, as they are the only ones to be involved in the initialization of a micropayment.
Parties involved in this specification architecture are Client and Merchant.
The Client initiates the micropayment when requesting information from the server.
The basic architecture consist of:
This document focuses on the Merchant server to Per Fee Link Handler-Browser flow and specifies the payment markup information.
This document does not address:
Note. The API from Per Fee Link Handler (PFLH) to Wallet will be addressed in another specific API Working Draft. The PFLH functionalities will also be addressed in another specific PFLH Working Draft.
Communication between the merchant server and the client wallet will use
HTTP protocol.
But it appears reasonable to set up encrypted communications between merchant
and clients, as money is involved in these transactions flows.
It is the responsibility of the payment system to secure these data and flows
(links, Payment Order, etc.).
Such encrypted communications can be done using for example Secure Sockets Layer [SSL] (HTTPS).
Note. We would like to draw the attention of the reader that micropayment systems should use these mechanism of encryption, but this document does not address these security issues.
This document section specifies requirements for interoperability among micropayment systems.
Requirements for embedding micropayment information in web pages are:
The words "MUST" (or "required"), "SHOULD" (or "recommended"), and "MAY" (or "optional") are used throughout the document and should be read as interoperability requirements. The words are used as defined in RFC2119 [RFC2119] for defining the significance of each particular requirement.
An implementation conforms to this specification if it satisfies all of the normative statements ("MUST" or "required") in this document.
All the following common parameters MUST be provided for conformance: merchanturl, buyurl, textlink and price. In addition, there SHOULD be a longdesc and duration. There MAY be a merchantname, requesturl, imagelink, expiration date and information for a specific payment system requires.
Field Name | Short Description | Format | Requirements |
---|---|---|---|
merchanturl | Identifies the merchant site
Specifies a merchant designation |
URI,
character string |
MUST be provided
MAY be provided |
buyurl | Identifies what the client is buying | relative URI | MUST be provided |
textlink | Textual description of what the client is buying. The text source of the fee link. | character string | MUST be provided |
imagelink | Graphical description of what the client is buying. The graphic source of the fee link. (textlink provides a textual equivalent of the image for accessibility). | URI | MAY be provided |
price | Specifies amount and currency | character string | MUST be provided |
duration | Indicates the time after purchase any URI can be retrieved with payment | integer number | SHOULD be provided |
longdesc | Describes in details the content of what the client is buying | character string | SHOULD be provided |
requesturl | Identifies what the client is actually requesting | relative URI | MAY be provided |
expiration | Indicates a date until which the offer from the merchant is valid | character string: YYYY-MM-DDThh:mm:ssTZD |
MAY be provided |
specific field | Provides information unique to each payment system | URI and character string | MAY be provided |
The merchanturl parameter, which takes a URI,
identifies the merchant site where the purchase is to occur.
This merchanturl parameter is mandatory and MUST be provided to
Customer.
The merchantname parameter, which takes a character string, allows giving a merchant name designation. This optional parameter provides a user-viewable version of the name of the merchant. The wallet will need to validate this (to make sure this really corresponds to the merchant ID in the payment system - may also use some specific parameter if needed).
The buyurl parameter, which takes a relative
URI, identifies what the client is buying. It does not
mention the site of the merchant.
This buyurl parameter is mandatory and MUST be provided to Customer.
The requesturl parameter, which takes a relative
URI, identifies what the client is actually requesting.
It does not mention the site of the merchant.
This parameter may be identical to the buyurl parameter. It may
be different if, for example, the client has purchased a collection of pages
and requests only one of these pages. In this case, buyurl is larger
than requesturl parameter.
This requesturl parameter is an optional and MAY be provided to
Customer.
The textlink parameter, which takes a character string, provides
a textual description of what the client is buying. It is the text source
of the fee link.
This textlink parameter is mandatory and MUST be provided to Customer.
The imagelink parameter, which takes a URI, provides
a graphical description of what the client is buying. It is the graphic source
of the fee link.
When using this imagelink parameter, the textlink
parameter provides a textual equivalent for the image and is necessary for
accessibility.
The price parameter, which takes a character string, displays the amount and currency to the Customer. The character string MUST be encoded as an amount followed by a currency unit as follows:
This price parameter is mandatory and MUST be provided to Customer.
The Longdesc parameter, which takes a character string, describes
in details the content of what the client is buying and is intended for
display.
This Longdesc parameter is optional but SHOULD be provided to Customer.
The duration parameter, which takes an integer number of minutes,
indicates the time after purchase any URI can be retrieved with payment.
This duration parameter SHOULD be provided to Customer. In case
it is not provided, a default value is set to zero (meaning that the fee
link can be only retrieved once after purchase).
The expiration parameter, which takes a date, indicates a date until
which the offer from the merchant is valid. After this given date offer is
out of date.
It is an optional parameter and MAY be provided to Customer.
The value of this parameter, a date/time string, MUST use the following format
as described in [DATETIME]:
YYYY-MM-DDThh:mm:ssTZD
This format includes the complete date (YYYY-MM-DD) separated from the time by the letter (T), which must include hours (hh), minutes (mm), seconds (ss) and a time zone designator (TZD). An example of such a string is "1999-07-16T19:20:30+01:00" Please consult [DATETIME] for the meaning of each field.
This specific field provides information unique to each payment system, insuring
coexistence among the different payment systems.It is an optional parameter
and MAY be provided to Customer.
When specific payment system requires additional information, a
URI MUST be used to refer to a unique payment system name.
Additional specific information are provided with a character string.
Information provided in this specific fields SHOULD be used to override
information specified in the common fields above. To allow multiple
specific parameters, one must use the following naming convention:
Note. We recommend that when a system uses specific parameters for the same meaning as the common (non-specific) parameters defined above in the specification, the same parameter name will be used e.g. name="1.price", name="1.merchanturl" and the same syntax if possible. Normally such a parameter SHOULD override the common (non-specific) parameter.
Note. It is an error to provide:
In these cases response is undefined (preferably an error message - probably done by browser...)
Note. The following parameters
merchanturl, requesturl
are passed by PFLH to the wallets, allowing to construct the
payment-system-specific URL for the merchandise (to be used in get/post http
to the merchant server). These fields may be overruled if necessary, by a
payment-system specific merchanturl parameter (e.g. if different payment
systems are on different web servers at the merchant).
Merchant site | Payment system | URL suffix (Client Request) |
---|---|---|
http://www.merchant.org/ | micropay | page.html |
Final URL constructed by Wallet: http://www.merchant.org/micropay/page.html |
One of the main requirements expressed in this document is that embedding
micropayment information in HTML should work with all current browsers.
The Working Group has also required interoperability among micropayment systems
though a common Markup.
For current browsers, embedding information in HTML pages can be done using a Per Fee Link Handler, which may be a plug-in or JAVA Applet.This embedding is proposed in Appendix 1.
Today most browsers are non-aware RDF browsers, but we cite as example embedding micropayment information using Resource Description Framework ([RDF]) for future RDF-compliant user agents in Appendix 2.
In order to have this embedding using RDF to work with current browsers, a "transformation engine" hosted on the server could transform the HTML document linked to the RDF document into an HTML document that includes either OBJECT or APPLET or EMBED elements, making it understandable by different browsers versions and brands. This architecture is proposed in Appendix 3.
In order to send to the browser the proper HTML page (with OBJECT or APPLET or EMBED elements) the Merchant server needs to know the capabilities of this browser. Is the Browser JAVA enabled ? Is the right Plugin installed in the browser ? etc. Solutions and code are proposed in Appendix 4.
An Alternative implementation is to generate the HTML page on the client side using Javascript for example. After detection of the browser capabilities, a script can generate the elements and attributes for each fee link.Solutions and code are proposed in Appendix 5.
Due to Requirements expressed above, embedding micropayment information SHOULD work with current browsers.
All requested information needed to start micropayment must be present in
the HTML page sent from the merchant server.
For current browsers, embedding information in HTML pages can be done using
a Per Fee Link Handler, which may be a plug-in or JAVA Applet.
In order to allow the Per Fee Link Handler to process this information, it will be stored in an OBJECT element.
For user agents that do not support the OBJECT element, and for reasons of backward compatibility, authors may use the APPLET or EMBED element. Note. The APPLET element is deprecated in HTML 4.0 and should be avoided. The EMBED element is not part of a W3C Recommendation and should be avoided. Authors should use the OBJECT element.
HTML 4.0 introduced the OBJECT element ([HTML40], section 13.3) to allow HTML authors to specify everything required by an object for its presentation by a user agent: source code, initial values, and run-time data. The term "object" refers to applets, plug-ins, media handlers, etc.
<OBJECT codetype="application/java" classid="http://www.miamachina.org/applet/micropayment.class">
<PARAM name="duration" value="60" valuetype="data"> A Per Fee Link that needs an applet for rendering </OBJECT>
The HTML 4.0 specification defines the attributes of the OBJECT element.
The "classid" attribute specifies the location of the OBJECT's implementation
with a URL.
The "codetype" attribute specifies the content type of data to expect when
downloading the OBJECT.
The PARAM element within an OBJECT element specifies values to give to the
object at run-time (as name/value pairs).
For user agents that do not support the OBJECT element and for reasons of backward compatibility, authors may use the APPLET element. HTML 3.2 ([HTML32]) introduced the APPLET element to allow designers to embed a Java applet in an HTML document. It is supported by all Java-enabled browsers, but has been deprecated in HTML 4.0 in favor of the OBJECT element.
<APPLET codebase="http://www.miamachina.org/applet/" code="micropayment.class" archive="myclasses.jar,myaudio.jar"> <PARAM name="duration" value="60" valuetype="data"> A Per Fee Link that needs an applet for rendering. </APPLET>
The HTML 4.0 specification ([HTML40], section 13.4)
defines the attributes of the (deprecated) APPLET element.
The "codebase" attribute specifies the base URL for the applet.
The "code" attribute specifies either the name of the class file that contains
the applet's compiled applet subclass or the path to get the class.
The "archive" attribute specifies a comma-separated list of URIs designated
resources to preload such as signed (trusted) code such as a Per Fee Link
Handler.
The PARAM element within an APPLET element specifies values to give to the
object at run-time (as name/value pairs).
For user agents that do not support the OBJECT element and for reasons of
backward compatibility, authors MAY use EMBED element.
Note. Whenever the OBJECT element can be used, authors SHOULD avoid
EMBED because it is not defined by a W3C Recommendation.
This EMBED element, supported by all plug-in-enabled browsers, allows designers to embed a plug-in in an HTML document.
<EMBED src="http://www.miamachina.org/MicropaymentPlugin.exe" duration="60">
A Per Fee Link that needs a plug-in for rendering.
</EMBED>
Optional parameters within EMBED element will be used to pass required information by the plug-in at run-time.
PARAMETER_NAME=PARAMETER_VALUE
The PFL Handler is a module that can either be a plug-in or a Java Applet.
It could be implemented in Java 1.2 allowing signed JAVA applets in browsers
supporting it, and otherwise as a plug-in.
The Per Fee Link Handler (PFLH) functionalities will be addressed in a specific Working Draft.
The merchanturl data field:
For OBJECT and APPLET:
<PARAM name="merchanturl" value="http://www.merchant.org/shop" valuetype="ref">
<PARAM name="merchantname" value="shopandpay" valuetype="data">
For EMBED:
merchanturl="http://www.merchant.org/shop"
merchantname="shopandpay"
The ClientBuy data field:
For OBJECT and APPLET:
<PARAM name="buyurl" value="catalog.html" valuetype="ref">
For EMBED:
buyurl="catalog.html"
The ClientRequest data field:
For OBJECT and APPLET:
<PARAM name="requesturl" value="page.html" valuetype="ref">
For EMBED:
requesturl="page.html"
The textlink and
imagelink data fields :
For OBJECT and APPLET:
<PARAM name="textlink" value="click here to by the product" valuetype="data"> <PARAM name="imagelink" value="http://www.merchant.org/product.gif" valuetype="ref">
For EMBED:
textlink="click here to by the product" imagelink="http://www.merchant.org/product.gif"
The Price data field:
For OBJECT and APPLET:
<PARAM name="price" value="+0.01USD" valuetype="data"> statement for one cent of a US Dollar.
For EMBED:
price="+1E-2FRF" statement for one cent of a French Franc.
The Longdesc data field:
For OBJECT and APPLET:
<PARAM name="longdesc" value="Description of what you are actually buying" valuetype="data">
For EMBED:
longdesc="Description of what you are actually buying"
The Duration data field
For OBJECT and APPLET:
<PARAM name="duration" value="60" valuetype="data">
For EMBED:
duration="60"
The Expiration date data field:
For OBJECT and APPLET:
<PARAM name="expiration" value="1999-11-05T08:15:30-05:00 " valuetype="data">
corresponds to November 5, 1999, 8:15:30 am, US Eastern Standard Time.
For EMBED:
expiration="1999-11-05T13:15:30Z"
corresponds to the same instant as above.
For data fields specific to a micropayment system:
For OBJECT and APPLET:
<PARAM name="1.mpname" value="micropayment" valuetype="data"> <PARAM name="1.mpurl" value="http://www.foo.it/micropay" valuetype="ref"> <PARAM name="1.specific" value="124rfdetg14ft58rdef21f4251" valuetype="data"> <PARAM name="1.merchanturl" value="http://www.merchant.it/" valuetype="ref">
<PARAM name="2.mpname" value="millipayment" valuetype="data"> <PARAM name="2.mpurl" value="http://www.foo.it/millipay" valuetype="ref"> <PARAM name="2.specific" value="475rdg546tfeww12wcft254hy4" valuetype="data"> <PARAM name="2.merchanturl" value="http://www.merchant.fr/" valuetype="ref">
For EMBED:
1.mpname="micropayment" 1.mpurl="http://www.foo.it/micropay"
1.specific="124rfdetg14ft58rdef21f4251" 1.merchanturl="http://www.merchant.it/" 2.mpname="millipayment"
2.mpurl="http://www.foo.it/millipay" 2.specific="475rdg546tfeww12wcft254hy4" 2.merchanturl="http://www.merchant.fr/"
<HTML><HEAD> <TITLE>Example:Fee Link for an Java Applet PFLH using OBJECT element
</TITLE></HEAD> <BODY> <OBJECT codetype="application/java" classid="http://www.miamachina.org/applet/micropayment.class"> <PARAM name="merchanturl" value="http://www.merchant.org/shop" valuetype="ref">
<PARAM name="merchantname" value="shopandpay" valuetype="data"> <PARAM name="buyurl" value="catalog.html" valuetype="ref"> <PARAM name="requesturl" value="page.html" valuetype="ref"> <PARAM name="textlink" value="click here to buy the product"
valuetype="data"> <PARAM name="price" value="+0.01USD" valuetype="data">
<PARAM name="longdesc" value="Description of what you are actually buying"
valuetype="data"> <PARAM name="duration" value="60" valuetype="data"> <PARAM name="expiration" value="1999-11-05T08:15:30-05:00 "
valuetype="data">
<PARAM name="1.mpname" value="micropayment" valuetype="data"> <PARAM name="1.mpurl" value="http://www.foo.it/micropay" valuetype="ref"> <PARAM name="1.specific" value="124rfdetg14ft58rdef21f4251" valuetype="data"> <PARAM name="1.merchanturl" value="http://www.merchant.it/" valuetype="ref">
<PARAM name="2.mpname" value="millipayment" valuetype="data"> <PARAM name="2.mpurl" value="http://www.foo.it/millipay" valuetype="ref"> <PARAM name="2.specific" value="475rdg546tfeww12wcft254hy4" valuetype="data"> <PARAM name="2.merchanturl" value="http://www.merchant.fr/" valuetype="ref"> A Per Fee Link that needs an applet for rendering. </OBJECT> </BODY></HTML>
<HTML><HEAD> <TITLE>Example:Fee Link for an Java Applet PFLH using APPLET element
</TITLE></HEAD> <BODY> <APPLET codebase="http://www.miamachina.org/applet/" code="micropayment.class" archive="myclasses.jar,myaudio.jar"> <PARAM name="merchanturl" value="http://www.merchant.org/shop" valuetype="ref">
<PARAM name="merchantname" value="shopandpay" valuetype="data"> <PARAM name="buyurl" value="catalog.html" valuetype="ref"> <PARAM name="requesturl" value="page.html" valuetype="ref"> <PARAM name="textlink" value="click here to by the product"
valuetype="data"> <PARAM name="price" value="+0.01USD" valuetype="data">
<PARAM name="longdesc" value="Description of what you are actually buying"
valuetype="data"> <PARAM name="duration" value="60" valuetype="data"> <PARAM name="expiration" value="1999-11-05T08:15:30-05:00 "
valuetype="data">
<PARAM name="1.mpname" value="micropayment" valuetype="data"> <PARAM name="1.mpurl" value="http://www.foo.it/micropay" valuetype="ref"> <PARAM name="1.specific" value="124rfdetg14ft58rdef21f4251" valuetype="data"> <PARAM name="1.merchanturl" value="http://www.merchant.it/" valuetype="ref">
<PARAM name="2.mpname" value="millipayment" valuetype="data"> <PARAM name="2.mpurl" value="http://www.foo.it/millipay" valuetype="ref"> <PARAM name="2.specific" value="475rdg546tfeww12wcft254hy4" valuetype="data"> <PARAM name="2.merchanturl" value="http://www.merchant.fr/" valuetype="ref"> A Per Fee Link that needs an applet for rendering. </APPLET> </BODY></HTML>
<HTML><HEAD> <TITLE>Example:Fee Link for a Plugin PFLH using EMBED element
</TITLE></HEAD> <BODY> <EMBED src="http://www.miamachina.org/MicropaymentPlugin.exe" merchanturl="http://www.merchant.org/shop" merchantname="shopandpay" buyurl="catalog.html" requesturl="page.html" textlink="click here to by the product" price="+0.01USD"
longdesc="Description of what you are actually buying"
duration="60" expiration="1999-11-05T13:15:30Z"
1.mpname="micropayment" 1.mpurl="http://www.foo.it/micropay"
1.specific="124rfdetg14ft58rdef21f4251" 1.merchanturl="http://www.merchant.it/" 2.mpname="millipayment"
2.mpurl="http://www.foo.it/millipay" 2.specific="475rdg546tfeww12wcft254hy4" 2.merchanturl="http://www.merchant.fr/" >
A Per Fee Link that needs a plug-in for rendering.
</EMBED> </BODY></HTML>
This embedding using the Resource Description Framework
([RDF]) is another example of implementation allowing
different micropayment electronic wallets to coexist in a interoperable
manner.
All the Required fields are stated above in
this document.
Micropayment information can be embedded in HTML pages using RDF to be processed
by RDF-compliant user agents.
Micropayment information are statements that are properly expressed according
to the Resource Description Framework ([RDF]). There are
a number of reasons to use RDF as a data format for micropayments:
As metadata, the information for micropayments can thereby be reasoned upon, and fully integrated with all the other information stored in the World Wide Web.
In order to fully exploit these benefits, it is suggested that the necessary parameters for micropayments are encoded in RDF and shipped by one or more of the following ways:
These parameters can then be read by a standard RDF engine and passed on
to the API to the electronic wallet (to be defined by the Micropayments API
Working Draft).
The recommended technique for embedding RDF expressions in an HTML document
([RDF], Appendix B.) is simply to insert the RDF in-line.
Note. The resulting document will no longer conform to HTML specifications up to and including [HTML40], but the W3C anticipates that the HTML language will evolve to support this. See current new [XHTML] work.
Transition to full integration. In order to move from the existing software population of the Web to one where micropayments and RDF are day-to-day data formats, an interim implementation should be foreseen. An interim implementation can be provided through a proxy until the API is available from the browser directly. Therefore the API Working Draft should consider the assumption of a browser API in the future.
Note. The prose corresponding to this diagram could
be read as follows :
The fee link whose price is one centime of FRF, merchantID is
"http://www.merchant.org", buyurl is "catalog.html", requesturl is "page.html",
expiration date is 1999-11-05T13:15:30Z, duration is 60 seconds and longdesc
is "Description of what you are actually buying", has alternative payment
systems - identified by name "AlternativePaymentSystems".
The first payment system is called "Micropay1". It has a name
"http://www.foo.it/micropay1" and a value "xxxxxxxxxxxxxxxxxxxx".
The second payment system is called "Micropay2". It has a name
"http://www.foo.it/micropay2" and a value "yyyyyyyyyyyyyyyyyyyy".
The Fee Link is specified with the A element from HTML 4.0.
The textlink parameter is in this case the content of the A element. The "id" attribute is used to assign a unique identifier to the A element and the "href" attribute is used to provide the source anchor.
<BODY> <A href="http://www.miamachina.org/page.html" id="feelink-1"> Buy the page through this link</A> </BODY>
The following RDF statements describing this Fee link are mentioned in the HEAD of the HTML document as follows:
a- Basic Serialization Syntax :
The specification of RDF uses the Extensible Markup Language [XML] encoding as its interchange syntax. RDF also requires the XML namespaces facility to precisely associate each property with the schema that defines the property; see Section 2.2.3., Schemas and Namespaces.
When a fragment of RDF is incorporated into an HTML document some browsers will render any exposed string content. Exposed string content is anything that appears between the ">" that ends one tag and the "<" that begins the next tag.
<HEAD> <TITLE>Example of Fee Link - Basic Serialization RDF Syntax Encoding</TITLE>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:mp="http://www.w3.org/schema/micropay#"> <rdf:description about="feelink-1"> <mp:price>+1E-2FRF</mp:price> <mp:merchantID rdf:resource="http://www.merchant.org/shop"/> <mp:buyurl rdf:resource="catalog.html"/> <mp:requesturl rdf:resource="page.html"/> <mp:longdesc>Description of what you are actually buying</mp:longdesc>
<mp:duration>60</mp:duration> <mp:expiration>1999-11-05T13:15:30Z</mp:expiration> <mp:paymentsystem> <rdf:alt> <rdf:li> <rdf:description ID="micropay1"> <rdf:type resource="http://www.w3.org/schema/micropay#paymentoption"/> <mp:system rdf:resource="http://www.foo.it/micropay1"/> <rdf:value>xxxxxxxxxxxxxxxxxx</rdf:value> </rdf:Description> </rdf:li> <rdf:li> <rdf:description ID="micropay2"> <rdf:type resource="http://www.w3.org/schema/micropay#paymentoption"/> <mp:system rdf:resource="http://www.foo.it/micropay2"/> <rdf:value>yyyyyyyyyyyyyyyyyyyy</rdf:value> </rdf:description> </rdf:li> </rdf:alt> </mp:paymentsystem> </rdf:description> </rdf:RDF> </HEAD>
b-Basic Abbreviated Syntax
While the serialization syntax shows the structure of an RDF model most clearly, often it is desirable to use a more compact XML form. The RDF abbreviated syntax accomplishes this.
The RDF abbreviated syntax can frequently be used to write property values that are strings in attribute form and leave only white space as exposed content.
The following RDF abbreviated syntax is equivalent to the above Basic Serialization Syntax.
<HEAD> <TITLE>Example of Fee Link - Abbreviated RDF Syntax Encoding</TITLE> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:mp="http://www.w3.org/schema/micropay#"> <rdf:description about="feelink-1" mp:price="+1E-2FRF" mp:longdesc="Description of what you are actually buying" mp:duration="60" mp:expiration="1999-11-05T13:15:30Z"> <mp:merchant rdf:resource="http://www.merchant.org/shop"/> <mp:buyurl rdf:resource="catalog.html"/> <mp:requesturl rdf:resource="page.html"/> <mp:paymentsystem> <rdf:alt> <rdf:li> <mp:Paymentoption rdf:ID="micropay1" system="http://www.foo.it/micropay1" rdf:value="xxxxxxxxxxxxxxxxxx"/> </rdf:li> <rdf:li> <mp:Paymentoption rdf:ID="micropay2" system="http://www.foo.it/micropay2" rdf:value="yyyyyyyyyyyyyyyyyy"/> </rdf:li> </rdf:alt> </mp:paymentsystem> </rdf:description>
</rdf:RDF>
</HEAD>
Note. Authors concerned about preventing their
RDF content from rendering in old browsers may use the abbreviated syntax
to move the property value into an attribute.
The above RDF Description may be external to the HTML document but linked
with an LINK element and supplied by the transfer mechanism in the same retrieval
transaction as that which returns the resource ("along-with"; e.g. with HTTP
GET or HEAD). The RDF file would be a separate URI .This would allow the
base HTML document to be cacheable.
Validate the above RDF description with
SiRPAC;
a Simple RDF Parser and Compiler, written by Janne Saarela (W3C).
c- Fee link User interface using CSS:
It is very important to users that fee links be distinguished from non-paying links, so that users do not follow a fee link unwittingly. Cascading Style Sheets [CSS2] may be used to add a particular style to fee links (and this style may be overridden by users if necessary). Authors should also clearly tell users that there are fee links in the document and that style sheets have been used to distinguish them.
Until style sheet support is consistent across most user agents, authors should also indicate in the content that following a given link will result in a payment. The following example illustrates how to indicate that a link is a "Fee link" in browsers that do not support CSS or when style sheet support is turned off.
<HTML>
<HEAD> <TITLE>Example of Fee Link Markup</TITLE> <STYLE TYPE="text/css"> #feelink-1 { border-width: 1 } .off { display: none }
</STYLE> </HEAD> <BODY> <P> <A rel="micropayment" href="http://www.miamachina.org/page.html" id="feelink-1"> <SPAN class="off">Fee link:</SPAN> I wish to purchase it.</A> </BODY>
</HTML>
This example renders on your browser as follows (framed in a box):
Fee Link: I wish to purchase it.
Note in this example that for browsers that support style sheets, the words "Fee link:" will not appear in the rendered document. However, if style sheets are turned off or not supported, they will, making the document more accessible and portable.
The Fee Link is specified using the HTML A and IMG elements.
The imagelink parameter is the value of the "src" attribute element.
<BODY> <A href="http://www.miamachina.org/page.html" id="feelink-img1"> <IMG src="http://www.merchant.org/product.gif" alt="Description of the fee image"> </A> </BODY>
The RDF statements describing this Fee image linked are mentioned in the HEAD of the HTML document, same as mentioned above.
As today most browsers are non-aware RDF browsers, we have to provide to the user agent a comprehensive HTML page.
A solution is to use a "transformation engine" hosted on the server (possibly
a servlet or a proxy).
This engine would read as input the HTML document and its linked RDF
document and transform these into an HTML document that includes either
OBJECT or APPLET or EMBED elements, though making it comprehensive
according to the client browser version and brands.
This engine could be dynamic (process on flight the proper HTML page compliant
to the client browser version) on client's request. These HTML generated
pages could then be cached on the server for future request. This engine
could also be a batch process to produce the alternative needed HTML page
to cover most browsers versions.
On client's HTTP request, the server should first discover the client browser
capabilities ( see Appendix 4) and according
to these capabilities send the HTML page using the proper embedding.
This solution generation a final HTML page on the server from an HTML source and RDF documents will:
The Merchant server needs to detect the browser capabilities in order to send to it the proper HLML page (with OBJECT or APPLET or EMBED elements).
Browser capabilities depend on browser version and brand but also on preferences set up by the user. The user can for instance disable JAVA, disable Javascript, etc.
This detection can be done using Javascript.
A.4.1 Detecting if the Browser is Javascript-enabled
We can not write a JavaScriptEnabled() method in Javascript: a non-JavaScript
browser or a browser with Javascript disabled will not be able to process
the method call.
A simple solution is to use :
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> function1</SCRIPT> and <NOSCRIPT> function 2 </NOSCRIPT>
One way of doing things is to redirect clients on test of enable or unable
to execute javascript :
A JavaScript-enabled browser executes the script (function 1) and
automatically redirect to a scriptable page "script.html"
A non-JavaScript browser follows the META element redirecting to another
non scriptabe page "noscript.html"
A.4.2 Detecting if the Browser is JAVA-enabled
A.4.3 Detecting if the Browser has the plugin installed
A.4.4 Detecting with HTML elements
This implementation generates the HTML page on the client side using Javascript for example. After detection of the browser capabilities, if the browser is Javascript-enabled, a script can generate the HTML elements and attributes for each fee link.
This implementation allows to eliminate the 2 HTTP round trips, (one for browser capabilities detection and an other one to send the proper HTML page)
Two possibilities have been overviewed :
A5.1 Example of code generating HTML
In this example all fee links parameters are passed in a SCRIPT element.
<HTML><HEAD> <TITLE>Example of generated HTML</TITLE>
<SCRIPT language="JavaScript">
<-- function markup(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
{
Supports = navigator.javaEnabled();
if (Supports)
writeapplet(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
else
if (navigator.appName.indexOf("Netscape")!=-1)
{
if (navigator.plugins["NPMINIPAY Dynamic Link Library"])
writeembed(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
else
document.writeln("You don't have Micropayment plugin installed and Java is not enabled in your browser")
}
else
alert("Please enable Java applets in your browser to make micropayments")
} //This function formats HTML 4.0 for a Java Applet" function writeobject(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
{ document.writeln (' <OBJECT codetype="application/java
classid="http://www.miamachina.org/applet/micropayment.class">')
document.writeln (' <PARAM NAME = "merchanturl" VALUE="' + p1 +'valuetype="ref" ')
document.writeln (' <PARAM NAME = "merchantname" VALUE="' + p2 +'valuetype="data" ')
document.writeln (' <PARAM NAME = "buyurl" VALUE="' + p3 +'valuetype="ref"')
document.writeln (' <PARAM NAME = "requesturl" VALUE="' + p5 +'valuetype="ref"')
document.writeln (' <PARAM NAME = "textlink" VALUE="' + p6 +'valuetype="data"')
document.writeln (' <PARAM NAME = "price" VALUE="' + p7 +'valuetype="data"')
document.writeln (' <PARAM NAME = "longdesc" VALUE="' + p8 +'valuetype="data"')
document.writeln (' <PARAM NAME = "duration" VALUE="' + p9 +'valuetype="data"')
document.writeln (' <PARAM NAME = "expiration" VALUE="' + p10 +'valuetype="data" ')
document.writeln ('</OBJECT>')
} //This function formats HTML 3.2 for a Java Applet function writeapplet(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
{ document.writeln (' <APPLET codebase="http://www.miamachina.org/applet/" code="micropayment.class" archive="myclasses.jar,myaudio.jar">')
document.writeln (' <PARAM NAME = "merchanturl" VALUE="' + p1 +'valuetype="ref" ')
document.writeln (' <PARAM NAME = "merchantname" VALUE="' + p2 +'valuetype="data" ')
document.writeln (' <PARAM NAME = "buyurl" VALUE="' + p3 +'valuetype="ref"')
document.writeln (' <PARAM NAME = "requesturl" VALUE="' + p5 +'valuetype="ref"')
document.writeln (' <PARAM NAME = "textlink" VALUE="' + p6 +'valuetype="data"')
document.writeln (' <PARAM NAME = "price" VALUE="' + p7 +'valuetype="data"')
document.writeln (' <PARAM NAME = "longdesc" VALUE="' + p8 +'valuetype="data"')
document.writeln (' <PARAM NAME = "duration" VALUE="' + p9 +'valuetype="data"')
document.writeln (' <PARAM NAME = "expiration" VALUE="' + p10 +'valuetype="data" ')
document.writeln (" </APPLET>")
} //This function formats non standard HTML for a Plugin function writeembed(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
{ document.writeln (' <EMBED src="http://www.miamachina.org/MicropaymentPlugin.exe/">')
document.writeln (' <merchanturl=+"p1"')
document.writeln (' <merchantname=+"p2"')
document.writeln (' <buyurl=+"p3"')
document.writeln (' <requesturl=+"p5"')
document.writeln (' <textlink=+"p6"')
document.writeln (' <price=+"p7"')
document.writeln (' <longdesc=+"p8"')
document.writeln (' <duration=+"p9"')
document.writeln (' <expiration=+"p10"')
document.writeln (' </EMBED> ')
}
</SCRIPT> </HEAD>
<BODY> <H2>Generate [Embed] or [Applet] depending on Browser capabilities</H2> <NOSCRIPT>This page uses JavaScript. You should enable JavaScript </NOSCRIPT> <SCRIPT language="JavaScript"> //Micropayment information needed for each fee link markup("http://www.merchant.org/shop","shopandpay","catalog.html", "page.html","click here to by the product","+0.01USD", "Description of what you are actually buying","60","1999-11-05T08:15:30-05:00");
</SCRIPT> </BODY></HTML>
A5.2 Second example of code generating HTML
In this second example all fee link parameters are passed in a META element.(same kind of code would apply to parameters passed in an RDF element).
This needs to access the Document Object Model to extract META or RDF statements
in order to generate the proper HTML page with OBJECT or APPLET or EMBED
elements.
Netscape Browser Object Model in Navigator 4.x or previous does not
provide access to these elements.
Therefore this example works ONLY with Internet Explorer browser.
This code extracts attributes from META and RDF elements. To complete the
process, other code must first detect the browser capabilities (as shown
in Appendix 4), and generate an HTML page as above.
a. Getting parameters from META elements
<HTML><HEAD> <TITLE>Example of Getting parameters from META elements</TITLE> <META name="merchanturl" value="http://www.merchant.org/shop"> <META name="buyurl" value="catalog.html" > <META name="requesturl" value="page.html"> <META name="textlink" value="click here to by the product"> <META name="price" value="+0.01USD" > <META name="longdesc" value="Description of what you are actually buying"> <META name="duration" value="60"> <META name="expiration" value="1999-11-05T08:15:30-05:00 "> <META name="1.mpname" value="micropayment"> <META name="1.mpurl" value="http://www.foo.it/micropay"> <META name="1.specific" value="124rfdetg14ft58rdef21f4251"> <META name="1.merchanturl" value="http://www.merchant.it"> <META name="2.mpname" value="millipay"> <META name="2.mpurl" value="http://www.foo.it/millipay"> <META name="2.specific" value="475rdg546tfeww12wcft254hy4"> <META name="2.merchanturl" value="http://www.merchant.fr/"> </HEAD> <BODY> <SCRIPT language="JavaScript"> var coll = document.all.tags("META"); //Write the OBJECT element and it's parameters - for each fee link document.writeln ('<OBJECT codetype="application/java classid="http://www.miamachina.org/applet/micropayment.class" >') for (i = 0; i < coll.length; i++) { document.writeln('<PARAM NAME ="' + coll(i).name + '"' + ' VALUE="' + coll(i).value +'">'); } document.writeln ('</OBJECT>') </SCRIPT> </BODY></HTML>
b. Getting parameters from RDF element
<HTML><HEAD> <TITLE>Example Getting parameters from RDF elements</TITLE> <rdf:RDF> <rdf:Description about="feelink-1" name="merchanturl" value="http://www.merchant.org/shop"> .... </RDF:Description> </rdf:RDF></HEAD> <BODY> <SCRIPT language="JavaScript"> //Write the OBJECT element and it's parameters - for each fee link document.writeln ('<OBJECT codetype="application/java classid="http://www.miamachina.org/applet/micropayment.class" >') var coll = document.all.tags("RDF:Description"); for (i = 0; i < coll.length; i++) { document.writeln('<PARAM NAME ="' + coll(i).name + '"' + ' VALUE="' + coll(i).value +'">'); } document.writeln ('</OBJECT>') </SCRIPT> </BODY></HTML>
To guarantee unique naming for payment system names and avoid collision, a registry MUST record all names in a pre-assigned list.
Company | Payment System | Unique Code Name |
---|---|---|
Compaq | MilliCent | mcent |
IBM | IBM Micro payments | mpay |
France Telecom | Micrommerce | microm |
to be updated | ......... |
The current and former members of the Micropayment Markup Working Group are:
Amir Herzberg, Chair (IBM); Anat Sarig, (IBM); Mark Manase, Co-Chair (Compaq); Thierry Michel, Editor (W3C); Jean Claudes Pailles (France Telecom); Phillipe Michon (France Telecom).