@@ -272,7 +272,6 @@ export class CustomerOnboardingService {
272272 `Inside handleCreditService() to fund credit to the service with tenantUrl ${ tenantUrl } ` ,
273273 'CustomerOnboardingService' ,
274274 ) ;
275- const sessionId = generateHash ( `credit:${ serviceInfo . appId } :${ Date . now ( ) } ` ) ;
276275 const creditPayload = {
277276 serviceId : serviceInfo . appId ,
278277 purpose : 'CreditRecharge' ,
@@ -285,24 +284,10 @@ export class CustomerOnboardingService {
285284 whitelistedCors,
286285 accessList,
287286 } ;
288- await redisClient . set (
289- sessionId ,
290- JSON . stringify ( creditPayload ) ,
291- 'EX' ,
292- EXPIRY_CONFIG . CREDIT_TOKEN . redisExpiryTime ,
293- ) ;
294- const tokenPayload = {
295- appId : serviceInfo . appId ,
296- sessionId,
297- subdomain : serviceInfo . subdomain ,
298- grantType,
299- } ;
300- const creditToken = await this . generateCreditToken ( tokenPayload , secret ) ;
287+ const creditToken = await this . generateCreditToken ( creditPayload , secret ) ;
301288 const headers : Record < string , string > = {
302289 'Content-Type' : 'application/json' ,
303- ...( grantType === GRANT_TYPES . access_service_kyc
304- ? { 'x-kyc-access-token' : creditToken }
305- : { authorization : `Bearer ${ creditToken } ` } ) ,
290+ 'x-api-credit-token' : creditToken ,
306291 } ;
307292 const requestOptions : any = {
308293 method : 'POST' ,
@@ -480,6 +465,10 @@ export class CustomerOnboardingService {
480465 this . config . get < string > ( 'CAVACH_API_DOMAIN' ) ,
481466 false ,
482467 ) ,
468+ sanitizeUrl (
469+ this . config . get < string > ( 'SSI_API_DOMAIN' ) ,
470+ false ,
471+ ) ,
483472 ] ,
484473 env : APP_ENVIRONMENT . dev ,
485474 hasDomainVerified : false ,
0 commit comments