Old SDK webview
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>Webview Page</title>
</head>
<body>
<noscript>
Please enable javascript
</noscript>
<script id="mp-snippet">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
window.mhAsyncInit = function() {
MP.COLOR_THEME = 'green';
MP.APP_KEY = 'CHANGE_WITH_YOUR_APP_KEY';
MP.SHOW_NAVBAR = false; //set false, if you want disable the widget navbar and using the native apps navbar
};
//-- EVENT API
window.mhOnWidgetLoaded = function() {
// OPEN THE WIDGET AUTOMATICALLY WHEN PAGE LOADED
MP.openWidget();
};
window.mhOnWidgetOpen = function() {
// PUT EVENT HERE
console.log("it's Open!");
};
window.mhOnTransactionSuccess = function() {
// PUT EVENT HERE
};
//SDK Snippet
!function(a,b,c){var d=a.createElement(b),e=a.getElementById("mp-snippet");
d.async=!0,d.id=c,d.src="https://mpwidget.s3.amazonaws.com/dist/v0.5.0/jssdk.min.js",
e.parentNode.insertBefore(d,e)}(document,"script","mp-widget");
</script>
</body>
</html>