function for transaction for movie