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
maybe introduce feature flags to payments #264
Comments
@backbone87 I dont have much time at the moment, but I'll try to respond to all your suggestion as soon as possible. Really appreciate your feedback. Thanks for sharing this. |
The feature was asked several times, we talked about it yesterday with @bojanz. There will be a solution for that. I am ok with adding <?php
public function supports($request)
{
$this->execute($support = new Support($request));
return $support->is();
} This way one can overwrite the action, in case they add a new action or something like that. |
afaik the aim of this library is to provide a unified interface to handle payments via various providers. therefore an abstraction of common tasks (capture, authorize, notify, sync, status) is provided. ofc not every provider supports all tasks or specific provider have more tasks that can be used.
but even if a provider has a CaptureAction an ->execute(new Capture($model)) can fail, because the model maybe needs some conversion of model (via some extension) first.
you cant determine if a Capture failed because the payment isnt configured properly (missing extension) or the provided model is completely wrong (null or some other gibberish) or the payment simply doesnt support the specific action.
introduce a common interface to all models that can be passed to a request would solve a part of this issue.
introducing some flag system would solve another part: $payment->supports($requestClassName)
The text was updated successfully, but these errors were encountered: