Skip to content

Commit

Permalink
fix: return false if sucessful payment detected (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenbutongit authored Nov 24, 2023
1 parent 9830fc5 commit 12785a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runner/src/server/services/statusService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ export class StatusService {
const { query } = request;
const { state } = await this.payService.payStatus(self, meta.payApiKey);

if (state.status === "success") {
this.logger.info(
["StatusService", "shouldShowPayErrorPage"],
`user ${request.yar.id} - shouldShowPayErrorPage: User has succeeded, continuing`
);
return false;
}

const form: FormModel = request.server.app.forms[request.params.id];
const { maxAttempts, allowSubmissionWithoutPayment } = form.feeOptions;

Expand Down

0 comments on commit 12785a7

Please sign in to comment.