![Huh](https://bitcointalk.org/Smileys/default/huh.gif)
When requesting a test notification i get the following (raw post data):
Payment%20Notification[category]=receive&Payment%20Notification[transaction_timestamp]=1307671121&Payment%20Notification[signature]=d9823704c0753f652fa4b09535826d2622da0ff19552ffde68879e9a2c40ce53&Payment%20Notification[amount]=2.21&Payment%20Notification[foreign_order_id]=51&Payment%20Notification[number_of_confirmations]=1&Payment%20Notification[order_status]=open&Payment%20Notification[transaction_fee]=0.0&Payment%20Notification[bitcoin_address]=1AFZ6Cv8q96rFaS9T8fR1y2j2CjNDcTIVD
This does not look like a valid json string. Also django seems not to be able to figure the structure out. It puts the post data into a query dict, but the keys are somehow mixed up:
QueryDict: {
u'Payment Notification[foreign_order_id]': [u'51'],
u'Payment Notification[transaction_timestamp]': [u'1307671121'],
u'Payment Notification[number_of_confirmations]': [u'1'],
u'Payment Notification[amount]': [u'2.21'],
u'Payment Notification[category]': [u'receive'],
u'Payment Notification[signature]': [u'd9823704c0753f652fa4b09535826d2622da0ff19552ffde68879e9a2c40ce53'],
u'Payment Notification[bitcoin_address]': [u'1AFZ6Cv8q96rFaS9T8fR1y2j2CjNDcTIVD'],
u'Payment Notification[order_status]': [u'open'],
u'Payment Notification[transaction_fee]': [u'0.0']
}
So i can access the actual data by using e.g.
response.POST[u'Payment Notification[foreign_order_id]']
But i think you intended to provide this as proper json string, e.g.
{
"Payment Notification" :
{
"foreign_order_id" : "A1234",
"amount" : "2.20",
"transaction_fee" : 0.0,
"bitcoin_address" : "1AFZ6Cv8q96rFaS9T8fR1y2j2CjNDcTIVD",
"number_of_confirmations" : 1,
"transaction_timestamp" : 1307671121,
"category" : "send",
"order_status" : "satisfied",
"signature" : "unique signature for this request"
}
}
At least this is also what the documentation says.
Any idea?