Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class Invoice {
private String notes;

// 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.
@Builder.Default
private Boolean requiresDeposit = false;

Expand Down
5 changes: 4 additions & 1 deletion payment-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ spring.profiles.active=${SPRING_PROFILE:dev}
# Domain: techtorque
payhere.merchant.id=${PAYHERE_MERCHANT_ID:1231968}
payhere.merchant.secret=${PAYHERE_MERCHANT_SECRET:MjE0Mzc0NzgxMjEzMDE1NzYxNzE1NDIzNzA1MTIzMDI2NTc1ODQw}
payhere.sandbox=${PAYHERE_SANDBOX:true}
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}

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.