fullScriptURL property

String get fullScriptURL

Returns the full URL for the PayEngine script.

If a valid scriptURL containing "embed.js" is provided, it is used directly. Otherwise, a default script URL is generated using the base URL and public key.

Example:

String scriptUrl = config.fullScriptURL;

Implementation

String get fullScriptURL {
  if (scriptURL != null &&
      scriptURL!.isNotEmpty &&
      scriptURL!.contains("embed.js")) {
    return scriptURL!;
  }
  return "$baseURL/js/1.0.0/embed.js?key=$publicKey&logLevel=10";
}