Repository navigation
docs(payment): fix method signature mismatches in payment.md - #351
Open
Sreejith088 wants to merge 1 commit into
Open
Sreejith088 wants to merge 1 commit into
Sreejith088 wants to merge 1 commit into
Conversation
Closes razorpay#79 Two mismatches between documents/payment.md and the actual implementation in razorpay/resources/payment.py: 1. capture() — docs showed: client.payment.capture(paymentId, {"amount": 1000, "currency": "INR"}) but the implementation signature is capture(payment_id, amount, data={}), where amount is a required positional integer, not a key inside the dict. Corrected to: client.payment.capture(paymentId, amount, {"currency": "INR"}) 2. fetchDownTimeById() — docs referred to the method as fetchPaymentDowntimeById, which does not exist. Corrected to match the actual method name fetchDownTimeById.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #79
Two mismatches found between
documents/payment.mdand the actual implementation inrazorpay/resources/payment.py:1.
capture()— wrong call signature in docsThe docs showed:
But the actual implementation signature is:
amountis a required positional integer, not a key inside the dict. Calling the docs version would pass the dict asamount, thendatawould be the empty default — sending a POST with no body.Corrected to:
2.
fetchDownTimeById()— wrong method name in docsThe docs referred to
fetchPaymentDowntimeById(), which does not exist on thePaymentclass. The actual method isfetchDownTimeById(). Corrected.Test plan