bank uid
This commit is contained in:
@@ -744,18 +744,38 @@ long WrenchBoardMobileSendMoney(CVars in, CVars &out){
|
||||
REQ_STRING(in, "uid", 3, 150, "(.*)");
|
||||
REQ_STRING(in, "wallet_uid", 3, 150, "(.*)");
|
||||
long mode = REQ_LONG(in, "mode", 1, -1);
|
||||
REQ_STRING(in, "TerminatingCountryCode", 2, 5, "(.*)");
|
||||
REQ_LONG(in, "amount", 1, -1);
|
||||
// $in["TerminatingCountryCode"] = 'NG'; // NG - Nigeria
|
||||
|
||||
// LET CHECK IF YOU HAVE THE WALLET
|
||||
CVars wl;
|
||||
if ( load_db_record(wl, "SELECT w.*,c.country from members_wallet w LEFT join currency c ON c.code=w.currency"
|
||||
" WHERE c.country='%s' AND w.member_id=%lu AND w.uid='%s' ",in["TerminatingCountryCode"].c_str(), in["member_id"].Long(),in["wallet_uid"].c_str())> 0){
|
||||
if (in["amount"].Long() > wl["transfer_limit"].Long() )
|
||||
out["status_message"] = "tranfer_amount_limit_error";
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
out["status_message"] = "wallet_not_found_error";
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
switch(mode){
|
||||
case WRENCH_EXISTING_ACCOUNT:
|
||||
REQ_STRING(in, "recipient_uid", 3, 150, "(.*)");
|
||||
if ( load_db_record(out, "SELECT id AS recipientid FROM sendmoney_recipient "
|
||||
" WHERE uid ='%s' AND member_id = %lu AND status = 1",in["recipient_uid"].c_str(), in["member_id"].Long())> 0){
|
||||
" WHERE uid ='%s' AND member_id = %lu AND status = 1 "
|
||||
" AND country='%s' ",in["recipient_uid"].c_str(), in["member_id"].Long(),in["TerminatingCountryCode"].c_str())> 0){
|
||||
in["recipientid"] = out["recipientid"]; in["recipientid"].set_valid( true );
|
||||
in["bankid"] = out["recipientid"]; in["bankid"].set_valid( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
out["status"] = "invalid_recipient";
|
||||
out["status_message"] = "invalid_recipient_error";
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
@@ -783,7 +803,7 @@ long WrenchBoardMobileSendMoney(CVars in, CVars &out){
|
||||
REQ_STRING(in, "sessionid", 2, 149, "(.*)");
|
||||
OPTIONAL(in, "comment") REQ_STRING(in, "comment", 2, 149, "(.*)");
|
||||
OPTIONAL(in, "loc") REQ_STRING(in, "loc", 3, 15, "(.*)");
|
||||
REQ_LONG(in, "amount", 1, -1);
|
||||
|
||||
|
||||
|
||||
in["action"] = WRENCHBOARD_SMONEY_MEMBER;
|
||||
@@ -809,6 +829,7 @@ long WrenchBoardMobileSendMoney(CVars in, CVars &out){
|
||||
ret = smoney_calls(in, out);
|
||||
if ( ret == PHP_API_OK){
|
||||
out["sendmoney_message"] ="Completed - Estimated delivery time is 2 to 4 Hours.";
|
||||
out["status_message"] = "complete_standard_processing";
|
||||
ret = PHP_API_TRANSFER_COMPLETE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user