I'm trying to integrate PagSeguro with this lib:
https://github.com/rochacbruno/python-pagseguro
But, I can not access the notification data that Pagseguro sends me. I'm using the following code:
notification_code = request.POST['notificationCode']
pg = PagSeguro(email="[email protected]", token="token")
notification_data = pg.check_notification(notification_code)
print notification_data['status']
On the last line I get the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'PagSeguroNotificationResponse' object has no attribute '__getitem__'