-
Notifications
You must be signed in to change notification settings - Fork 42
[Spec] Add support for a 'details' string for PaymentCredentialInstrument #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ment This change adds the ability for the SPC caller to specify a short additional detail string for the PaymentCrednetialInstrument. This allows for a richer UX, e.g. in the world of cards one could specify a rich 'product' name for the displayName, and then add the last-four digits and expiry in details: displayName=Fancy Bank Platinum Card details=****1234 01/26
cc @darwinlyang |
@@ -384,7 +384,8 @@ const request = new PaymentRequest([{ | |||
challenge: new Uint8Array([21,31,105 /* 29 more random bytes generated by the bank */]), | |||
|
|||
instrument: { | |||
displayName: "Fancy Card ****1234", | |||
displayName: "FancyBank Platinum Card", | |||
details: "****1234 | 01/29", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open question: is details
a good name here? Should we call it displayDetails
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong feeling about the name. I note below that you wrote "Optional additional detail string" so another name idea is 'additionalDetails'.
@@ -1243,6 +1248,7 @@ The following data structures are shared between registration and authentication | |||
required USVString displayName; | |||
required USVString icon; | |||
boolean iconMustBeShown = true; | |||
USVString details; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an alternate approach, we could instead extend the existing displayName
concept, into:
dictionary PaymentCredentialInstrument {
required (USVString or PaymentCredentialInstrumentDetails) displayName;
required USVString icon;
boolean iconMustBeShown = true;
}
dictionary PaymentCredentialInstrumentDetails {
required USVString primaryDetails;
USVString secondaryDetails; // maybe required?
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would then write this like:
const instrument = {
displayName: {
primaryDetails: "FancyBank Platinum Card",
secondaryDetails: "**** 1234 | 01/27",
},
icon: ...
};
@@ -384,7 +384,8 @@ const request = new PaymentRequest([{ | |||
challenge: new Uint8Array([21,31,105 /* 29 more random bytes generated by the bank */]), | |||
|
|||
instrument: { | |||
displayName: "Fancy Card ****1234", | |||
displayName: "FancyBank Platinum Card", | |||
details: "****1234 | 01/29", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong feeling about the name. I note below that you wrote "Optional additional detail string" so another name idea is 'additionalDetails'.
This change adds the ability for the SPC caller to specify a short additional detail string for the PaymentCredentialInstrument. This allows for a richer UX, e.g. in the world of cards one could
specify a rich 'product' name for the displayName, and then add the last-four digits and expiry
in details:
Tasks:
Preview | Diff