You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
public function supports($request) {
foreach($this->supported as $class) {
if(!is_a($request, $class, true)) {
return false;
}
}
return true;
}
The text was updated successfully, but these errors were encountered:
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 supports($request) to the payment itself, but I tend to move the logic to an action
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: