(function() { 'use strict'; angular .module('LyncPix.ShoppingCartModule') .controller('PaymentDoneController', PaymentDoneController); /** @ngInject */ function PaymentDoneController($log, $rootScope, Orders) { var vm = this; var UGUID ='38A5B679-B290-48C0-A828-36C8F6727D15'; $log.debug('PaymentDoneController Activated'); activate(); function activate () { loadShoppingCart(); } function loadShoppingCart() { Orders.getLast(UGUID) .then(function(order) { vm.order = order; $log.debug('vm.order', vm.order); }); } $rootScope.$on('ShoppingCartRefreshed', function() { loadShoppingCart(); }); } })();