#NEWLINE# def main( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# mollie = Mollie . API . Client ( ) #NEWLINE# mollie . setApiKey ( 'test_bt7vvByF6jTcBR4dLuW66eNnHYNIJp' ) #NEWLINE# payments = mollie . payments . all ( ) #NEWLINE# body = ( 'Your API key has %u payments, last %u:<br>' % ( payments [ 'totalCount' ] , payments [ 'count' ] ) ) #NEWLINE# for payment in payments : #NEWLINE# #INDENT# body += ( "&euro; %s, status: '%s'<br>" % ( e [ 'amount' ] , payment [ 'status' ] ) ) #NEWLINE# #UNINDENT# return body #NEWLINE# #UNINDENT# except Mollie . API . Error as e : #NEWLINE# #INDENT# return ( 'API call failed: ' + e . message )