-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Sometimes, we need access to the original response from a provider. To address this, it would be beneficial to implement something like a Response Object.
Instead of returning just a token or a bool value, we could create structured objects (e.g., VerifyResponse) that include:
- array|null $originalResponse: the raw data from the provider.
- string|null $originalMessage: the raw message from the provider.
- string|null $originalResponseCode: the provider's response code as a string.
- int $responseCode: a standardized response code.
- isVerificationSuccessful(): a method to check if the verification was successful.
Each provider would then be responsible for creating and returning this type of response object.
However, implementing this would introduce breaking changes to existing integrations. We would need to carefully consider this impact or release it as part of a new version to ensure backward compatibility.
Metadata
Metadata
Assignees
Labels
No labels