Skip to content

create a way to access the provider original response #6

@mbpcoder

Description

@mbpcoder

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions