Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. scope.paypal = function() {
  2. Client.details().then(function(client) {
  3. $localStorage.searchParams = JSON.stringify(client);
  4. scope.redirecting = true;
  5. var return_url = $location.protocol() + '://' + $location.host() + '/confirm';
  6. Order.create({return_url: return_url, cart_id: scope.cart.cart.cart_id }).$promise.then(function(results) {
  7. $window.location.href = results.redirect_url;
  8. });
  9. });
  10. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement