-
Notifications
You must be signed in to change notification settings - Fork 8
Created PaytmEDC payment flow #1108
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
base: main
Are you sure you want to change the base?
Conversation
| callbackUrl = Just $ showBaseUrl cfg.callbackUrl -- ye i think we should ask for this. | ||
| } | ||
|
|
||
| checksum = PaytmEDC.buildChecksum merchantKeyDecrypted saleBody |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this we will have a checksum api that they will give us we have to call that.
| import Kernel.Prelude | ||
|
|
||
| -- | PaytmEDC Configuration | ||
| data PaytmEDCCfg = PaytmEDCCfg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this we have encrypted field so we have to decrypt them before using so make changes according to that
| clientIdDecrypted <- decrypt cfg.clientId | ||
|
|
||
| let terminalId = req.metadataGatewayReferenceId -- TID passed via metadata | ||
| amountInPaise = round (req.amount * 100) :: Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think they take it in paise they take it in rupees i guess will check tomorrow though
| BaseUrl -> | ||
| GenerateChecksumReq -> | ||
| m GenerateChecksumResp | ||
| generateChecksum url req = do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are sending baseUrl but we have to take one more input in cfg called callbackurl
| clientId :: EncryptedField 'AsEncrypted Text, -- Client ID for checksum generation | ||
| merchantKey :: EncryptedField 'AsEncrypted Text, -- Secret key (not used for local checksum anymore but might be needed) | ||
| baseUrl :: BaseUrl, -- API endpoint | ||
| callbackUrl :: BaseUrl -- Webhook callback URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this we are not using
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
Checklist
./dev/format-all-files.sh