mozilla/r2d2b2g — pull request #669 by mykmelez (2013-06-27 23:31:25+00:00)
Title: provide valid manifest URL when requesting receipt for app

I'm not sure when exactly this regressed, but selecting a receipt type currently fails on all packaged apps:

```
info: r2d2b2g: Simulator.onMessage updateReceiptType
info: r2d2b2g: Fetching refunded test receipt for https://app://aa58c9d7-3bec-844f-9001-43c272eca956.simulator
info: r2d2b2g: Bad request made to test receipt server: {"manifest_url":["Enter a valid URL."]}
error: r2d2b2g: INVALID_RECEIPT
```

Here's a fix. Along the way, I unrefactor a one-line function with only a single call site to make it easier to read and understand what *updateReceiptType* is doing to construct the manifest URL (we can always refactor again once a second call site appears).

cc: @nickdesaulniers, @ochameau

@potch: does this make sense?