NFC and keypad

I'm trying to use a keypad and a NFC reader to control a motor to open a door. The keypad is used if a RFID card isn't available. How can ii program these two input devices devices. I can get both to work separately, but not together. Any suggestions?

Posting your code and circuit would be a good start to getting help.