/** * 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; }
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"]; } } } }
/** * 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; }