Merge branch 'development' into 'devops-staging'
add : Add supplier: Metro, logic for the callback See merge request empatnusabangsa/ppob/ppob-backend!150
This commit is contained in:
		@@ -24,6 +24,40 @@ export class PpobCallbackController {
 | 
				
			|||||||
          response['clientid'],
 | 
					          response['clientid'],
 | 
				
			||||||
          response,
 | 
					          response,
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        updateTransaction,
 | 
				
			||||||
 | 
					        statusCode: HttpStatus.BAD_REQUEST,
 | 
				
			||||||
 | 
					        message: 'failed to proccess',
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //TODO: UPDATE BERHASIL
 | 
				
			||||||
 | 
					    const updateTransaction =
 | 
				
			||||||
 | 
					      await this.transactionService.callbackOrderSuccess(
 | 
				
			||||||
 | 
					        response['clientid'],
 | 
				
			||||||
 | 
					        response,
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      updateTransaction,
 | 
				
			||||||
 | 
					      statusCode: HttpStatus.OK,
 | 
				
			||||||
 | 
					      message: 'success',
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (response['status'] != 20) {
 | 
				
			||||||
 | 
					      //TODO: UPDATE GAGAL
 | 
				
			||||||
 | 
					      const updateTransaction =
 | 
				
			||||||
 | 
					        await this.transactionService.callbackOrderFailed(
 | 
				
			||||||
 | 
					          response['clientid'],
 | 
				
			||||||
 | 
					          response,
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        updateTransaction,
 | 
				
			||||||
 | 
					        statusCode: HttpStatus.BAD_REQUEST,
 | 
				
			||||||
 | 
					        message: 'failed to proccess',
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      //TODO: UPDATE BERHASIL
 | 
					      //TODO: UPDATE BERHASIL
 | 
				
			||||||
      const updateTransaction =
 | 
					      const updateTransaction =
 | 
				
			||||||
@@ -31,7 +65,14 @@ export class PpobCallbackController {
 | 
				
			|||||||
          response['clientid'],
 | 
					          response['clientid'],
 | 
				
			||||||
          response,
 | 
					          response,
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        updateTransaction,
 | 
				
			||||||
 | 
					        statusCode: HttpStatus.OK,
 | 
				
			||||||
 | 
					        message: 'success',
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this.logger.log({
 | 
					    this.logger.log({
 | 
				
			||||||
      requestQuery: request.query,
 | 
					      requestQuery: request.query,
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user