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

Add amount check in saman driver verify function #294

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soroux
Copy link

@soroux soroux commented Jan 2, 2025

Description

This pull request introduces a critical update to the Saman payment driver, ensuring the amount verification during the verify step matches the expected value. If there is a mismatch, the transaction is reversed to maintain data integrity and prevent inconsistencies.

Motivation and context

This change is required to address a scenario where the verified amount returned by the Saman gateway does not match the invoice amount. Previously, such discrepancies were not handled effectively, which could result in financial inaccuracies.
Saman payment gateway document specifically notes that in verify the merchant "SHOULD" check the amount and call reverse function if there is a Contradiction in returned amount and invoice amount.

This fix ensures:

Accurate amount verification.
Automatic reversal of transactions if discrepancies occur.

The added "password" parameter represents (رمز پذیرنده) , and the "ReverseTransaction" soap function in saman needs it .

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.

1 participant