Description:
The Paystack/Flutterwave verification method in TournamentService always returns success:
async fn verify_payment_with_provider(&self, reference: &str, amount: i64) -> Result<bool, ApiError> {
// Simulate successful verification
Ok(true)
}
Any caller can join any paid tournament by supplying a fake payment reference. This is a direct financial vulnerability.
Affected files: src/service/tournament_service.rs
Proposed fix: Implement real HTTP calls to the Paystack GET /transaction/verify/{reference} and Flutterwave GET /v3/transactions/{id}/verify endpoints. Verify both the payment status and the amount match the tournament entry fee before accepting registration.
Description:
The Paystack/Flutterwave verification method in
TournamentServicealways returns success:Any caller can join any paid tournament by supplying a fake payment reference. This is a direct financial vulnerability.
Affected files:
src/service/tournament_service.rsProposed fix: Implement real HTTP calls to the Paystack
GET /transaction/verify/{reference}and FlutterwaveGET /v3/transactions/{id}/verifyendpoints. Verify both the payment status and the amount match the tournament entry fee before accepting registration.