1 <?php
2 /**
3 * @author Krzysztof Gzocha <krzysztof.gzocha@xsolve.pl>
4 */
5 namespace Team3\PayU\Communication\Process;
6
7 use Team3\PayU\Communication\Request\PayURequestInterface;
8 use Team3\PayU\Communication\Response\ResponseInterface;
9 use Team3\PayU\Configuration\ConfigurationInterface;
10
11 /**
12 * This class will help user to make a request to PayU.
13 * Basing on {@link PayURequestInterface} and {@link ConfigurationInterface}
14 * it will serialize objects, send request, parse HTTP status code of the response
15 * and deserialize the response into proper objects.
16 *
17 * Interface RequestProcessInterface
18 * @package Team3\PayU\Communication\Process
19 */
20 interface RequestProcessInterface
21 {
22 /**
23 * @param PayURequestInterface $payURequest
24 * @param ConfigurationInterface $configuration
25 *
26 * @return object
27 */
28 public function process(
29 PayURequestInterface $payURequest,
30 ConfigurationInterface $configuration
31 );
32
33 /**
34 * @return $this
35 */
36 public function disableValidation();
37
38 /**
39 * @param ResponseInterface $response
40 *
41 * @return $this
42 */
43 public function addResponse(ResponseInterface $response);
44 }
45