killbill-admin-ui icon indicating copy to clipboard operation
killbill-admin-ui copied to clipboard

Add support for searching payment/transaction based on First or second reference ID

Open daliwei opened this issue 9 years ago • 1 comments

daliwei avatar Feb 22 '17 20:02 daliwei

Note that since https://github.com/killbill/killbill/commit/461fcc80f5e0acd627434a492466ed4a65fb1bff, both reference ids aren't stored in Kill Bill anymore. They're only exposed through the payment plugin APIs.

To implement this search, first of all, the searchPayments and / or searchPaymentMethods need to be correctly implemented in the plugin(s) (a default search criteria is typically generated in the plugin frameworks, to be tweaked as needed). See how the Litle plugin does it for instance to search Litle transaction ids.

I would suggest focusing on this first, making sure this search is correctly implement and performs at scale (I'm expecting new indexes to be needed in the plugin tables).

Once this is done, it could easily be integrated in Kaui, since the main search APIs can be delegated to plugins when withPluginInfo=true. For instance, if payment:FOO is searched, we could first search in Kill Bill, and if there is no match, then perform the search again in the plugins (https://github.com/killbill/killbill-admin-ui/blob/0c4798334b2e6be621b92566ed5112174f24154c/app/controllers/kaui/payments_controller.rb#L28). That way, we could look-up payments given a gateway reference id, even if the plugin name isn't known for instance.

pierre avatar Feb 23 '17 07:02 pierre