fix(gifts): $rootScope => Payments

This commit is contained in:
Tyler Renelle 2014-12-03 19:38:09 -07:00
parent bd5f8d79ea
commit 3423e9857d

View file

@ -35,7 +35,7 @@ function($rootScope, User, $http, Content) {
panelLabel: sub ? window.env.t('subscribe') : window.env.t('checkout'),
token: function(res) {
var url = '/stripe/checkout?a=a'; // just so I can concat &x=x below
if (data.gift) url += '&gift=' + $rootScope.encodeGift(data.uuid, data.gift);
if (data.gift) url += '&gift=' + Payments.encodeGift(data.uuid, data.gift);
if (data.subscription) url += '&sub='+sub.months;
$http.post(url, res).success(function() {
window.location.reload(true);