Conversation
…ires_deposit column default value
|
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 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. 📒 Files selected for processing (2)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
requiresDepositcolumn 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 |
There was a problem hiding this comment.
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.
| payhere.notify.url=${PAYHERE_NOTIFY_URL:http://localhost:8086/api/payments/notify} | |
| payhere.notify.url=${PAYHERE_NOTIFY_URL} |
|
|
||
| // Part-payment tracking | ||
| @Column(nullable = false) | ||
| @Column(nullable = false, columnDefinition = "boolean default false") |
There was a problem hiding this comment.
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.
…ires_deposit column default value