File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
apps/OpenSignServer/cloud/parsefunction Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export default async function BuyAddonUsers(request) {
76
76
} ,
77
77
] ,
78
78
} ) ;
79
- await axios . put (
79
+ const updatedSubscription = await axios . put (
80
80
'https://www.zohoapis.in/billing/v1/subscriptions/' + subscriptionId ,
81
81
data ,
82
82
{
@@ -86,20 +86,11 @@ export default async function BuyAddonUsers(request) {
86
86
} ,
87
87
}
88
88
) ;
89
- const hostedpage_id = _resSub . SubscriptionDetails . hostedpage_id ;
90
- const userData = await axios . get (
91
- 'https://www.zohoapis.in/billing/v1/hostedpages/' + hostedpage_id ,
92
- {
93
- headers : {
94
- Authorization : 'Zoho-oauthtoken ' + res . data . access_token ,
95
- 'X-com-zoho-subscriptions-organizationid' : process . env . ZOHO_BILLING_ORG_ID ,
96
- } ,
97
- }
98
- ) ;
89
+ const subscriptionInfo = { data : updatedSubscription . data } ;
99
90
const allowedUsers = quantity + 1 ;
100
91
const updateSub = new Parse . Object ( 'contracts_Subscriptions' ) ;
101
92
updateSub . id = resSub . id ;
102
- updateSub . set ( 'SubscriptionDetails' , userData . data ) ;
93
+ updateSub . set ( 'SubscriptionDetails' , subscriptionInfo ) ;
103
94
updateSub . set ( 'AllowedUsers' , allowedUsers ) ;
104
95
const resupdateSub = await updateSub . save ( null , { useMasterKey : true } ) ;
105
96
return { status : 'success' , addon : allowedUsers } ;
You can’t perform that action at this time.
0 commit comments