I create a service worker and a payment manager they are well registered on my browser. I made an instrument set but I can't find the instrument to register with the payment methods and when I look at the payment process, the instrument key is empty.
console.log(navigator.serviceWorker.ready)
return navigator.serviceWorker.ready;
}).then((registration) => {
console.log(registration)
if (!registration.paymentManager) {
console.log('No payment handler capability in this browser. Is chrome://flags/#service-worker-payment-apps enabled?');
return;
}
if (!registration.paymentManager.instruments) {
console.log('Payment handler is not fully implemented. Cannot set the instruments.');
return;
}
registration.paymentManager.instruments
.set('instrument-key', {
name: 'Chrome uses name and icon from the web app manifest',
enabledMethods: ['https://paymentTrequest.fr'],
method: 'https://paymentTrequest.fr',
capabilities: {supportedNetworks: ['yo', 'rt'],
supportedTypes: ['debit', 'credit']}
}) ```
[![image handlers payment navigator][1]][1]
[1]: https://i.stack.imgur.com/73RA2.png