-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new Mobilepay reporting API (#416)
* Duplicate command script * Ledger retrieval * Update token retrieval payload and endpoint * Reformat file * Correct refresh access token-method I had accidentally included a header item in the payload, and passed a wrong value in payload. Furthermore, the authorization string is now encoded with base64 * Update import mobilepay payment to new API The equivalent fields have been changed * Use new date-specific endpoint Had to rewrite fetch_transactions to accumulate multiple calls * Correct use of new transaction API I've corrected query parameters and the handling of response * Add manual cutoff date to prevent double payments If someone where to accidentally run imports back into manual payments, then they'd be registered twice (I think) * Remove unused method * Refactor get_transactions * Refresh ledger id as well, when it's missing * Remove duplicate file and move changes into original I regret making the changes to a duplicate instead of simply changing the existing file * Refactor parameter * Assert ledger info * Handle incomplete token-file * Type annotation and proper handling * Correct types used and log error * Use HTTPBasicAuth helper class * Update stregsystem/management/commands/importmobilepaypayments.py Co-authored-by: Falke Carlsen <[email protected]> --------- Co-authored-by: Falke Carlsen <[email protected]>
- Loading branch information
1 parent
ecc5358
commit 42823d0
Showing
1 changed file
with
108 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters