For making Wahid eLoad requests programmatically, please follow these steps.
$we = WeConnect(); $xml = $we->request("1", array('company'=>30, 'number'=>3001234567, 'amount'=>30)); if (isset($xml->error)) { foreach ($xml->error as $e){print "Error:".$e['value']."\n";} } if (isset($xml->warning)) { foreach ($xml->warning as $e){print "Warning:".$e['value']."\n";} } if (isset($xml->message)) { foreach ($xml->message as $e){print "".$e['value']."\n";} } print "Request status:".$xml->status[0]['value']."\n";
$we = new WeConnect(); $xml = $we->request("35"); if ($xml->status[0]['code']=="1") { if (isset($xml->balance)) { print "Balance: ".$xml->balance[0]['value']."\n"; } }
$we = new WeConnect(); $xml = $we->request("0",array('webid' => 12345)); if (isset($xml->error)) { foreach ($xml->error as $e){print "Error:".$e['value']."\n";} } if (isset($xml->warning)) { foreach ($xml->warning as $e){print "Warning:".$e['value']."\n";} } if (isset($xml->message)) { foreach ($xml->message as $e){print "".$e['value']."\n";} }
$we = new WeConnect(); $xml = $we->request("refid",array('tid' => 12345)); if (isset($xml->error)) { foreach ($xml->error as $e){print "Error:".$e['value']."\n";} } if (isset($xml->warning)) { foreach ($xml->warning as $e){print "Warning:".$e['value']."\n";} } if (isset($xml->message)) { foreach ($xml->message as $e){print "".$e['value']."\n";} }
$we = new WeConnect(); $xml=$we->request("2", array('company'=>31, 'mtype'=>4, 'amount'=>335, 'number'=>'3001234567')); if (isset($xml->error)) { foreach ($xml->error as $e){print "Error:".$e['value']."\n";} } if (isset($xml->warning)) { foreach ($xml->warning as $e){print "Warning:".$e['value']."\n";} } if (isset($xml->message)) { foreach ($xml->message as $e){print "".$e['value']."\n";} } $id=0; if ($xml->status[0]['code']=="1") { if (isset($xml->webid) && ($xml->webid[0]['value']>1)) {$id=$xml->webid[0]['value'];} } if ($id>0){print "Request successfully registered: $id\n";} else{print "Error: Unable to register the request, please fix the error and try again.\n";}
$we = new WeConnect(); $xml=$we->request("1", array('number'=>'3001234567', 'company'=>30, 'amount'=>200)); if (isset($xml->error)) { foreach ($xml->error as $e){print "Error:".$e['value']."\n";} } if (isset($xml->warning)) { foreach ($xml->warning as $e){print "Warning:".$e['value']."\n";} } if (isset($xml->message)) { foreach ($xml->message as $e){print "".$e['value']."\n";} } $id=0; if ($xml->status[0]['code']=="1") { if (isset($xml->webid) && ($xml->webid[0]['value']>1)) { $id=$xml->webid[0]['value']; } } if ($id>0){print "Request successfully registered: $id\n";} else{print "Error: Unable to register the request, please fix the error and try again.\n";}
$we = new WeConnect(); $xml=$we->request("9", array('number'=>'3001234567', 'company'=>30, 'amount'=>200)); if (isset($xml->error)) { foreach ($xml->error as $e){print "Error:".$e['value']."\n";} } if (isset($xml->warning)) { foreach ($xml->warning as $e){print "Warning:".$e['value']."\n";} } if (isset($xml->message)) { foreach ($xml->message as $e){print "".$e['value']."\n";} } $id=0; if ($xml->status[0]['code']=="1") { if (isset($xml->webid) && ($xml->webid[0]['value']>1)) { $id=$xml->webid[0]['value']; } } if ($id>0){print "Request successfully registered: $id\n";} else{print "Error: Unable to register the request, please fix the error and try again.\n";}