PayU integration by Krzysztof Gzocha
  • Namespace
  • Class

Namespaces

  • Team3
    • PayU
      • Annotation
      • Communication
        • CurlRequestBuilder
        • HttpStatusParser
        • Notification
        • Process
          • NotificationProcess
          • ResponseDeserializer
        • Request
          • Model
        • Response
          • Model
        • Sender
      • Configuration
        • Credentials
      • Order
        • Autocomplete
          • Strategy
        • Model
          • Buyer
          • Money
          • Products
          • ShippingMethods
          • Traits
        • Transformer
          • UserOrder
            • Strategy
              • Product
              • ShippingMethod
      • PropertyExtractor
        • Reader
      • Serializer
      • SignatureCalculator
        • Encoder
          • Algorithms
          • Strategy
        • ParametersSorter
        • Validator
      • ValidatorBuilder

Classes

  • Team3\PayU\ValidatorBuilder\ValidatorBuilder

Interfaces

  • Team3\PayU\ValidatorBuilder\ValidatorBuilderInterface
 1 <?php
 2 /**
 3  * @author Krzysztof Gzocha <krzysztof.gzocha@xsolve.pl>
 4  */
 5 namespace Team3\PayU\SignatureCalculator;
 6 
 7 use Psr\Log\LoggerInterface;
 8 use Team3\PayU\Serializer\SerializerFactory;
 9 use Team3\PayU\SignatureCalculator\Encoder\EncoderFactory;
10 use Team3\PayU\SignatureCalculator\Encoder\EncoderInterface;
11 use Team3\PayU\SignatureCalculator\ParametersSorter\ParametersSorter;
12 
13 class OrderSignatureCalculatorFactory implements OrderSignatureCalculatorFactoryInterface
14 {
15     /**
16      * @param LoggerInterface $logger
17      *
18      * @return OrderSignatureCalculatorInterface
19      */
20     public function build(LoggerInterface $logger)
21     {
22         return new OrderSignatureCalculator(
23             $this->getEncoder($logger),
24             $this->getParametersSorter($logger),
25             $logger
26         );
27     }
28 
29     private function getSerializer(LoggerInterface $logger)
30     {
31         $serializerFactory = new SerializerFactory();
32 
33         return $serializerFactory->build($logger);
34     }
35 
36     /**
37      * @param LoggerInterface $logger
38      *
39      * @return EncoderInterface
40      */
41     private function getEncoder(LoggerInterface $logger)
42     {
43         $encoderFactory = new EncoderFactory();
44 
45         return $encoderFactory->build($logger);
46     }
47 
48     /**
49      * @param LoggerInterface $logger
50      *
51      * @return ParametersSorter
52      */
53     private function getParametersSorter(LoggerInterface $logger)
54     {
55         return new ParametersSorter($this->getSerializer($logger));
56     }
57 }
58 
PayU integration by Krzysztof Gzocha API documentation generated by ApiGen