Added functionality to validate Paysera Delivery API credentials (project_id and password) for use during initial setup or configuration changes#5
Merged
Merged
Conversation
Added functionality to validate Paysera Delivery API credentials (project_id and password) for use during initial setup or configuration changes
Contributor
|
Looks fine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed
New Features
validateCredentials()method inDeliveryFacadefor credential validationgetPublicMerchantClient()method for unauthenticated requestsCredentialsValidationExceptionexception class for error handlingDocumentation
docs/VALIDATING_CREDENTIALS.md:Technical Implementation
Code Changes:
DeliveryFacade.php- added entry pointvalidateCredentials()methodDeliveryOrderService.php- business logic with loggingDeliveryApiClient.php- error handlingDeliveryOrderApiClient.php- API communicationMerchantClientProvider.php- new public client without MAC authenticationCredentialsValidationException.php- new exception classBaseException.php- addedE_CREDENTIALS_VALIDATION_FAILEDconstantTests:
DeliveryFacadeTest.php- tests for facade layerDeliveryOrderServiceTest.php- tests for service layerDeliveryApiClientTest.php- tests for api clientDeliveryOrderApiClientTest.php- tests for order api clientMerchantClientProviderTest.php- tests for public clientDependencies:
paysera/lib-delivery-api-merchant-clienttodev-masterwithvalidateProjectCredentials()supportHow It Works
The validation uses a public (unauthenticated) API endpoint
/rest/v1/projects/validate-credentials:Usage Example