i'm working on a drupal 7 online payment module ,
and i need to know if there is a Drupal 7 function that can track (each time and for all the users) if 'the logging online user' is requesting an 'Access denied ' page , and then get the permission must the user have to access to that page
PS: i'm creating a drupal payment module , the payment will be by roles , for exemple ( user1 can create 'Blog content type' just if he has the permission on that, if not i i need to know which 'Access denied ' page he is in and it's role so i can show him a message to buy this role depending on the price in the database) all what i need is the string permission of the page
thanks in advance ^_^