@@ -32,16 +32,22 @@ const createCertificate = function (bodyData) {
32
32
json : bodyData
33
33
} ;
34
34
35
+ console . log ( "bodyData : " , bodyData )
36
+ console . log ( "certificateCreateUrl : " , certificateCreateUrl )
37
+
35
38
request . post ( certificateCreateUrl , options , certificateCallback ) ;
36
39
37
40
function certificateCallback ( err , data ) {
41
+ console . log ( "line 39 raw data from RC call :" , JSON . stringify ( data ) ) ;
38
42
let result = {
39
43
success : true
40
44
} ;
41
45
if ( err ) {
42
46
result . success = false ;
47
+ console . log ( "line 45 error from RC call error :" , err . message ) ;
43
48
} else {
44
49
let response = data . body ;
50
+ console . log ( "certificate success response: " , JSON . stringify ( response ) )
45
51
if ( response . params . status === "SUCCESSFUL" ) {
46
52
result [ "data" ] = response . result ;
47
53
} else {
@@ -52,6 +58,7 @@ const createCertificate = function (bodyData) {
52
58
}
53
59
54
60
} catch ( error ) {
61
+ console . log ( "line 58 catch block : " , error . message )
55
62
return reject ( error ) ;
56
63
}
57
64
} )
@@ -78,16 +85,20 @@ const getCertificateIssuerKid = function () {
78
85
} ,
79
86
json : bodyData
80
87
} ;
88
+ console . log ( "issuer Kid url : " , issuerKidUrl ) ;
89
+ console . log ( "issuer Kid bodyData : " , JSON . stringify ( bodyData ) ) ;
81
90
request . post ( issuerKidUrl , options , getKidCallback ) ;
82
91
function getKidCallback ( err , data ) {
83
92
let result = {
84
93
success : true
85
94
} ;
86
95
87
96
if ( err ) {
97
+ console . log ( "KID rc call error : " , err . message )
88
98
result . success = false ;
89
99
} else {
90
100
let response = data . body ;
101
+ console . log ( "KID success response : " , JSON . stringify ( response ) )
91
102
if ( response . length > 0 && response [ 0 ] . osid && response [ 0 ] . osid !== "" ) {
92
103
result [ "data" ] = response [ 0 ] . osid ;
93
104
} else {
@@ -103,6 +114,7 @@ const getCertificateIssuerKid = function () {
103
114
} , CONSTANTS . common . SERVER_TIME_OUT ) ;
104
115
105
116
} catch ( error ) {
117
+ console . log ( "catch error : " , error . message )
106
118
return reject ( error ) ;
107
119
}
108
120
} )
0 commit comments