Created
February 18, 2014 11:35
-
-
Save apoca/9069327 to your computer and use it in GitHub Desktop.
Paypal sdk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use PayPal\Service\AdaptivePaymentsService; | |
use PayPal\Types\AP\Receiver; | |
use PayPal\Types\AP\ReceiverList; | |
use PayPal\Types\AP\PayRequest; | |
use PayPal\Types\Common\RequestEnvelope; | |
use PayPal\Service\AdaptiveAccountsService; | |
use PayPal\Types\AA\AccountIdentifierType; | |
use PayPal\Types\AA\GetVerifiedStatusRequest; | |
$getVerifiedStatus = new GetVerifiedStatusRequest(); | |
// (Optional - must be present if the emailAddress field above | |
// is not) The identifier of the PayPal account holder. If | |
// present, must be one (and only one) of these account | |
// identifier types: 1. emailAddress 2. mobilePhoneNumber 3. | |
// accountId | |
$accountIdentifier = new AccountIdentifierType(); | |
// (Required)Email address associated with the PayPal account: | |
// one of the unique identifiers of the account. | |
$accountIdentifier->emailAddress = $email_paypal; | |
$getVerifiedStatus->accountIdentifier = $accountIdentifier; | |
$getVerifiedStatus->matchCriteria = 'NONE'; | |
// ## Creating service wrapper object | |
// Creating service wrapper object to make API call | |
//Configuration::getAcctAndConfig() returns array that contains credential and config parameters | |
$service = new AdaptiveAccountsService($this->getAcctAndConfig()); | |
try { | |
/* wrap API method calls on the service object with a try catch */ | |
$response = $service->GetVerifiedStatus($getVerifiedStatus); | |
} catch (Exception $ex) { | |
echo $ex->getMessage(); | |
} | |
print_r($response); | |
I get this error: | |
<br /> | |
<b>Fatal error</b>: Class 'PayPal\Types\AA\GetVerifiedStatusRequest' not found in <b>/usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/module/Application/src/Application/Controller/AjaxController.php</b> on line <b>1655</b><br /> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment