generateHTML static method
Implementation
static String generateHTML(
PayEngineConfig config, String componentName, Map<String, String> props,
{String source = 'native '}) {
var scriptURL = "${config.fullScriptURL}?key=${config.publicKey}";
var component = getHtmlTag(componentName, props);
return '''
<!DOCTYPE html>
<html>
<head>
<title>PayEngine Elements</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
${source == 'web' ? '<script>${injectJavascript(source: source)}</script>' : ''}
<script src="$scriptURL" async defer type="text/javascript"></script>
</head>
<body>
$component
</body>
</html>
''';
}