iFrame Integration
How to display a CreditCard payment page in an iFrame?
The Integration of a CreditCard payment page, without any redirection, is possible through an iFrame integration. Once you've requested PaymentOrder/Create web service, you can display the paymentPageUrl in an iFrame. This iFrame needs an id called: "LmkFrame". We recommend also to put a scrolling no attribute for design reasons.
iFrame width contraints:
Minimum width: 320px
Maximum width: 940px
Sample HTML code:
<iframe id="LmkFrame" scrolling="no" style="margin-left: 33%;" height="500px" width="700px"></iframe>
To avoid a final redirection of the payment page, inside the iFrame, we recommend to implement the JavaScript code below:
<script>
var frame = document.getElementById('LmkFrame');
frame.addEventListener('load', function () {
var currentSrcIframe = frame.ownerDocument.defaultView.window[0].location.href;
if (currentSrcIframe.includes('payment.limonetik') == false) {
document.location.href = currentSrcIframe;
}
});
</script>
It will allow your website to make the final redirection outside of the iFrame and respect a payment flow of a redirection cinematic while giving your customer the impression that there was no redirection.
Updated over 1 year ago