/** * @param ProcessExternalPaymentRequest $processExternalPaymentRequest * @return Responses\ExternalProcessPaymentResponse */ public function processExternalPaymentWithToken(ProcessExternalPaymentRequest $processExternalPaymentRequest) { $postParamsArray = $processExternalPaymentRequest->getDefinedParams(); $apiNetworkClient = new ApiNetworkClient(); $apiResponse = $apiNetworkClient->request($this->getApiUri(Uri::PROCESS_EXTERNAL_PAYMENT), http_build_query($postParamsArray)); return new Responses\ExternalProcessPaymentResponse($apiResponse->getBodyJsonDecoded()); }