Skip to content

[BACKEND] Payment verification is hardcoded to always return true #374

@Hydrax117

Description

@Hydrax117

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.


Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions