Page MenuHomePhorge

Allow search with transaction and customer IDs
ClosedPublic

Authored by vanmeeuwen on Aug 17 2021, 11:17 AM.
Tags
None
Referenced Files
F11900562: D2740.id7873.diff
Thu, Apr 25, 9:12 PM
F11900499: D2740.id7810.diff
Thu, Apr 25, 9:06 PM
F11900346: D2740.id7882.diff
Thu, Apr 25, 8:55 PM
F11900079: D2740.id7858.diff
Thu, Apr 25, 8:32 PM
F11900046: D2740.id.diff
Thu, Apr 25, 8:28 PM
F11899911: D2740.id7864.diff
Thu, Apr 25, 8:12 PM
Unknown Object (File)
Fri, Apr 19, 4:17 PM
Unknown Object (File)
Thu, Apr 18, 4:45 PM
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
arcpatch-D2740
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 36172
Build 14236: 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.