Skip to content
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

Should list of accepted payment methods be strings or objects? #48

Closed
msporny opened this issue Mar 14, 2016 · 1 comment
Closed

Should list of accepted payment methods be strings or objects? #48

msporny opened this issue Mar 14, 2016 · 1 comment

Comments

@msporny
Copy link
Member

msporny commented Mar 14, 2016

Migrated from w3c/webpayments#37:

The paymentRequest API asserts that the list of accepted payment methods that a payee exposes to the payer should be a list of strings:

http://wicg.github.io/paymentrequest/specs/paymentrequest.html#paymentrequest-interface

For example:

["visa", "bitcoin", "bobpay.com"]

The Web Payments CG Browser API asserts that the list should be composed of objects:

http://wicg.github.io/web-payments-browser-api/#processing-a-payment-request

For example:

acceptedScheme: [{
    scheme: [
      'https://w3id.org/payment-schemes#Visa',
      'https://w3id.org/payment-schemes#Mastercard',
      'https://w3id.org/payment-schemes#Discover'
    ],
    transfer: {
      amount: '4.35',
      currency: 'USD'
    },
    paymentRequestService: 'https://merchant-psp.example.com/services/getPaymentInfo'
  }, {
    scheme: 'https://w3id.org/payment-schemes#Bitcoin',
    transfer: {
      amount: '0.0177',
      currency: 'BTC'
    },
    destination: '3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC'
  },

Should list of accepted payment methods be strings or objects?

msporny added a commit to msporny/browser-payment-api that referenced this issue Mar 16, 2016
@mattsaxon mattsaxon added this to the Priority: Medium milestone Mar 21, 2016
msporny added a commit to msporny/browser-payment-api that referenced this issue Mar 29, 2016
adrianba pushed a commit that referenced this issue Apr 1, 2016
@adrianhopebailie
Copy link
Collaborator

PR #133 proposes a solution to the issue.

@adrianhopebailie adrianhopebailie modified the milestone: Priority: Medium Apr 22, 2016
@adrianhopebailie adrianhopebailie added this to the Discuss on Call - 28 April milestone Apr 28, 2016
adrianba added a commit to adrianba/browser-payment-api that referenced this issue Apr 28, 2016
Fixes w3c#48.

PR w3c#162 refactored the supportedMethods and payment specific data
fields. Issue w3c#3 discusses supporting multiple currencies and issue w3c#4
discusses price per payment method and we should consider specific
proposals for those issues.

PR w3c#162 replaces the `sequence<DOMString>` with
`sequence<PaymentMethodData>` so we now use objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants