If you are embedding the Pyxis pay page as an internal frame, then you can receive notification from the page when its operation is complete. There is also an optional notification when the page has successfully loaded. To get these notifications, it is simply a matter of creating a function in the parent window of the embedded frame that will catch messages from the pay page. The message will tell you if the operation is complete, had an error or if the user hit the cancel button.
Below is an example of how to set up the function in the parent window of the pay page embedded frame. This example uses jQuery to access the onload function in HTML but this is not necessary for the functionality to work.

Page Callback Functions for synchronous communication


<script type="text/javascript" >

$(document).ready(function()  
{  
    window.addEventListener("message", receiveMessage, false);  
});

function receiveMessage(event)  
{  
    alert("Got the message: " + event.data);  
}

</script>


There are three types of messages you can receive for each session type when the pay page operation is completed. Within each session type, there are three possible results: “successful”, “unsuccessful” and “cancelled”.

For the tokenization session type:
The first tells tell you that tokenization was successful and the results are ready in the Pyxis System to retrieve. The second tells you that an error occurred during tokenization and gives you a brief human readable error message. The last tells you that the user hit the cancel button and the operation was interrupted.

“Tokenization=successful&ErrorMessage=SUCCESS”
“Tokenization=unsuccessful&ErrorMessage=Transaction+Not+Found”
“Tokenization=cancelled&ErrorMessage=User+cancelled”

For the optional “notify of alert” message will take the form:
“Tokenization=alerted&ErrorMessage=One+or+more+entry+errors+present+in+billing+information”

For the sale session type, the results posted back are similar:
“Sale=successful&ErrorMessage=SUCCESS”
“Sale=unsuccessful&ErrorMessage=Transaction+Not+Found”
“Sale=cancelled&ErrorMessage=User+cancelled”

For the optional “notify of alert” message will take the form:
“CollectBilling=alerted&ErrorMessage=One+or+more+entry+errors+present+in+billing+information”

The optional “page loaded” message will have the form: “PayPageLoadedSuccessful=true”