diff --git a/wrenchboard/src/shared_tool/account.cc b/wrenchboard/src/shared_tool/account.cc index b5c7e4b4..4e07702d 100644 --- a/wrenchboard/src/shared_tool/account.cc +++ b/wrenchboard/src/shared_tool/account.cc @@ -690,7 +690,7 @@ long WrenchBoardCompleteBalanceTopup(CVars in, CVars &out){ REQ_LONG(in, "flutterwave_payments_id", 1, -1); //res = pgsql_query("SELECT id AS trx_id,member_id FROM flutterwave_payments WHERE tx_ref = '%s' AND status=0",in["tx_ref"].c_str()); - res = pgsql_query("SELECT id AS trx_id,member_id,tx_ref; FROM flutterwave_payments WHERE id = %lu AND status=0",in["flutterwave_payments_id"].Long()); + res = pgsql_query("SELECT id AS trx_id,member_id,tx_ref FROM flutterwave_payments WHERE id = %lu AND status=0",in["flutterwave_payments_id"].Long()); if (res != NULL && pgsql_num_rows(res) > 0) { mapf = pgsql_fetch_assoc(res, 0); CVars rec; @@ -709,7 +709,7 @@ long WrenchBoardCompleteBalanceTopup(CVars in, CVars &out){ if ( in["status"].Long() == 5){ - in["tx_ref"] = rec["tx_ref"]; in["tx_ref"].set_valid( true ); // note we change tx_ref here + in["tx_ref"] = rec["tx_ref"]; in["tx_ref"].set_valid( true ); // note we change tx_ref here return WrenchMemberTopupPayment( in, out ); // This start the actual crediting } }