mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
WIP: process appears to work, setting address correctly
This commit is contained in:
parent
56bc840b88
commit
026e9f46c8
1 changed files with 9 additions and 7 deletions
|
@ -35,7 +35,7 @@ module.exports = RecurlyWrapper =
|
||||||
)
|
)
|
||||||
|
|
||||||
, (result, next) -> # create account
|
, (result, next) -> # create account
|
||||||
if !result.userExists
|
if result.userExists
|
||||||
logger.log {user_id: user._id, recurly_token_id}, "user already exists in recurly"
|
logger.log {user_id: user._id, recurly_token_id}, "user already exists in recurly"
|
||||||
return next(null, result)
|
return next(null, result)
|
||||||
logger.log {user_id: user._id, recurly_token_id}, "creating user in recurly"
|
logger.log {user_id: user._id, recurly_token_id}, "creating user in recurly"
|
||||||
|
@ -51,9 +51,9 @@ module.exports = RecurlyWrapper =
|
||||||
<address>
|
<address>
|
||||||
<address1>#{address.address1}</address1>
|
<address1>#{address.address1}</address1>
|
||||||
<address2>#{address.address2}</address2>
|
<address2>#{address.address2}</address2>
|
||||||
<city>#{address.city}</city>
|
<city>#{address.city || ''}</city>
|
||||||
<state>#{address.state}</state>
|
<state>#{address.state || ''}</state>
|
||||||
<zip>#{address.zip}</zip>
|
<zip>#{address.zip || ''}</zip>
|
||||||
<country>#{address.country}</country>
|
<country>#{address.country}</country>
|
||||||
</address>
|
</address>
|
||||||
</account>
|
</account>
|
||||||
|
@ -112,9 +112,9 @@ module.exports = RecurlyWrapper =
|
||||||
<billing_info>
|
<billing_info>
|
||||||
<address1>#{address.address1}</address1>
|
<address1>#{address.address1}</address1>
|
||||||
<address2 nil="nil">#{address.address2}</address2>
|
<address2 nil="nil">#{address.address2}</address2>
|
||||||
<city>#{address.city}</city>
|
<city>#{address.city || ''}</city>
|
||||||
<state>#{address.state}</state>
|
<state>#{address.state || ''}</state>
|
||||||
<zip>#{address.zip}</zip>
|
<zip>#{address.zip || ''}</zip>
|
||||||
<country>#{address.country}</country>
|
<country>#{address.country}</country>
|
||||||
</billing_info>
|
</billing_info>
|
||||||
"""
|
"""
|
||||||
|
@ -455,6 +455,8 @@ module.exports = RecurlyWrapper =
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
if data? and data.account?
|
if data? and data.account?
|
||||||
billingInfo = data.billing_info
|
billingInfo = data.billing_info
|
||||||
|
else if data? and data.billing_info?
|
||||||
|
billingInfo = data.billing_info
|
||||||
else
|
else
|
||||||
return callback "I don't understand the response from Recurly"
|
return callback "I don't understand the response from Recurly"
|
||||||
callback null, billingInfo
|
callback null, billingInfo
|
||||||
|
|
Loading…
Reference in a new issue