def check_payment(self, payment):
validation = "<STR_LIT>"<EOL>if not isinstance(payment['<STR_LIT>'], int):<EOL><INDENT>validation += "<STR_LIT>"<EOL><DEDENT>if not isinstance(payment['<STR_LIT>'], datetime.date):<EOL><INDENT>validation += "<STR_LIT>"<EOL><DEDENT>payment['<STR_LIT>'] = str(payment['<STR_LIT>'])<EOL>if not isinstance(payment['<STR_LIT>'], datetime.date):<EOL><INDENT>validation += "<STR_LIT>"<EOL><DEDENT>payment['<STR_LIT>'] = str(payment['<STR_LIT>'])<EOL>if validation == "<STR_LIT>":<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>' + validation)<EOL><DEDENT>
Check the payment for required fields and validity.
@param payment: The payment dict
@return: True if valid, error string if invalid paramaters where
encountered.