You should send response regardless of success - so I think this should be moved to the very end of the function, outside of any if statements so that it always responds. You should set accept flag...
You should send response regardless of success - so I think this should be moved to the very end of the function, outside of any if statements so that it always responds. You should set accept flag and reject reason codes in these if statements so the response that gets sent will have the correct payload.