Instantly share code, notes, and snippets.

View payment.sagepay.providersettings.controller.js
angular.module('merchello.plugins.sagepay').controller('Merchello.Plugin.Payment.SagePayPaymentProviderController',
['$scope',
function ($scope) {
console.info($scope.dialogData);
if ($scope.dialogData.provider.extendedData.items.length > 0) {
var extendedDataKey = 'merchSagePayProviderSettings';
var settingsString = $scope.dialogData.provider.extendedData.getValue(extendedDataKey);
$scope.sagePayProviderSettings = angular.fromJson(settingsString);