send coupon code server side to be applied to users subscription

This commit is contained in:
Henry Oswald 2015-03-04 17:50:24 +00:00
parent 69806c02d0
commit 80dc2f9224
2 changed files with 2 additions and 0 deletions

View file

@ -13,6 +13,7 @@ module.exports = RecurlyWrapper =
<subscription>
<plan_code>#{subscriptionDetails.plan_code}</plan_code>
<currency>#{subscriptionDetails.currencyCode}</currency>
<coupon_code>#{subscriptionDetails.coupon_code}</coupon_code>
<account>
<account_code>#{user._id}</account_code>
<email>#{user.email}</email>

View file

@ -101,6 +101,7 @@ define [
subscriptionDetails:
currencyCode:pricing.items.currency
plan_code:pricing.items.plan.code
coupon_code:pricing.items?.coupon?.code || ""
$http.post("/user/subscription/create", postData)
.success (data, status, headers)->
window.location.href = "/user/subscription/thank-you"