Convert GET to POST in PHP - repost
$30-50 USD
Pagado a la entrega
Hello,
I have three php functions. I need to convert the last two (processGET, processACH) from a GET to a POST.
Thank You,
function processRequest(){
global $config;
$data = $_POST;
$data['MerchantID'] = $config['MerchantID'];
$data['RegKey'] = $config['RegKey'];
$data['USER2'] = substr($data['AccountNo'],strlen($data['AccountNo'])-4);
$req = new HTTPRequest('[url removed, login to view]','/bill/transac/[url removed, login to view]','POST',true);
$req->connect(html_entity_decode(http_build_query($data)));
$data = parseFields($req->getContent());
return $data;
}
function processGET(){
global $config;
$data = $_POST;
$data['MerchantID'] = $config['MerchantID'];
$data['RegKey'] = $config['RegKey'];
$data['Amount'] = number_format($data['Amount'], 2, '.', '');
$data['USER2'] = substr($data['AccountNo'],strlen($data['AccountNo'])-4);
$str = html_entity_decode(http_build_query($data));
$data = file_get_contents('[url removed, login to view]'.$str);
return parseFields($data);
}
function processACH() {
global $config;
$data = $_POST;
$data['MerchantID'] = $config['MerchantID_ach'];
$data['RegKey'] = $config['RegKey_ach'];
$data['USER2'] = substr($data['AccountNo'],strlen($data['AccountNo'])-4);
$str = html_entity_decode(http_build_query($data));
$data = file_get_contents('[url removed, login to view]'.$str);
return parseFields($data);
}
Nº del proyecto: #4042387
Sobre el proyecto
Adjudicado a:
8 freelancers están ofertando un promedio de $35 por este trabajo
I have sent a private message to your inbox that contains my relevent skills and any questions I have.
Please check your PMB! I have sent you a message regarding my bid. I look forward to hearing a response from your end!