Docs For Class CallerServices

## Class CallerServices

Description

Interface class that wraps all WSDL ports into a unified API for the user. Also handles PayPal-specific details like type handling, error handling, etc.

$Id: CallerServices.php,v 1.4 2006/03/17 07:00:30 dennis Exp $

Located in /PayPal/CallerServices.php (line 32)

    SOAP_Client
       |
       --CallerServices

Variable Summary
array $_endpointMap
string $_logDir
Log $_logger
integer $_logLevel
APIProfile $_profile
Method Summary
CallerServices CallerServices (APIProfile $profile)
void &AddressVerify (mixed $AddressVerifyReq)
void &BillAgreementUpdate (mixed $BillAgreementUpdateReq)
void &BillUser (mixed $BillUserReq)
void &call (mixed $method, mixed &$params, [mixed $namespace = false], [mixed $soapAction = false])
void &DoAuthorization (mixed $DoAuthorizationReq)
void &DoCapture (mixed $DoCaptureReq)
void &DoDirectPayment (mixed $DoDirectPaymentReq)
void &DoExpressCheckoutPayment (mixed $DoExpressCheckoutPaymentReq)
void &DoReauthorization (mixed $DoReauthorizationReq)
void &DoVoid (mixed $DoVoidReq)
void &EnterBoarding (mixed $EnterBoardingReq)
APIProfile &getAPIProfile ()
void &GetBoardingDetails (mixed $GetBoardingDetailsReq)
void &GetExpressCheckoutDetails (mixed $GetExpressCheckoutDetailsReq)
Log &getLogger ()
AbstractResponseType &getResponseObject (array $values, string $type)
void &GetTransactionDetails (mixed $GetTransactionDetailsReq)
void &MassPay (mixed $MassPayReq)
void &RefundTransaction (mixed $RefundTransactionReq)
void setAPIProfile (APIProfile &$profile)
boolean setEndpoint (string $portType, string $version)
void &SetExpressCheckout (mixed $SetExpressCheckoutReq)
void setLogger (Log &$logger)
void &TransactionSearch (mixed $TransactionSearchReq)
void &_decode (mixed &$soapval)
integer _getElapsed (integer $start)
integer _getMicroseconds ()
void _logTransaction (string $operation, integer $elapsed, object $response)
string _sanitizeLog (string $xml)
Variables
array $_endpointMap (line 50)

The portType/environment -> endpoint map.

- access: protected

string $_logDir = '/tmp' (line 77)

If we're logging, what directory should we create log files in? Note that a log name coincides with a symlink, logging will *not* be done to avoid security problems. File names are <DateStamp>.PayPal.log.

- access: protected

Log $_logger (line 86)

The PEAR Log object we use for logging.

- access: protected

integer $_logLevel = PEAR_LOG_INFO (line 65)

What level should we log at? Valid levels are: PEAR_LOG_ERR - Log only severe errors.

PEAR_LOG_INFO - (default) Date/time of operation, operation name, elapsed time, success or failure indication. PEAR_LOG_DEBUG - Full text of SOAP requests and responses and other debugging messages.

See the PayPal SDK User Guide for more details on these log levels.

- access: protected

APIProfile $_profile (line 41)

The profile to use in API calls.

- access: protected

Methods
Constructor CallerServices (line 95)

Construct a new CallerServices object.

CallerServices CallerServices (APIProfile $profile)

- APIProfile $profile: The profile with the username, password, and any other information necessary to use the SDK.

AddressVerify (line 592)
void &AddressVerify (mixed $AddressVerifyReq)
BillAgreementUpdate (line 560)
void &BillAgreementUpdate (mixed $BillAgreementUpdateReq)
BillUser (line 464)
void &BillUser (mixed $BillUserReq)
call (line 274)

Override SOAP_Client::call() to always add our security header first.

void &call (mixed $method, mixed &$params, [mixed $namespace = false], [mixed $soapAction = false])
DoAuthorization (line 912)
void &DoAuthorization (mixed $DoAuthorizationReq)
DoCapture (line 816)
void &DoCapture (mixed $DoCaptureReq)
DoDirectPayment (line 784)
void &DoDirectPayment (mixed $DoDirectPaymentReq)
DoExpressCheckoutPayment (line 688)
void &DoExpressCheckoutPayment (mixed $DoExpressCheckoutPaymentReq)
DoReauthorization (line 848)
void &DoReauthorization (mixed $DoReauthorizationReq)
DoVoid (line 880)
void &DoVoid (mixed $DoVoidReq)
EnterBoarding (line 624)
void &EnterBoarding (mixed $EnterBoardingReq)
getAPIProfile (line 232)

Get the current profile.

- return: The current profile.

APIProfile &getAPIProfile ()
GetBoardingDetails (line 656)
void &GetBoardingDetails (mixed $GetBoardingDetailsReq)
GetExpressCheckoutDetails (line 752)
void &GetExpressCheckoutDetails (mixed $GetExpressCheckoutDetailsReq)
getLogger (line 243)

Gets the PEAR Log object to use.

- return: A Log object, either provided by the user or created by this function.

Log &getLogger ()
getResponseObject (line 178)

Take the decoded array from SOAP_Client::__call() and turn it into an object of the appropriate AbstractResponseType subclass.

- return: The response object.

AbstractResponseType &getResponseObject (array $values, string $type)

- array $values: The decoded SOAP response.
- string $type: The type of the response object.

GetTransactionDetails (line 432)
void &GetTransactionDetails (mixed $GetTransactionDetailsReq)
MassPay (line 528)
void &MassPay (mixed $MassPayReq)
RefundTransaction (line 400)
void &RefundTransaction (mixed $RefundTransactionReq)
setAPIProfile (line 222)

Use a given profile.

void setAPIProfile (APIProfile &$profile)

- APIProfile $profile: The profile with the username, password, and any other information necessary to use the SDK.

setEndpoint (line 142)

Sets the WSDL endpoint based on $portType and on the environment set in the user's profile.

- return: | PayPal_Error An error if mapping can't be done, else true.

boolean setEndpoint (string $portType, string $version)

- string $portType: The portType the current operation is part of.
- string $version: The WSDL version being used.

SetExpressCheckout (line 720)
void &SetExpressCheckout (mixed $SetExpressCheckoutReq)
setLogger (line 263)

Sets a custom PEAR Log object to use in logging.

void setLogger (Log &$logger)

- Log &$logger: A PEAR Log instance.

TransactionSearch (line 496)
void &TransactionSearch (mixed $TransactionSearchReq)
_decode (line 295)

Override some of the default SOAP:: package _decode behavior to handle simpleTypes and complexTypes with simpleContent.

- access: protected

void &_decode (mixed &$soapval)
_getElapsed (line 395)

Return the difference between now and $start in microseconds.

- return: Number of microseconds elapsed since $start
- access: protected

integer _getElapsed (integer $start)

- integer $start: Start time including microseconds.

_getMicroseconds (line 380)

Return the current time including microseconds.

- return: Current time with microseconds.
- access: protected

integer _getMicroseconds ()
_logTransaction (line 331)

Log the current transaction depending on the current log level.

- access: protected

void _logTransaction (string $operation, integer $elapsed, object $response)

- string $operation: The operation called.
- integer $elapsed: Microseconds taken.
- object $response: The response object.

_sanitizeLog (line 364)

Strip sensitive information (API passwords and credit card numbers) from raw XML requests/responses.

- return: The sanitized XML.
- access: protected

string _sanitizeLog (string $xml)

- string $xml: The XML to sanitize.

Documentation generated on Thu, 11 May 2006 22:39:09 -0400 by phpDocumentor 1.3.0RC3