Add signature handling for dLocal API requests #485
Merged
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.
This pull request introduces a new feature for supporting request signatures in the
Forwardmodule of the Checkout SDK. It adds the ability to configure and generate signatures, specifically for the dLocal API, by extending theDestinationRequestclass and introducing new classes and enums for signature handling.Enhancements to request signature support:
DestinationRequestclass update: Added an optionalSignatureproperty of typeAbstractSignatureto allow configuration of request signatures. (src/CheckoutSdk/Forward/Requests/DestinationRequest.cs, src/CheckoutSdk/Forward/Requests/DestinationRequest.csR22-R26)AbstractSignatureclass: Introduced an abstract class to define the base structure for signature generation, including aTypeproperty for specifying the signature type. (src/CheckoutSdk/Forward/Requests/Signatures/AbstractSignature.cs, src/CheckoutSdk/Forward/Requests/Signatures/AbstractSignature.csR1-R13)dLocal-specific signature implementation:
DlocalParametersclass: Added a class to encapsulate the required parameters, such as theSecretKey, for generating dLocal API signatures. (src/CheckoutSdk/Forward/Requests/Signatures/DlocalParameters.cs, src/CheckoutSdk/Forward/Requests/Signatures/DlocalParameters.csR1-R10)DlocalSignatureclass: Created a class to handle dLocal-specific signature generation, including appending headers likeX-DateandAuthorizationto outgoing requests. (src/CheckoutSdk/Forward/Requests/Signatures/DlocalSignature.cs, src/CheckoutSdk/Forward/Requests/Signatures/DlocalSignature.csR1-R14)SignatureTypeenum: Added an enum to define supported signature types, starting withDlocal. (src/CheckoutSdk/Forward/Requests/Signatures/SignatureType.cs, src/CheckoutSdk/Forward/Requests/Signatures/SignatureType.csR1-R10)