@tamara-solution/checkout
Version:
Script will be embedded in merchant's site to checkout. The merchant's don't need to redirect to tamara's site.
15 lines (11 loc) • 358 B
JavaScript
import isBrowser from '@/helpers/is-browser'
import { FrameError } from '@/helpers/frame-error'
function sendEvent(message) {
if (!isBrowser()) {
throw new FrameError(
'Do not support none browser yet!!! Please contact tamara team.'
)
}
window.postMessage(message + '', window.protocol + '//' + window.host)
}
export default sendEvent