Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Authentication token is not verified" problem #116

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

ecebeci
Copy link
Contributor

@ecebeci ecebeci commented Dec 18, 2023

Changes:
Updated generateHashV2 function to handle empty body parameters.
Improved payload construction for better readability and maintainability.

Context:
This change enhances the generateHashV2 function by ensuring proper handling of empty body parameters and improving the payload construction process.

HMAC message before
3853964343407244431415/v2/subscription/products{}
After
3853964343407244431415/v2/subscription/products

Testing:
The changes have been tested to ensure the continued correctness and reliability of the generateHashV2 function.

Before:
result { status: 401, errorCode: '8', errorMessage: 'Authentication token is not verified', systemTime: 1702907068181, locale: 'tr' }
After:
result { status: 'success', systemTime: 1702907021465, data: { totalCount: 1, currentPage: 1, pageCount: 1, items: [ [Object] ] } }

Update generateHashV2 function to handle empty body and improve payload construction.
@ecebeci
Copy link
Contributor Author

ecebeci commented Dec 20, 2023

Hi,
There was a problem in commit. I've fixed it.

@ecebeci
Copy link
Contributor Author

ecebeci commented Dec 22, 2023

Hi,

This commit is working on Sandbox environment. But it didn't work on the Production environment. I guess Iyzico sandbox and prod api's have a different approach in empty body.

Copy link

@ensunluer ensunluer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@erdemdmr erdemdmr merged commit 5499fca into iyzico:master Jan 15, 2024
erdemdmr added a commit that referenced this pull request Feb 6, 2024
erdemdmr added a commit that referenced this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants