/** * Service Call: DoAuthorization * @param DoAuthorizationReq $doAuthorizationReq * @param mixed $apiCredential - Optional API credential - can either be * a username configured in sdk_config.ini or a ICredential object * created dynamically * @return DoAuthorizationResponseType * @throws APIException */ public function DoAuthorization($doAuthorizationReq, $apiCredential = NULL) { $this->setStandardParams($doAuthorizationReq->DoAuthorizationRequest); $ret = new DoAuthorizationResponseType(); $resp = $this->call('PayPalAPIAA', 'DoAuthorization', $doAuthorizationReq, $apiCredential); $ret->init(PPUtils::xmlToArray($resp)); return $ret; }
/** * Service Call: DoAuthorization * * @param DoAuthorizationReq $doAuthorizationReq * * @return DoAuthorizationResponseType * @throws APIException */ public function DoAuthorization($doAuthorizationReq, $apiUsername = null) { $this->setStandardParams($doAuthorizationReq->DoAuthorizationRequest); $ret = new DoAuthorizationResponseType(); $resp = $this->call("DoAuthorization", $doAuthorizationReq, $apiUsername); $ret->init(PPUtils::xmlToArray($resp)); return $ret; }
/** * Service Call: DoAuthorization * @param DoAuthorizationReq $doAuthorizationReq * @param mixed $apiCredential - Optional API credential - can either be * a username configured in sdk_config.ini or a ICredential object * created dynamically * @return DoAuthorizationResponseType * @throws APIException */ public function DoAuthorization($doAuthorizationReq, $apiCredential = NULL) { $this->setStandardParams($doAuthorizationReq->DoAuthorizationRequest); $apiContext = new PPApiContext($this->config); $handlers = array(new PPMerchantServiceHandler($apiCredential, self::$SDK_NAME, self::$SDK_VERSION)); $ret = new DoAuthorizationResponseType(); $resp = $this->call('PayPalAPIAA', 'DoAuthorization', $doAuthorizationReq, $apiContext, $handlers); $ret->init(PPUtils::xmlToArray($resp)); return $ret; }
public function init($arr = null) { if ($arr != null) { parent::init($arr); foreach ($arr as $arry) { if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'uatpdetails') { $this->UATPDetails = new UATPDetailsType(); $this->UATPDetails->init($arry["children"]); } } if ($arry != null && isset($arry['text']) && $arry['name'] == 'authorizationcode') { $this->AuthorizationCode = $arry["text"]; } if ($arry != null && isset($arry['text']) && $arry['name'] == 'invoiceid') { $this->InvoiceID = $arry["text"]; } if ($arry != null && isset($arry['text']) && $arry['name'] == 'msgsubid') { $this->MsgSubID = $arry["text"]; } } } }
function DoUATPAuthorizationResponseType() { parent::DoAuthorizationResponseType(); $this->_namespace = 'urn:ebay:api:PayPalAPI'; $this->_elements = array_merge($this->_elements, array('UATPDetails' => array('required' => true, 'type' => 'UATPDetailsType', 'namespace' => 'urn:ebay:apis:eBLBaseComponents'), 'AuthorizationCode' => array('required' => true, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI'), 'InvoiceID' => array('required' => false, 'type' => 'string', 'namespace' => 'urn:ebay:api:PayPalAPI'))); }