   currency: "USD",
      value: "1.00",
    },
  },
});

// We are going to use the id to prove that this works
// which we will pass back to the caller
window.onmessage = async event => {
  const { source, data: { id, request } } = event;
  switch (request) {
    case "show-payment-request": {
      const details = Object.assign({}, defaultDetails, { id });
      const request = new PaymentRequest(defaultMethods, details);
      try {
        const response = await request.show();
        source.postMessa