Page MenuHomePhorge

Allow search with transaction and customer IDs
ClosedPublic

Authored by vanmeeuwen on Aug 17 2021, 11:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 12:15 AM
Unknown Object (File)
Fri, Mar 8, 7:14 AM
Unknown Object (File)
Thu, Mar 7, 7:54 AM
Unknown Object (File)
Feb 23 2024, 12:58 AM
Unknown Object (File)
Feb 21 2024, 1:35 PM
Unknown Object (File)
Feb 9 2024, 2:47 PM
Unknown Object (File)
Jan 24 2024, 1:06 PM
Unknown Object (File)
Jan 24 2024, 4:50 AM
Subscribers
Restricted Project

Details

Reviewers
machniak
mollekopf
Group Reviewers
Restricted Project
Commits
rKb70dbda55bad: Allow search with transaction and customer IDs
Test Plan

None

Diff Detail

Repository
rK kolab
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 36157
Build 14218: arc lint + arc unit

Event Timeline

vanmeeuwen created this revision.
machniak subscribed.

Because both these additional searches are mollie-specific maybe this code should be abstracted-on/moved-to the Providers/PaymentProvider. E.g. isPaymentId(), isCustomerId(), findWalletByPaymentOrCustomerId() or sth like that.

src/app/Http/Controllers/API/V4/Admin/UsersController.php
94

This should include ->where('key', 'mollie_id'), but even then it will not use an index and might be slow.

This revision now requires changes to proceed.Aug 18 2021, 8:00 AM
mollekopf added inline comments.
src/app/Http/Controllers/API/V4/Admin/UsersController.php
94

I believe if not found first() will return null and therefore you'd try to invoke wallet() on null?

94

Is it intended that the value is matched against "cst_$something" or should the search only be executed against $something without the cst_ prefix? Same below.

src/app/Http/Controllers/API/V4/Admin/UsersController.php
93

Add a comment that this is a search by mollie customerId

94

Nevermind, I figured out what the cst_ and tr_ prefixes are.

101

Add a comment that this is a search by mollie payment id.

vanmeeuwen marked 6 inline comments as done.
  • Commentary, safety on settings not found
machniak added inline comments.
src/app/Http/Controllers/API/V4/Admin/UsersController.php
104

$wallet does not exist.

This revision now requires changes to proceed.Aug 18 2021, 10:34 AM
src/app/Http/Controllers/API/V4/Admin/UsersController.php
114

Should be $payment->wallet->...

machniak added inline comments.
src/app/Http/Controllers/API/V4/Admin/UsersController.php
104

must be owner() as you build the query here.

114

owner()

This revision now requires changes to proceed.Aug 18 2021, 10:45 AM
  • Here be a method not a property
This revision is now accepted and ready to land.Aug 18 2021, 10:53 AM
  • Add tests for the api calls
  • Add a search for a wallet id
This revision was automatically updated to reflect the committed changes.