Closed lehuygiang28 closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vnpay | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 2, 2024 1:20pm |
The updates primarily improve the documentation and fix a significant bug. The README.md
and README_en-US.md
files now feature a more sophisticated "Buy Me A Coffee" button link. A documentation comment specifying the payment amount was added to the ReturnQueryFromVNPay
type. The most critical fix involves removing an erroneous division by 100 in the VNPay
class, which caused signature mismatches during URL verification.
Files | Change Summary |
---|---|
README.md , README_en-US.md |
Replaced the "Buy Me A Coffee" image link with a new button link. |
src/types/return-from-vnpay.type.ts |
Added a comment in English specifying the payment amount in the ReturnQueryFromVNPay type. |
src/vnpay.ts |
Removed the division operation by 100 on the vnp_Amount property to fix signature mismatches. |
Objective (#) | Addressed | Explanation |
---|---|---|
Incorrect signature hash during verify return URL (#15) | ✅ |
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This pull request addresses a bug where the signature verification failed due to an incorrect amount calculation. The fix involves removing the division operation on vnp_Amount before verifying the signature. Additionally, the 'Buy Me A Coffee' button in the README files has been updated to use a new image source and styling. An English comment was also added for the vnp_Amount field in the type definition.
Files | Changes |
---|---|
README.md README_en-US.md |
Updated the 'Buy Me A Coffee' button to use a new image source and styling in both README files. |
src/vnpay.ts src/types/return-from-vnpay.type.ts |
Fixed the signature verification issue by removing the division operation on vnp_Amount and added an English comment for the vnp_Amount field. |
Fix verify failed due to amount issue
This pull request fixes the issue by removing the division operation before verifying the signature.
fixes #15
Type of Change
Please check the type of change your PR introduces:
Testing
Does this introduce a breaking change?
If yes, please describe the impact and migration path for existing applications:
Related Issues or References
15
Summary by Sourcery
This pull request fixes an issue with the signature verification by removing an unnecessary division operation on the amount. It also updates the 'Buy Me A Coffee' button in the documentation and adds an English translation for a comment in the type definition file.
Summary by CodeRabbit
Documentation
README.md
andREADME_en-US.md
with a more sophisticated button link.Bug Fixes
vnp_Amount
property calculation in theVNPay
class by removing unnecessary division by 100.Chores
ReturnQueryFromVNPay
type.