Closed Wojciechem closed 1 week ago
As an example of a nice library design we would like to achieve: https://github.com/mailgun/mailgun-php
Hello Chargebee maintainers,
@cb-yateshmathuria @cb-khushbubibay Do you have any thoughts about this?
Hi @Wojciechem @Arminek Thank you for raising this concern. We sincerely appreciate your input. If it's possible, could you please create a forked repository and raise a pull request with the suggested changes? This way, we can check its feasibility and review the modifications.
Very interested in this as well, we need to inject a custom HTTP client. For now we will go with a simple fork that allows us to inject a custom Guzzle handler stack of middewares, but ideally the Chargebee library would accept a PSR-18 client as suggested in the OP.
Apologies, I did not have the capacity to look at it yet, but I will try to work on the fork next week :)
Not a proper redesign, but I made some refactoring to address the points from my issue. It should also help other use-cases like customizing request headers / specific http client configuration. CC @cb-khushbubibay
bump :wink:
Closing, since the change was merged (even though it was reverted because of older php compatibility issues)
Hello Chargebee,
We've been having problems testing the client API provided with the Chargebee SDK, and for the past few meetings we've been thinking about modernizing the code to make it more testable.
It would greatly improve our experience of integrating with Chargebee. Currently we implement the required abstraction in our code, but the possibilities are limited this way. We feel that improving the open source client is more future-proof and beneficial than re-writing the API integration on our side.
Main points we would like to address with such redesign are:
Would you be interested in such a contribution?