market backed added

This commit is contained in:
CHIEFSOFT\ameye
2024-09-15 14:16:34 -04:00
parent 674f6b6d10
commit b4bf4be31f
5 changed files with 61 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
#ifndef __mx_market_h__
#define __mx_market_h__
#include "vars.h"
long market_calls(CVars in, CVars &out);
#endif
@@ -437,6 +437,11 @@ enum { PARTNER_STRIPE };
//**************************************************************
#define WRENCHBOARD_MARKET_START 220000
#define WRENCHBOARD_MARKET_END 229999
#define WRENCHBOARD_STRIPE_CHARGE_ONE 90004
#define WRENCHBOARD_STRIPE_CHARGE_NEW 90005
+43
View File
@@ -0,0 +1,43 @@
// History Listing
#include "clog.h"
#include "cgi.h"
#include "input.h"
#include "wrenchboard_api.h"
#include "history.h"
#include "market.h"
#include "email.h"
#include "payments.h"
#include "safestring.h"
#include <string>
#include "pgsql.h"
#include "pgsql_wrapper.h"
#include "cfg.h"
#include <curl/curl.h>
long market_calls(CVars in, CVars &out) {
logfmt(logINFO, "market_calls()");
long ret = PHP_API_BAD_PARAM;
char vname[700];
char file_section[50];
try {
long action = REQ_LONG( in, "action", 1, -1 );
switch(action){
case WRENCH_FILE_PROFILE:
//file_uid is the UID of the user
snprintf(vname, sizeof (vname), "SELECT uid AS member_uid, profile_pic AS saved_file_name FROM members WHERE uid ='%s'", in["file_uid"].c_str());
break;
}
if ( load_db_record(out, "%s", vname) > 0){
ret = PHP_API_OK;
}
} catch (bad_parameter) {
logfmt(logINFO, "ERROR CALL long market_calls(CVars in, CVars &out)");
}
logfmt(logINFO, "/market_calls()");
return ret;
}
@@ -23,6 +23,7 @@
#include "cards.h"
#include "family_acc.h"
#include "media.h"
#include "market.h"
#include "twilo.h"
//extern CSQL *sql;
@@ -113,6 +114,10 @@ long wrenchboard_api_main(CVars in, CVars &out) {
return mobile_calls(in, out);
}
if (action >= WRENCHBOARD_MARKET_START && action <= WRENCHBOARD_MARKET_END) {
logfmt(logINFO, "market_calls");
return market_calls(in, out);
}
if (action >= WRENCHBOARD_CONTRACT_START && action <= WRENCHBOARD_CONTRACT_END) // i could have used Jobs - but searated it for larger thinking
{
+1 -1
View File
@@ -82,7 +82,7 @@ class AirFlow extends BaseController
log_message('critical', "AirFlow::flowAutoMarket01 ********* ALL ".serialize($in) );
return []; //json_encode( $final_out );
}
public function flowProcessTransfer(){
$raw_json = file_get_contents('php://input');