From 7aff24b3a678071e8b25f515be922d3995c43746 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 12 Jan 2016 12:34:10 -0800 Subject: [PATCH] Cleaned up a couple SubscribeModal things --- app/core/services/stripe.coffee | 3 +-- app/views/core/SubscribeModal.coffee | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/core/services/stripe.coffee b/app/core/services/stripe.coffee index 7bdab0231..8a77e5dca 100644 --- a/app/core/services/stripe.coffee +++ b/app/core/services/stripe.coffee @@ -7,7 +7,6 @@ if StripeCheckout? email: me.get('email') image: "https://codecombat.com/images/pages/base/logo_square_250.png" token: (token) -> - console.log 'trigger?', handler.trigger handler.trigger 'received-token', { token: token } Backbone.Mediator.publish 'stripe:received-token', { token: token } locale: 'auto' @@ -15,4 +14,4 @@ if StripeCheckout? else module.exports = {} console.error "Failure loading StripeCheckout API, returning empty object." -_.extend(handler, Backbone.Events) \ No newline at end of file +_.extend(handler, Backbone.Events) diff --git a/app/views/core/SubscribeModal.coffee b/app/views/core/SubscribeModal.coffee index 166a0ef4d..a65c294fc 100644 --- a/app/views/core/SubscribeModal.coffee +++ b/app/views/core/SubscribeModal.coffee @@ -201,13 +201,13 @@ module.exports = class SubscribeModal extends ModalView @state = 'unknown_error' @stateMessage = "Uknown problem occurred while processing Stripe request" - onSubscriptionSuccess: => + onSubscriptionSuccess: -> application.tracker?.trackEvent 'Finished subscription purchase', value: @purchasedAmount Backbone.Mediator.publish 'subscribe-modal:subscribed', {} @playSound 'victory' @hide() - onSubscriptionError: (user, response, options) => + onSubscriptionError: (user, response, options) -> console.error 'We got an error subscribing with Stripe from our server:', response application.tracker?.trackEvent 'Failed to finish subscription purchase', status: options.xhr?.status, value: @purchasedAmount stripe = me.get('stripe') ? {}