I attempted to implement the MicroformIntegrationApi, but I am experiencing issues with receiving errors in the response.
This is an example implementation where we populated the correct requirements based on the documentation by supplying the appropriate variables for the merchant_id, merchant_keyid, merchant_secret, and run_environment.
The Pydantic class for managing the operation as the key generation is utilized by the rest-api for our appliation (Django | Django-Ninja and Fast-API).
I replicated the same request using HTTP tools and the Cybersource REST-API dashboard. As a result, we were able to successfully generate a JWT response from https://apitest.cybersource.com/microform/v2/sessions.
What I noticed is the when I replicated the header generated by the generate_capture_context method it returns an authentication error.
I added the date to the headers value in the signature which is what the MicformIntegrationApi has generated -> signature: keyid="42d79b07-b077-42d1-b603-bd94104ecc20", algorithm="HmacSHA256", headers="host date request-target digest v-c-merchant-id", signature="**********************"
I attempted to implement the MicroformIntegrationApi, but I am experiencing issues with receiving errors in the response.
This is an example implementation where we populated the correct requirements based on the documentation by supplying the appropriate variables for the merchant_id, merchant_keyid, merchant_secret, and run_environment.
The Pydantic class for managing the operation as the key generation is utilized by the rest-api for our appliation (Django | Django-Ninja and Fast-API).
Response
I replicated the same request using HTTP tools and the Cybersource REST-API dashboard. As a result, we were able to successfully generate a JWT response from https://apitest.cybersource.com/microform/v2/sessions.
Response
What I noticed is the when I replicated the header generated by the
generate_capture_context
method it returns an authentication error.I added the date to the headers value in the signature which is what the MicformIntegrationApi has generated ->
signature: keyid="42d79b07-b077-42d1-b603-bd94104ecc20", algorithm="HmacSHA256", headers="host date request-target digest v-c-merchant-id", signature="**********************"
This is where it was implemented. The format of the headers varies greatly from the format expected by the end-point https://https://apitest.cybersource.com/microform/v2/sessions
api_client.ApiClient
method that handles the generation of thesignature
header.Snippets from the
GetSignatureParameter
Object