Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scope.paypal = function() {
- Client.details().then(function(client) {
- $localStorage.searchParams = JSON.stringify(client);
- scope.redirecting = true;
- var return_url = $location.protocol() + '://' + $location.host() + '/confirm';
- Order.create({return_url: return_url, cart_id: scope.cart.cart.cart_id }).$promise.then(function(results) {
- $window.location.href = results.redirect_url;
- });
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement