Mobile Apps
<iframe id="payrexx" src="{URL}" width="530" height="700">
</iframe>window.addEventListener('message', handleMessage(this), false);function handleMessage(e) {
if (typeof e.data === 'string') {
try {
let 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;
}
});
}
}
}Example: React Native
Last updated