This commit is contained in:
CHIEFSOFT\ameye
2023-10-30 10:08:28 -04:00
parent 6732c0dd46
commit f37288e9f6
+10 -1
View File
@@ -274,10 +274,19 @@ long WrenchFamilyTransferCredit( CVars in, CVars &out ){
pgsql_exec("UPDATE members_payments SET flags = %lu WHERE id = %lu",x["flags"].Long(),payment_id );
pgsql_exec("UPDATE family_transfer SET credit_confirm = '%s' WHERE id = %lu ",confirmation, transfer_id );
CVars xrx;
load_db_record( out, "SELECT id AS transfer_id, * FROM family_transfer WHERE id = %lu ", transfer_id );
load_db_record( out, "SELECT f.id AS transfer_id, f.*,m.firstname FROM family_transfer f LEFT JOIN members m ON m.id = f.recipient WHERE f.id = %lu ", transfer_id );
out["status"] = "OK";
out["status_message"] = "trasnfer_completed";
ret = PHP_API_OK;
CVars xxx, yy;
char title[90];
xxx["member_id"] = in["member_id"]; xxx["member_id"].set_valid( true ); // for the original sender
snprintf(title, sizeof (title), "%lu(%s) Reward sent to %s",out["amount"].Long()*0.01,out["currency"].c_str(), out["firstname"].c_str());
xxx["title"] = title; xxx["title"].set_valid( true );
xxx["description"] = out["description"]; xxx["description"].set_valid( true );
WrenchLogRecent(xxx, yy);
} else {
out["status"] = "Unable to create payment";
}