Provide a command to batch-upload merchant fees
Bug #985909 reported by
Anthony Lenton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Software Center Agent |
Fix Released
|
Low
|
Michael Nelson |
Bug Description
Along the same lines of update_earnings, sca should provide a command to batch-upload merchant fees. This is needed to fill in the finance report. Eventually this information will be available via Ubuntu Pay's API, but currently it's only available in the monthly vat report.
The Subscription model should get a new "merchant_fee" attribute, to contain this information.
The exact format of the csv should be checked with ISD.
Changed in software-center-agent: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
importance: | Medium → Low |
Changed in software-center-agent: | |
assignee: | nobody → Michael Nelson (michael.nelson) |
status: | Confirmed → In Progress |
Changed in software-center-agent: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
So currently the report that sca imports each day (currently for vat data to calculate earnings) is generated on a daily cron running:
https:/ /pastebin. canonical. com/64827/
Note: It's using the --field=captured option, which means that:
a) we get a report for all the items which were captured (rather than settled [1]) during the previous day only,
b) the data won't include the merchant fees or refunds (as these are part of the backend data received after settlement [2]
So, if we also want to import refunds and merchant costs, we'd need to either:
* do a separate run of vat_report for sca daily on pay using the default settled field so we get the backend data (with refunds and merchant costs), or
* update the current job to just report on the default settled field, which may mean that the data is not as current as finance need it? (where did the reason come from for needing --field=captured?)
Personally, I think second option is more sound is the better option, as we can just be importing one file with all the data we need, but the delay in online reports may not be an option. Other ideas?
[1] Apparently a payment can be settled between 3-5 days after it is captured for RBS, but it then has other information available, such as merchant fees. /bazaar. launchpad. net/~canonical- isd-hackers/ canonical- payment- service/ trunk/view/ head:/src/ paymentservice/ jobs/monthly/ vat_report. py#L117
[2] https:/