$requestOrder->setAuxMisc('SomeOtherRandomInternalTrackingID');
$requestOrder->setAccount($CONFIG_ACCOUNT);
$requestOrder->setHandling('OL');
$requestOrder->setProductID('DL');
$requestOrder->setSubtype('3Y');
$requestOrder->setPurpose('AA');
//Create the Request object, then add the Order to it.
$request = new Request();
//If you call this method, you will need to ensure a
//$newPassword = $request->resetPassword();
$request->setHost($CONFIG_HOST);
$request->setAccount($CONFIG_ACCOUNT);
$request->setUserID($CONFIG_USERID);
$request->setPassword($CONFIG_PASSWORD);
$request->setReportType($CONFIG_REPORTTYPE);
$request->setADRIPAddress($CONFIG_ADRIPADDRESS);
$request->setADRPort($CONFIG_ADRPORT);
//An optional report
$request->setAdditionalReportType(\Adr\Request\AdditionalReportType::HTML);
$request->addOrder($requestOrder);
//Let's check out how the Request XML looks
print 'REQUEST XML BEING SENT TO ADR:' . PHP_EOL . $request->getXML();
//Our Request is ready to send to ADR, but we're not actually doing it as I assume you do not have an account.
try {
    $response = $request->send();
    //Did we reset that password?  Save it or you'll be <epic>Sad Face</epic>.
    if ($request->hasNewPassword()) {
        $newPassword = $request->getNewPassword();
        //Open a file / database / whatever and save your new password.
    }
} catch (Exception $e) {
Example #2
0
$requestOrder->setState($state);
$requestOrder->setAuxMisc('SomeOtherRandomInternalTrackingID');
$requestOrder->setAccount('XXXX');
$requestOrder->setHandling('OL');
$requestOrder->setProductID('DL');
$requestOrder->setSubtype('3Y');
$requestOrder->setPurpose('AA');
//Create the Request object, then add the Order to it.
$request = new Request();
//$request->resetPassword();
$request->setHost('Online');
$request->setAccount('XXXXX');
$request->setUserID('01');
$request->setPassword('XXXXXXXXX');
$request->setReportType('XML');
$request->setADRIPAddress('333.333.333.333');
$request->setADRPort('12345');
$request->addOrder($requestOrder);
//Let's check out how the Request XML looks
//print 'REQUEST XML BEING SENT TO ADR:' . PHP_EOL . $request->getXML();
//Our Request is ready to send to ADR, but we're not actually doing it as I assume you do not have an account.
try {
    $response = $request->send();
} catch (Exception $e) {
    print "Exception found : " . $e->getMessage();
}
echo "Response retreived.";
print $response->getXML();
exit;
//Since we aren't actually going to communicate with ADR, so we have to fake this out by calling response::loadXML below
//There are four different XML files you can use to simulate different scores (see below)