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.html,v 1.19 2005/06/23 17:03:21 chagenbuch Exp $

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

SOAP_Client
   |
   --CallerServices
Variable Summary
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 &DoCapture (mixed $DoCaptureReq)
void &DoDirectPayment (mixed $DoDirectPaymentReq)
void &DoExpressCheckoutPayment (mixed $DoExpressCheckoutPaymentReq)
void &DoReauthorization (mixed $DoReauthorizationReq)
void &DoVoid (mixed $DoVoidReq)
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)
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 573)
void &AddressVerify (mixed $AddressVerifyReq)
BillAgreementUpdate (line 541)
void &BillAgreementUpdate (mixed $BillAgreementUpdateReq)
BillUser (line 445)
void &BillUser (mixed $BillUserReq)
call (line 259)

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

void &call (mixed $method, mixed &$params, [mixed $namespace = false], [mixed $soapAction = false])
DoCapture (line 733)
void &DoCapture (mixed $DoCaptureReq)
DoDirectPayment (line 701)
void &DoDirectPayment (mixed $DoDirectPaymentReq)
DoExpressCheckoutPayment (line 605)
void &DoExpressCheckoutPayment (mixed $DoExpressCheckoutPaymentReq)
DoReauthorization (line 765)
void &DoReauthorization (mixed $DoReauthorizationReq)
DoVoid (line 797)
void &DoVoid (mixed $DoVoidReq)
getAPIProfile (line 217)

Get the current profile.

  • return: The current profile.
APIProfile &getAPIProfile ()
GetExpressCheckoutDetails (line 669)
void &GetExpressCheckoutDetails (mixed $GetExpressCheckoutDetailsReq)
getLogger (line 228)

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 163)

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 413)
void &GetTransactionDetails (mixed $GetTransactionDetailsReq)
MassPay (line 509)
void &MassPay (mixed $MassPayReq)
RefundTransaction (line 381)
void &RefundTransaction (mixed $RefundTransactionReq)
setAPIProfile (line 207)

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 137)

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 637)
void &SetExpressCheckout (mixed $SetExpressCheckoutReq)
setLogger (line 248)

Sets a custom PEAR Log object to use in logging.

void setLogger (Log &$logger)
  • Log &$logger: A PEAR Log instance.
TransactionSearch (line 477)
void &TransactionSearch (mixed $TransactionSearchReq)
_getElapsed (line 376)

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 361)

Return the current time including microseconds.

  • return: Current time with microseconds.
  • access: protected
integer _getMicroseconds ()
_logTransaction (line 313)

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 346)

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, 23 Jun 2005 13:27:42 -0400 by phpDocumentor 1.2.3