[w3c/payment-request] .hasEnrolledInstrument() throws exception "NotAllowedError: Exceeded query quota for hasEnrolledInstrument" (Issue #984)

 In one browser session we are only allowed to make hasEnrolledInstrument() api call for one payment method
i.e. if we make hasEnrolledInstrument api call for **some payment app** (this gives proper result) and then do the hasEnrolledInstrument api call for **some other payment app** it will throw exception with below error.
NotAllowedError: Exceeded query quota for hasEnrolledInstrument

First we create a paymentRequest object for payment app 1 and call the hasEnrolledInstrument api, save its response. Then create another paymentRequest object for payment app 2, call hasEnrolledInstrument api and store its response. Use these responses to render the app icons on UI application.

Also tried below approaches
- passing the two payment methods while creating the paymentRequest object like

supportedMethods: ["payment method for app 1", "payment method for app 2"],
In this scenario it club two method urls into one ("payment method for app 1, payment method for app 2") and returns false each time.

- passing two different supported method objects while creating the paymentRequest object like
supportedInstrumnet = [{
          supportedMethods: ["payment method for app 1"],
      },
      {
          supportedMethods: ["payment method for app 2"],
      }                            
      ]
In this scenario this returns true if any of the app (app 1 or app 2) has payment instrument.
The problem with this approach is that it will not give app level ready ness to render the app icons.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/984
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/payment-request/issues/984@github.com>

Received on Monday, 21 February 2022 05:12:44 UTC