Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new Mobilepay reporting API #416

Merged
merged 21 commits into from
Apr 8, 2024
Merged

Conversation

@krestenlaust krestenlaust marked this pull request as draft March 12, 2024 14:16
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.45%. Comparing base (af0efd8) to head (78ca281).
Report is 2 commits behind head on next.

❗ Current head 78ca281 differs from pull request most recent head 817f9fe. Consider uploading reports for the commit 817f9fe to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #416   +/-   ##
=======================================
  Coverage   53.45%   53.45%           
=======================================
  Files          33       33           
  Lines        4553     4553           
  Branches      267      267           
=======================================
  Hits         2434     2434           
  Misses       2069     2069           
  Partials       50       50           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krestenlaust
Copy link
Member Author

Stale until we get a response as to whether or not API-keys will be available to us

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
@krestenlaust
Copy link
Member Author

Notable difference:
VippsMobilepay doc

There's no transaction ID in the new API, so I'll be using PSP-reference as that seems like it's closest to it. It's only used for recognizing duplicates anyway

The equivalent fields have been changed
Had to rewrite fetch_transactions to accumulate multiple calls
I've corrected query parameters and the handling of response
If someone where to accidentally run imports back into manual payments, then they'd be registered twice (I think)
I regret making the changes to a duplicate instead of simply changing the existing file
@krestenlaust krestenlaust marked this pull request as ready for review April 6, 2024 18:09
Copy link
Member Author

@krestenlaust krestenlaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to test it (both practically and potentially unit tests), I've only been testing the code besides in the interpreter

@krestenlaust
Copy link
Member Author

krestenlaust commented Apr 6, 2024

It has been tested in a local setup now, and it imported items successfully

@krestenlaust
Copy link
Member Author

krestenlaust commented Apr 6, 2024

The prod tokens are located in my home folder on the server @falkecarlsen @BoAnd

Copy link
Contributor

@BoAnd BoAnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it look fine.

Copy link
Member

@falkecarlsen falkecarlsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with @BoAnd suggestions.

As you are aware, be careful with duplicate payments during deployment. You could deploy outside business-hours.

Co-authored-by: Falke Carlsen <11318702+falkecarlsen@users.noreply.github.com>
@krestenlaust krestenlaust merged commit 42823d0 into next Apr 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MobilePay Reporting API going out of support
3 participants