@@ -23,6 +23,7 @@ export class EndpointController {
23
23
24
24
get apiRouter ( ) : express . Router {
25
25
passport . use ( new BasicStrategy ( ( username , password , cb ) => {
26
+ log . warn ( 'Chargebee basic strategy' ) ;
26
27
if ( username === this . config . chargebeeWebhook . user
27
28
&& password === this . config . chargebeeWebhook . password ) {
28
29
return cb ( null , username ) ;
@@ -36,6 +37,7 @@ export class EndpointController {
36
37
router . use ( bodyParser . urlencoded ( { extended : true } ) )
37
38
router . post ( PaymentProtocol . UPDATE_GITPOD_SUBSCRIPTION_PATH ,
38
39
( req : express . Request , res : express . Response , next : express . NextFunction ) => {
40
+ log . info ( 'Receiving Chargebee event!' ) ;
39
41
passport . authenticate ( 'basic' , { session : false } , ( err : any , user : any , info : any ) => {
40
42
if ( err ) {
41
43
log . error ( `Login error on chargebee payment update route!` , err , req ) ;
@@ -61,6 +63,7 @@ export class EndpointController {
61
63
* @param res
62
64
*/
63
65
private async handleUpdateGitpodSubscription ( req : express . Request , res : express . Response ) {
66
+ log . info ( 'Chargebee handleUpdateGitpodSubscription!' ) ;
64
67
if ( ! req . body || ! req . body . event_type ) {
65
68
log . error ( 'Received malformed event request from chargebee!' ) ;
66
69
return ;
@@ -70,7 +73,7 @@ export class EndpointController {
70
73
const handled = await this . eventHandler . handle ( req . body ) ;
71
74
if ( ! handled ) {
72
75
const payload = { chargebeeEventType : req . body . event_type , action : 'ignored' } ;
73
- log . debug ( `Faithfully ignoring chargebee event of type: ${ req . body . event_type } ` , payload ) ;
76
+ log . warn ( `Faithfully ignoring chargebee event of type: ${ req . body . event_type } ` , payload ) ;
74
77
}
75
78
res . status ( 200 ) . send ( ) ;
76
79
} catch ( err ) {
0 commit comments