Skip to content

Commit

Permalink
fix status code
Browse files Browse the repository at this point in the history
  • Loading branch information
skript023 committed Apr 24, 2024
1 parent 5e378f2 commit 7dbfbd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module/payment/services/payment_processing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace gaboot

#define TRANSACTION_BEGIN_CLAUSE(json, midtrans) g_payment_processing->start_payment(json); if (g_payment_processing->make_payment(midtrans)) {
#define TRANSACTION_END_CLAUSE }
#define TRANSACTION_FAILED(midtrans) auto response = HttpResponse::newHttpJsonResponse(midtrans.to_json()); response->setStatusCode((HttpStatusCode)midtrans.m_data.status_code); return response;
#define TRANSACTION_FAILED(midtrans) auto response = HttpResponse::newHttpJsonResponse(midtrans.to_json()); response->setStatusCode((HttpStatusCode)midtrans.m_data.m_status.status_code); return response;
#define TRANSACTION_SUCCESS(midtrans) auto response = HttpResponse::newHttpJsonResponse(midtrans.to_json()); response->setStatusCode((HttpStatusCode)midtrans.m_data.status_code); return response;
#define TRANSACTION_ERROR(msg) return CustomException<k500InternalServerError>(fmt::format("Unable to create payment, error caught on {}", msg)).response();
}

0 comments on commit 7dbfbd6

Please sign in to comment.