{"action":"created","issue":{"url":"https://api.github.com/repos/bendrucker/angular-stripe/issues/6","labels_url":"https://api.github.com/repos/bendrucker/angular-stripe/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/bendrucker/angular-stripe/issues/6/comments","events_url":"https://api.github.com/repos/bendrucker/angular-stripe/issues/6/events","html_url":"https://github.com/bendrucker/angular-stripe/issues/6","id":57562386,"number":6,"title":"promise not be given - .then() undefined","user":{"login":"lytroo","id":573024,"avatar_url":"https://avatars.githubusercontent.com/u/573024?v=3","gravatar_id":"","url":"https://api.github.com/users/lytroo","html_url":"https://github.com/lytroo","followers_url":"https://api.github.com/users/lytroo/followers","following_url":"https://api.github.com/users/lytroo/following{/other_user}","gists_url":"https://api.github.com/users/lytroo/gists{/gist_id}","starred_url":"https://api.github.com/users/lytroo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lytroo/subscriptions","organizations_url":"https://api.github.com/users/lytroo/orgs","repos_url":"https://api.github.com/users/lytroo/repos","events_url":"https://api.github.com/users/lytroo/events{/privacy}","received_events_url":"https://api.github.com/users/lytroo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-13T05:51:15Z","updated_at":"2015-02-13T12:08:02Z","closed_at":null,"body":"I am using this on the angle dashboard plugin running anuglar 1.3.10 found at https://wrapbootstrap.com/theme/angle-bootstrap-admin-app-angularjs-WB04HF123 if it is a compatability issue.\r\n\r\nI get a successful response from stripe with a created token. But \r\n\r\n $scope.charge = function () {\r\n\t    return Stripe.card.createToken($scope.stripeAccount)\r\n>>\t      .then(function (token) {\r\n\t        console.log('token created for card ending in ', token.card.last4);\r\n\t        var payment = angular.copy($scope.payment);\r\n\t        payment.card = void 0;\r\n\t        payment.token = token.id;\r\n\t        return $http.post('https://yourserver.com/payments', payment);\r\n\t      })\r\n\t      .then(function (payment) {\r\n\t        console.log('successfully submitted payment for $', payment.amount);\r\n\t      })\r\n\t      .catch(function (err) {\r\n\t        if (err.type && /^Stripe/.test(err.type)) {\r\n\t          console.log('Stripe error: ', err.message);\r\n\t        }\r\n\t        else {\r\n\t          console.log('Other error occurred, possibly with your API', err.message);\r\n\t        }\r\n\t      });\r\n\t  };\r\n\r\nand below is the error:\r\n\r\n TypeError: undefined is not a function\r\n    at f.$scope.charge (http://loc.rvshare.com:8888/panel/app/js/app.js:4016:8)\r\n    at $o.functionCall (http://loc.rvshare.com:8888/panel/app/js/base.js:7:10219)\r\n    at ra.(anonymous function).compile.n.on.i (http://loc.rvshare.com:8888/panel/app/js/base.js:7:16597)\r\n    at f.$get.f.$eval (http://loc.rvshare.com:8888/panel/app/js/base.js:6:1083)\r\n    at f.$get.f.$apply (http://loc.rvshare.com:8888/panel/app/js/base.js:6:1309)\r\n    at HTMLButtonElement.<anonymous> (http://loc.rvshare.com:8888/panel/app/js/base.js:7:16649)\r\n    at HTMLButtonElement.Z.event.dispatch (http://loc.rvshare.com:8888/panel/app/js/base.js:2:14424)\r\n    at HTMLButtonElement.Z.event.add.m.handle (http://loc.rvshare.com:8888/panel/app/js/base.js:2:11199)base.js:5 (anonymous function)base.js:5 $getbase.js:6 $get.f.$applybase.js:7 (anonymous function)base.js:2 Z.event.dispatchbase.js:2 Z.event.add.m.handle"},"comment":{"url":"https://api.github.com/repos/bendrucker/angular-stripe/issues/comments/74244488","html_url":"https://github.com/bendrucker/angular-stripe/issues/6#issuecomment-74244488","issue_url":"https://api.github.com/repos/bendrucker/angular-stripe/issues/6","id":74244488,"user":{"login":"bendrucker","id":808808,"avatar_url":"https://avatars.githubusercontent.com/u/808808?v=3","gravatar_id":"","url":"https://api.github.com/users/bendrucker","html_url":"https://github.com/bendrucker","followers_url":"https://api.github.com/users/bendrucker/followers","following_url":"https://api.github.com/users/bendrucker/following{/other_user}","gists_url":"https://api.github.com/users/bendrucker/gists{/gist_id}","starred_url":"https://api.github.com/users/bendrucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendrucker/subscriptions","organizations_url":"https://api.github.com/users/bendrucker/orgs","repos_url":"https://api.github.com/users/bendrucker/repos","events_url":"https://api.github.com/users/bendrucker/events{/privacy}","received_events_url":"https://api.github.com/users/bendrucker/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T12:08:02Z","updated_at":"2015-02-13T12:08:02Z","body":"I need to see your code. "}}