This needs some tests. See https://github.com/mozilla/zamboni/blob/master/mkt/purchase/tests/test_webpay.py#L50