As described here https://developers.payrexx.com/docs/mobile-apps-javascript
I would like to interact with the javascript events of an iframe I want to create in the webview_flutter plugin.
The following example code is given in the official documentation
window.addEventListener('message', handleMessage(this), false);
and
function handleMessage(e) {
  if (typeof e.data === 'string') {
    try {
      var data = JSON.parse(e.data);
    } catch (e) {}
    if (data && data.payrexx) {
      jQuery.each(data.payrexx, function(name, value) {
        switch (name) {
          case 'transaction':
            if (typeof value === 'object') {
              if (value.status === 'confirmed') {
                //handling success
              } else {
                //handling failure
              }
            }
            break;
        }
      });
    }
    }
  }
Do you know a way to do this? I have implemented an iframe in which there is the address of my gateway, but it is impossible to check if the payment has taken place.
 
                        
when I try to do the post, I get:
I understand the the origins are not the same but this should be done this way according to the documentation?