getCheckout method
Gets checkout configuration from CDN config
Implementation
dynamic getCheckout([String? key]) {
_ensureInitialized();
try {
final cachedConfig = getCDNConfig();
final checkout = cachedConfig?.additionalData?['checkout'];
if (checkout != null) {
return key != null ? checkout[key] : checkout;
}
final defaultCheckout = _bundledConfig['checkout'];
if (key != null && defaultCheckout != null) {
return defaultCheckout[key];
}
return defaultCheckout;
} catch (e) {
final checkout = _bundledConfig['checkout'];
if (key != null && checkout != null) {
return checkout[key];
}
return checkout;
}
}