コード例 #1
0
    $rEnvelope->errorLanguage = "en_US";
    $ABARequest->requestEnvelope = $rEnvelope;
    $serverName = $_SERVER['SERVER_NAME'];
    $serverPort = $_SERVER['SERVER_PORT'];
    $url = dirname('http://' . $serverName . ':' . $serverPort . $_SERVER['REQUEST_URI']);
    $returnURL = $url . "/AddBankAccountDetails.php";
    $cancelURL = $url . "/AddBankAccount.php";
    $cancelUrlDescription = "cancelurl";
    $returnUrlDescription = "returnurl";
    $weboptions = new WebOptionsType();
    $weboptions->returnUrl = $returnURL;
    $weboptions->cancelUrl = $cancelURL;
    $weboptions->returnUrlDescription = $returnUrlDescription;
    $weboptions->cancelUrlDescription = $cancelUrlDescription;
    $ABARequest->webOptions = $weboptions;
    $aa = new AdaptiveAccounts();
    //$aa->sandBoxEmailAddress = $sandboxEmail;
    $response = $aa->AddBankAccount($ABARequest);
    if (strtoupper($aa->isSuccess) == 'FAILURE') {
        $_SESSION['FAULTMSG'] = $aa->getLastError();
        $location = "APIError.php";
        header("Location: {$location}");
    } else {
        $location = "AddBankAccountDetails.php";
        $_SESSION['BankAdded'] = $response;
        header("Location: {$location}");
    }
} catch (Exception $ex) {
    $fault = new FaultMessage();
    $errorData = new ErrorData();
    $errorData->errorId = $ex->getFile();
コード例 #2
0
    $APCRequest->expirationDate = $expirationDate;
    $APCRequest->createAccountKey = $createAccountKey;
    $APCRequest->cardVerificationNumber = $cardVerificationNumber;
    $APCRequest->billingAddress = $bAddress;
    $APCRequest->nameOnCard = $nameOnCard;
    $rEnvelope = new RequestEnvelope();
    $rEnvelope->errorLanguage = "en_US";
    $APCRequest->requestEnvelope = $rEnvelope;
    $serverName = $_SERVER['SERVER_NAME'];
    $serverPort = $_SERVER['SERVER_PORT'];
    $url = dirname('http://' . $serverName . ':' . $serverPort . $_SERVER['REQUEST_URI']);
    $returnURL = $url . "/AddPaymentCardDirectDetails.php";
    $cancelURL = $url . "/AddPaymentCardDirect.php";
    $cancelUrlDescription = "cancelurl";
    $returnUrlDescription = "returnurl";
    $aa = new AdaptiveAccounts();
    //$aa->sandBoxEmailAddress = $sandboxEmail;
    $response = $aa->AddPaymentCard($APCRequest);
    if (strtoupper($aa->isSuccess) == 'FAILURE') {
        $_SESSION['FAULTMSG'] = $aa->getLastError();
        $location = "APIError.php";
        header("Location: {$location}");
    } else {
        $location = "AddPaymentCardDirectDetails.php";
        $_SESSION['CardAdded'] = $response;
        header("Location: {$location}");
    }
} catch (Exception $ex) {
    $fault = new FaultMessage();
    $errorData = new ErrorData();
    $errorData->errorId = $ex->getFile();
コード例 #3
0
Calls  AdaptiveAccounts.php,and APIError.php.
********************************************/
require_once '../../../lib/AdaptiveAccounts.php';
require_once '../../../lib/Stub/AA/AdaptiveAccountsProxy.php';
require_once 'web_constants.php';
session_start();
try {
    $emailid = $_REQUEST["emailid"];
    $fundingSourceKey = $_REQUEST["fundingSourceKey"];
    $SFSCRequest = new SetFundingSourceConfirmedRequest();
    $SFSCRequest->fundingSourceKey = $fundingSourceKey;
    $SFSCRequest->emailAddress = $emailid;
    $rEnvelope = new RequestEnvelope();
    $rEnvelope->errorLanguage = "en_US";
    $SFSCRequest->requestEnvelope = $rEnvelope;
    $aa = new AdaptiveAccounts();
    //$aa->sandBoxEmailAddress = $sandboxEmail;
    $response = $aa->SetFundingSourceConfirmed($SFSCRequest);
    if (strtoupper($aa->isSuccess) == 'FAILURE') {
        $_SESSION['FAULTMSG'] = $aa->getLastError();
        $location = "APIError.php";
        header("Location: {$location}");
    } else {
        $location = "SetFundingSourceConfirmedDetails.php";
        $_SESSION['FundingSourceConfirmed'] = $response;
        header("Location: {$location}");
    }
} catch (Exception $ex) {
    $fault = new FaultMessage();
    $errorData = new ErrorData();
    $errorData->errorId = $ex->getFile();
コード例 #4
0
    $CARequest->partnerField4 = $partnerField4;
    $CARequest->partnerField5 = $partnerField5;
    $CARequest->preferredLanguageCode = "en_US";
    $rEnvelope = new RequestEnvelope();
    $rEnvelope->errorLanguage = "en_US";
    $CARequest->requestEnvelope = $rEnvelope;
    $CARequest->createAccountWebOptions = new CreateAccountWebOptionsType();
    $serverName = $_SERVER['SERVER_NAME'];
    $serverPort = $_SERVER['SERVER_PORT'];
    $url = dirname('http://' . $serverName . ':' . $serverPort . $_SERVER['REQUEST_URI']);
    $returnURL = $url . "/CreateAccountDetails.php";
    $CARequest->createAccountWebOptions->returnUrl = $returnURL;
    $CARequest->registrationType = "WEB";
    //$CARequest->sandboxEmailAddress = $sandboxEmail;
    $CARequest->emailAddress = $email;
    $aa = new AdaptiveAccounts();
    $aa->sandBoxEmailAddress = $sandboxEmail;
    $response = $aa->CreateAccount($CARequest);
    if (strtoupper($aa->isSuccess) == 'FAILURE') {
        $_SESSION['FAULTMSG'] = $aa->getLastError();
        $location = "APIError.php";
        header("Location: {$location}");
    } else {
        $location = $response->redirectURL;
        if (!empty($location)) {
            $_SESSION['createdAccount'] = $response;
            header("Location: {$location}");
        }
    }
} catch (Exception $ex) {
    $fault = new FaultMessage();
コード例 #5
0
function GetVerifiedStatus()
{
    $emailid = '*****@*****.**';
    $firstName = 'Bonzop';
    $lastname = 'Zaius';
    $VstatusRequest = new GetVerifiedStatusRequest();
    $VstatusRequest->emailAddress = $emailid;
    $VstatusRequest->matchCriteria = 'NAME';
    $VstatusRequest->firstName = $firstName;
    $VstatusRequest->lastName = $lastname;
    $rEnvelope = new RequestEnvelope();
    $rEnvelope->errorLanguage = "en_US";
    $VstatusRequest->requestEnvelope = $rEnvelope;
    $aa = new AdaptiveAccounts();
    //$aa->sandBoxEmailAddress = $sandboxEmail;
    $response = $aa->GetVerifiedStatus($VstatusRequest);
    if (strtoupper($aa->isSuccess) == 'FAILURE') {
        $FaultMsg = $aa->getLastError();
        echo "Transaction get status error Id: ";
        if (is_array($FaultMsg->error)) {
            echo $FaultMsg->error[0]->errorId . ", error message: " . $FaultMsg->error[0]->message;
        } else {
            echo $FaultMsg->error->errorId . ", error message: " . $FaultMsg->error->message;
        }
    } else {
        echo "Get Verified Status  Successful! \n";
    }
}
コード例 #6
0
    $lastname = $_REQUEST["lastname"];
    $city = $_REQUEST["city"];
    /* Make the call to PayPal to get the status of an account
       If an error occured, show the resulting errors
       */
    $VstatusRequest = new GetVerifiedStatusRequest();
    $VstatusRequest->emailAddress = $emailid;
    $VstatusRequest->matchCriteria = $city;
    $VstatusRequest->firstName = $firstName;
    $VstatusRequest->lastName = $lastname;
    $rEnvelope = new RequestEnvelope();
    $rEnvelope->errorLanguage = "en_US";
    $VstatusRequest->requestEnvelope = $rEnvelope;
    $serverName = $_SERVER['SERVER_NAME'];
    $serverPort = $_SERVER['SERVER_PORT'];
    $aa = new AdaptiveAccounts();
    //$aa->sandBoxEmailAddress = $sandboxEmail;
    $response = $aa->GetVerifiedStatus($VstatusRequest);
    if (strtoupper($aa->isSuccess) == 'FAILURE') {
        $_SESSION['FAULTMSG'] = $aa->getLastError();
        $location = "APIError.php";
        header("Location: {$location}");
    } else {
        $location = $response->redirectURL;
        if (!empty($location)) {
            $_SESSION['AddBankFundingSource'] = $response;
            header("Location: {$location}");
        }
    }
} catch (Exception $ex) {
    $fault = new FaultMessage();