long WrenchCardRechargePayment

This commit is contained in:
CHIEFSOFT\ameye
2023-07-13 20:50:47 -04:00
parent 07768ce846
commit cdf1253a0b
+6 -1
View File
@@ -429,8 +429,13 @@ long WrenchCardRechargePayment( CVars in, CVars &out )
long amount = REQ_LONG( in, "amount", 1, -1 );
REQ_STRING(in, "card_uid", 15, 45, "(.*)");
REQ_STRING(in, "uid", 15, 45, "(.*)");
REQ_STRING(in, "credit_reference", 15, 45, "(.*)");
// Test tye credit reference
//SELECT amount, currency FROM members_credit WHERE uid = 'eb813f56-41b3-4123-b943-605d3ae6c813' AND member_id = 1;
if (load_db_record(out, "SELECT c.id as card_id FROM creditcard c LEFT JOIN members m ON m.id =c.member_id "
" WHERE c.uid = '%s' AND m.uid = '%s'", in["card_uid"].c_str(), in["uid"].c_str()) > 0)
{