Closed Bug 878876 Opened 12 years ago Closed 12 years ago

Pass through package size for packaged apps

Categories

(Marketplace Graveyard :: Payments/Refunds, defect, P5)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-08-01

People

(Reporter: andy+bugzilla, Assigned: davidbgk)

Details

(Whiteboard: qa-)

The bango api takes a size of an app. That's pointless for hosted apps at this point, so we just set at some small number. Ideally now we have packaged apps, we should be sending through the size of the packaged app. However I don't think this is used anywhere yet, so it's low priority.
We store the pre-signed size in the files table's "size" column.
Assignee: nobody → david
Does this bug cover passing the data all the way from Zamboni to Bango? Also, this is a tricky scenario because the navigator.mozPay() API does not have a "package size" data point and that is too specific to apps anyway. The mozPay() API is used for all in-app payments which may or may not be downloadable products.
(In reply to Kumar McMillan [:kumar] from comment #2) > Does this bug cover passing the data all the way from Zamboni to Bango? That was my plan. > Also, this is a tricky scenario because the navigator.mozPay() API does not > have a "package size" data point and that is too specific to apps anyway. > The mozPay() API is used for all in-app payments which may or may not be > downloadable products. Is this worth doing then, or should we not bother? I was mostly wanting to implement the API as provided by Bango.
The size is called on billing configuration. There's a field in the JWT called productData that we can use for pretty much anything. Unfortunately this means the bug needs to be done in a few parts: 1) add in size from the file productData to the prepare JWT call https://github.com/andymckay/zamboni/blob/master/mkt/purchase/webpay.py#L113 2) sniff it in webpay, default should be zero 3) then pass it from webpay down to solitude when webpay calls billing: https://github.com/mozilla/webpay/blob/master/lib/solitude/api.py#L201 4) finally alter solitude end point to accept that and pass it on to bango
Here is an example of where we already sniff productData https://github.com/mozilla/webpay/blob/master/webpay/pay/tasks.py#L126 It's not ideal but the alternative is to define some kind of recognized data exchange format (perhaps with JSON-LD namespaces) so that is future work.
Reverted the webpay and solitude ones because of: https://sentry.prod.solitude.allizomaws.com/amo/paymentsfirefoxcom/group/32/ Sounds like an error in the XML, we shouldn't be passing through application_size. I think application_size is being added to the data and it shouldn't be, you might need to delete it so it doesn't show up in bango data: https://github.com/mozilla/solitude/compare/2013.07.24...2013.07.25#L0L212
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Agreed, I should have been more careful, here is the updated pull-request to pop the info from the data passed to Bango: https://github.com/mozilla/solitude/pull/117
Ugh, we didn't catch this on dev because I don't think dev ever auto-updated with your changes when we first merged to master. The gunicorn->uswgi switch seemed to cause a lot of instability on dev this week.
I was able to get to the Bango payment flow on dev after this change landed on dev: https://github.com/mozilla/solitude/commit/8f73198df79d906a18eab636be63b1436629a480 Thanks!
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-08-01
Can you please add some STRs to this bug or mark it as [qa-] ?
Whiteboard: qa-
You need to log in before you can comment on or make changes to this bug.