Yes.
To do this, in the
event handler code, handle the
ORDER_COMPLETED event.
You will get a code like this:
window.bukzaCallbackForBuzaContainer99999 = function(payload){
switch(payload.message.event){
//other handlers
case 'ORDER_COMPLETED':
window.location = 'https://example.com'
break;
}
};
In the example above:
-
BuzaContainer99999 — the id value of the div container where the widget is inserted.
-
https://example.com — a URL of the webpage where a customer should be redirected to.
If you insert code inside a widget, use something like this:
<html>
<body>
<script>
window.addEventListener('message', function (e) {
if (e && e.origin
&& e.origin.indexOf('bukza.com') !== -1)
var message = JSON.parse(e.data);
switch (message.event) {
//other handlers
case 'ORDER_COMPLETED':
window.top.location.href = 'https://example.com'
break;
}
}, false);
</script>
</body>
</html>