This will guide on how to embed the payment page in iframe on your page and trigger the payment with your own "Pay button" UI
// Assuming the iframe has an id of 'myIframe' function triggerIframeButton() { const iframe = document.getElementById("myIframe"); if (iframe) { // Send the message to the iframe iframe.contentWindow.postMessage("triggerPayButton", "https://uiservices.coriunder.cloud"); } } // Example usage: attach to a button click in the parent window document.getElementById("parentButton").addEventListener("click", triggerIframeButton);
When a user reaches the final page of the payment process, a postMessage event is sent to the parent window containing transaction details.
postMessage
window.parent.postMessage({ replyCode, codeDescription, trans_ID, trans_Date, paymentDisplay, storageID, ExpMonth, ExpYear, recurringID, Amount, Currency, Order, MerchantId, ClientFullName }, "*");
window.addEventListener("message", function(event) { const messageData = event.data; console.log("Transaction Details Received:", messageData); });
learn how to process SALE request.
Learn how to process an APM request.
Use the product pages (Voucher Template).