src/Adyen/Service/AbstractResource.php
private function handleApplicationInfoInRequest($params)
	{
		// Only add if allowed
		if ($this->allowApplicationInfo) {
			// add/overwrite applicationInfo adyenLibrary even if it's already set
			$params['applicationInfo']['adyenLibrary']['name'] = $this->service->getClient()->getLibraryName();
			$params['applicationInfo']['adyenLibrary']['version'] = $this->service->getClient()->getLibraryVersion();

			if ($adyenPaymentSource = $this->service->getClient()->getConfig()->getAdyenPaymentSource()) {
				$params['applicationInfo']['adyenPaymentSource']['version'] = $adyenPaymentSource['version'];
				$params['applicationInfo']['adyenPaymentSource']['name'] = $adyenPaymentSource['name'];
			}

			if ($externalPlatform = $this->service->getClient()->getConfig()->getExternalPlatform()) {
				$params['applicationInfo']['externalPlatform']['version'] = $externalPlatform['version'];
				$params['applicationInfo']['externalPlatform']['name'] = $externalPlatform['name'];

				if (!empty($externalPlatform['integrator'])) {
					$params['applicationInfo']['externalPlatform']['integrator'] = $externalPlatform['integrator'];
				}
			}

		} else {
			// remove if exists
			if (isset($params['applicationInfo'])) {
				unset($params['applicationInfo']);
			}
		}

		return $params;
	}
private function handleApplicationInfoInRequest($params)
	{
		// Only add if allowed
		if ($this->allowApplicationInfo) {
			// add/overwrite applicationInfo adyenLibrary even if it's already set
			$params['applicationInfo']['adyenLibrary']['name'] = $this->service->getClient()->getLibraryName();
			$params['applicationInfo']['adyenLibrary']['version'] = $this->service->getClient()->getLibraryVersion();

			if ($adyenPaymentSource = $this->service->getClient()->getConfig()->getAdyenPaymentSource()) {
				$params['applicationInfo']['adyenPaymentSource']['version'] = $adyenPaymentSource['version'];
				$params['applicationInfo']['adyenPaymentSource']['name'] = $adyenPaymentSource['name'];
			}

			if ($externalPlatform = $this->service->getClient()->getConfig()->getExternalPlatform()) {
				$params['applicationInfo']['externalPlatform']['version'] = $externalPlatform['version'];
				$params['applicationInfo']['externalPlatform']['name'] = $externalPlatform['name'];

				if (!empty($externalPlatform['integrator'])) {
					$params['applicationInfo']['externalPlatform']['integrator'] = $externalPlatform['integrator'];
				}
			}

		} else {
			// remove if exists
			if (isset($params['applicationInfo'])) {
				unset($params['applicationInfo']);
			}
		}

		return $params;
	}
private function handleApplicationInfoInRequest ( $ params ) { // Only add if allowed if ( $ this -> allowApplicationInfo ) { // add/overwrite applicationInfo adyenLibrary even if it's already set $ params [ 'applicationInfo' ] [ 'adyenLibrary' ] [ 'name' ] = $ this -> service -> getClient ( ) -> getLibraryName ( ) ; $ params [ 'applicationInfo' ] [ 'adyenLibrary' ] [ 'version' ] = $ this -> service -> getClient ( ) -> getLibraryVersion ( ) ; if ( $ adyenPaymentSource = $ this -> service -> getClient ( ) -> getConfig ( ) -> getAdyenPaymentSource ( ) ) { $ params [ 'applicationInfo' ] [ 'adyenPaymentSource' ] [ 'version' ] = $ adyenPaymentSource [ 'version' ] ; $ params [ 'applicationInfo' ] [ 'adyenPaymentSource' ] [ 'name' ] = $ adyenPaymentSource [ 'name' ] ; } if ( $ externalPlatform = $ this -> service -> getClient ( ) -> getConfig ( ) -> getExternalPlatform ( ) ) { $ params [ 'applicationInfo' ] [ 'externalPlatform' ] [ 'version' ] = $ externalPlatform [ 'version' ] ; $ params [ 'applicationInfo' ] [ 'externalPlatform' ] [ 'name' ] = $ externalPlatform [ 'name' ] ; if ( ! empty ( $ externalPlatform [ 'integrator' ] ) ) { $ params [ 'applicationInfo' ] [ 'externalPlatform' ] [ 'integrator' ] = $ externalPlatform [ 'integrator' ] ; } } } else { // remove if exists if ( isset ( $ params [ 'applicationInfo' ] ) ) { unset ( $ params [ 'applicationInfo' ] ) ; } } return $ params ; }
If allowApplicationInfo is true then it adds applicationInfo to request
otherwise removes from the request

@param $params
@return mixed
If allowApplicationInfo is true then it adds applicationInfo to request otherwise removes from the request