mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #1806 from overleaf/ta-use-billing-name
Use Billing Name when Creating Subscription GitOrigin-RevId: 66744faa7edde241340016bbb6c1bbc5fb53ede2
This commit is contained in:
parent
2deac5f3a1
commit
14cbeef31d
3 changed files with 10 additions and 5 deletions
|
@ -376,8 +376,8 @@ module.exports = RecurlyWrapper = {
|
|||
account: {
|
||||
account_code: user._id,
|
||||
email: user.email,
|
||||
first_name: user.first_name,
|
||||
last_name: user.last_name,
|
||||
first_name: subscriptionDetails.first_name || user.first_name,
|
||||
last_name: subscriptionDetails.last_name || user.last_name,
|
||||
billing_info: {
|
||||
token_id: recurly_token_id
|
||||
}
|
||||
|
|
|
@ -193,6 +193,8 @@ define(['base', 'directives/creditCards', 'libs/recurly-4.8.5'], App =>
|
|||
currencyCode: pricing.items.currency,
|
||||
plan_code: pricing.items.plan.code,
|
||||
coupon_code: pricing.items.coupon ? pricing.items.coupon.code : '',
|
||||
first_name: $scope.data.first_name,
|
||||
last_name: $scope.data.last_name,
|
||||
|
||||
isPaypal: $scope.paymentMethod.value === 'paypal',
|
||||
address: {
|
||||
|
|
|
@ -622,13 +622,16 @@ describe('RecurlyWrapper', function() {
|
|||
beforeEach(function() {
|
||||
this.user = {
|
||||
_id: 'some_id',
|
||||
email: 'user@example.com'
|
||||
email: 'user@example.com',
|
||||
first_name: 'Foo',
|
||||
last_name: 'Johnson'
|
||||
}
|
||||
this.subscriptionDetails = {
|
||||
currencyCode: 'EUR',
|
||||
plan_code: 'some_plan_code',
|
||||
coupon_code: '',
|
||||
isPaypal: true,
|
||||
first_name: 'Prairie',
|
||||
address: {
|
||||
address1: 'addr_one',
|
||||
address2: 'addr_two',
|
||||
|
@ -674,8 +677,8 @@ describe('RecurlyWrapper', function() {
|
|||
<account>
|
||||
<account_code>some_id</account_code>
|
||||
<email>user@example.com</email>
|
||||
<first_name/>
|
||||
<last_name/>
|
||||
<first_name>Prairie</first_name>
|
||||
<last_name>Johnson</last_name>
|
||||
<billing_info>
|
||||
<token_id>a-token-id</token_id>
|
||||
</billing_info>
|
||||
|
|
Loading…
Reference in a new issue