diff --git a/wrenchboard/src/shared_tool/payments.cc b/wrenchboard/src/shared_tool/payments.cc index 85628a9f..e088dbbc 100644 --- a/wrenchboard/src/shared_tool/payments.cc +++ b/wrenchboard/src/shared_tool/payments.cc @@ -1104,13 +1104,13 @@ long WrenchContractPayment( CVars in, CVars &out ) //pgsql_exec("UPDATE members SET balance=balance + %lu WHERE id = %lu",x["amount"].Long(),x["member_id"].Long() ); // pay attention to who you pay here char confirmation[15] = ""; Confirmation(final_payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call - logfmt( logINFO, "paying for job completed, make sure you paythe correct person()" ); - UpdateMemberWallet( x["member_id"].Long(), client_wallet_id,x["amount"].Long(), final_payment_id); // correct this dont send amount + logfmt( logINFO, "paying for job completed, make sure you pay the correct person()" ); + UpdateMemberWallet( x["member_id"].Long(), client_wallet_id,x["amount"].Long(), final_payment_id); // correct this dont send amount x["flags"] = FLAG_OK; x["flags"].set_valid( true ); x["payment_id"] = final_payment_id; x["payment_id"].set_valid( true ); pgsql_exec("UPDATE members_payments SET flags = %lu WHERE id = %lu",x["flags"].Long(),final_payment_id ); - pgsql_exec("UPDATE members_payments SET flags = %lu WHERE id = %lu",FLAG_OK_PAID,payment_id ); // this is the holdings + pgsql_exec("UPDATE members_payments SET flags = %lu WHERE id = %lu",FLAG_OK_PAID,payment_id ); // this is the holdings //pgsql_exec("UPDATE members_jobs_offer SET payment_id = %lu WHERE id = %lu",x["payment_id"].Long(),x["what_offer"].Long() ); load_db_record( out, "SELECT * FROM members_payments WHERE id = %lu ", payment_id ); } else { @@ -1174,7 +1174,7 @@ long WrenchSendMoneyPayment( CVars in, CVars &out ) x["amount"] = in["amount"]; x["amount"].set_valid( true ); x["fee"] = in["fee"]; x["fee"].set_valid( true ); x["what_sendmoney"] = in["sendmoney_id"]; x["what_sendmoney"].set_valid( true ); - x["currency"] = y["currency"]; x["currency"].set_valid( true ); + x["currency"] = out["currency"]; x["currency"].set_valid( true ); x["flags"] = FLAG_INIT; x["flags"].set_valid( true ); // starting the pprocess payment_id = insert_db_record( DBS_VALID, "members_payments", "members_payments_id_seq", x ); logfmt(logINFO, "long WrenchSendMoneyPayment(CVars in, CVars &out) payment_id = %lu",payment_id);