Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Fix payment service deployment: Add missing PayHere URLs and fix requ…#11

Merged
RandithaK merged 2 commits into
mainfrom
dev
Nov 12, 2025
Merged

Fix payment service deployment: Add missing PayHere URLs and fix requ…#11
RandithaK merged 2 commits into
mainfrom
dev

Conversation

@RandithaK

Copy link
Copy Markdown
Member

…ires_deposit column default value

Copilot AI review requested due to automatic review settings November 12, 2025 10:41
@coderabbitai

coderabbitai Bot commented Nov 12, 2025

Copy link
Copy Markdown

Warning

Rate limit exceeded

@RandithaK has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c51aa62 and cb5b51d.

📒 Files selected for processing (2)
  • payment-service/src/main/java/com/techtorque/payment_service/entity/Invoice.java (1 hunks)
  • payment-service/src/main/resources/application.properties (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes payment service deployment issues by adding three missing PayHere payment gateway URL configurations and correcting the database column definition for the requiresDeposit field in the Invoice entity.

  • Added PayHere callback URLs (return, cancel, notify) required for payment flow completion
  • Fixed the requiresDeposit column to include a database-level default value to prevent deployment issues

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
payment-service/src/main/resources/application.properties Added three PayHere URL configurations (return, cancel, notify) with default values for local development
payment-service/src/main/java/com/techtorque/payment_service/entity/Invoice.java Added columnDefinition to requiresDeposit field to specify database default value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

payhere.sandbox=${PAYHERE_SANDBOX:true}
payhere.return.url=${PAYHERE_RETURN_URL:http://localhost:3000/payment/success}
payhere.cancel.url=${PAYHERE_CANCEL_URL:http://localhost:3000/payment/cancel}
payhere.notify.url=${PAYHERE_NOTIFY_URL:http://localhost:8086/api/payments/notify} No newline at end of file

Copilot AI Nov 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The notify URL should not default to localhost as it needs to be publicly accessible for PayHere webhooks to reach the service in production. Consider using a placeholder value or requiring this to be set via environment variable without a localhost default, as localhost URLs won't work in deployed environments.

Suggested change
payhere.notify.url=${PAYHERE_NOTIFY_URL:http://localhost:8086/api/payments/notify}
payhere.notify.url=${PAYHERE_NOTIFY_URL}

Copilot uses AI. Check for mistakes.

// Part-payment tracking
@Column(nullable = false)
@Column(nullable = false, columnDefinition = "boolean default false")

Copilot AI Nov 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The columnDefinition uses database-specific syntax ('boolean') which may not be portable across different database systems. For PostgreSQL this is correct, but consider using @ColumnDefault('false') (JPA 3.2+) for better portability, or document that this service is PostgreSQL-specific.

Copilot uses AI. Check for mistakes.
@RandithaK
RandithaK merged commit c033ef8 into main Nov 12, 2025
7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants