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

Razorpay poll using cpu time when not configured #130

Open
casesolved-co-uk opened this issue Dec 26, 2024 · 0 comments
Open

Razorpay poll using cpu time when not configured #130

casesolved-co-uk opened this issue Dec 26, 2024 · 0 comments

Comments

@casesolved-co-uk
Copy link

casesolved-co-uk commented Dec 26, 2024

The implementation of capture_payment is run regularly by a scheduled job which queries all Integration Requests before checking whether the integration is even enabled.

Suggest:
Move settings = controller.get_settings(data) to the top and return if settings.api_key is not set

controller = frappe.get_doc("Razorpay Settings")
for doc in frappe.get_all(
"Integration Request",
filters={"status": "Authorized", "integration_request_service": "Razorpay"},
fields=["name", "data"],
):
try:
if is_sandbox:
resp = sanbox_response
else:
data = json.loads(doc.data)
settings = controller.get_settings(data)

version-14
version-15

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

No branches or pull requests

1 participant