w3c / secure-payment-confirmation

Secure Payment Confirmation (SPC)
https://w3c.github.io/secure-payment-confirmation/
Other
106 stars 48 forks source link

Example of `locale` member #226

Closed aphillips closed 1 year ago

aphillips commented 1 year ago

1.2.2. Authentication on merchant site https://w3c.github.io/secure-payment-confirmation/#authentication-example

 data: {
    // List of credential IDs obtained from the bank.
    credentialIds,

    rpId: "fancybank.com",

    // The challenge is also obtained from the bank.
    challenge: new Uint8Array([21,31,105 /* 29 more random bytes generated by the bank */]),

    instrument: {
      displayName: "Fancy Card ****1234",
      icon: "https://fancybank.com/card-art.png",
    },

    payeeName: "Merchant Shop",
    payeeOrigin: "https://merchant.com",

    timeout: 360000,  // 6 minutes
  }], {
    total: {
      label: "Total",
      amount: {
        currency: "USD",
        value: "5.00",
      },
    },
  });

Example 2 (linked above) shows the use of a secure payment confirmation request. The request structure is described in section 4.1.3 and includes a locale member for negotiating the locale of the response.

It would be useful to show this mechanism in the example, especially since the examples are all in English and somewhat U.S.-centric. It would be okay to show using en or en-US as the locale requested. Note that this is an editorial comment.

ianbjacobs commented 1 year ago

@aphillips, I believed this issue can be closed with the merge of pull request #229. Thanks!

aphillips commented 1 year ago

LGTM!

ianbjacobs commented 1 year ago

Cool! You get to remove the label, cf recent thread! ;)