When requesting a test notification i get the following (raw post data):
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:
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.
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?