Index: branches/5.2.x/units/gateways/gw_classes/paymentech.php =================================================================== diff -u -N -r13845 -r14099 --- branches/5.2.x/units/gateways/gw_classes/paymentech.php (.../paymentech.php) (revision 13845) +++ branches/5.2.x/units/gateways/gw_classes/paymentech.php (.../paymentech.php) (revision 14099) @@ -1,6 +1,6 @@ PrepareXML($data); - $this->gw_responce = curl_post($gw_params['submit_url'], $xml, $headers); + + $this->setGWResponce($gw_params, $headers, $xml); $gw_responce = $this->parseGWResponce(null, $gw_params); + $this->CheckCVV_AVS($gw_params); return ($this->parsed_responce['ProcStatus'] != 0 || $this->parsed_responce['ApprovalStatus'] != 1) ? false : true; } @@ -150,7 +152,8 @@ ); $xml = $this->PrepareXML($data); - $this->gw_responce = curl_post($gw_params['submit_url'], $xml, $headers); + + $this->setGWResponce($gw_params, $headers, $xml); $gw_responce = $this->parseGWResponce(null, $gw_params); return ($gw_responce['ProcStatus'] != 0 || $gw_responce['ApprovalStatus'] != 1) ? false : true; @@ -161,6 +164,17 @@ } } + function setGWResponce($gw_params, $headers, $xml) + { + $curl_helper =& $this->Application->recallObject('CurlHelper'); + /* @var $curl_helper kCurlHelper */ + + $curl_helper->SetHeaders($headers); + $curl_helper->SetPostData($xml); + + $this->gw_responce = $curl_helper->Send( $gw_params['submit_url'] ); + } + /** * Parse previosly saved gw responce into associative array *