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.
Sounds like an issue being filed against Chrome. I'm moving it to https://crbug.com/1299767. Please add Chrome version and a possible minimal reproduction demo page to that bug report.
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
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.
] 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.