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\ParametersSorter;
 6 
 7 use Team3\PayU\Order\Model\OrderInterface;
 8 use Team3\PayU\Serializer\SerializerInterface;
 9 
10 /**
11  * {@inheritdoc}
12  *
13  * Class ParametersSorter
14  * @package Team3\PayU\SignatureCalculator\ParametersSorter
15  */
16 class ParametersSorter implements ParametersSorterInterface
17 {
18     /**
19      * @var SerializerInterface
20      */
21     private $serializer;
22 
23     /**
24      * @param SerializerInterface $serializer
25      */
26     public function __construct(SerializerInterface $serializer)
27     {
28         $this->serializer = $serializer;
29     }
30 
31     /**
32      * Will return order serializable parameters in ascending order.
33      *
34      * @param  OrderInterface $order
35      * @return array
36      */
37     public function getSortedParameters(OrderInterface $order)
38     {
39         $json = $this->serializer->toJson($order);
40 
41         return $this->serializer->fromJson($json, 'array');
42     }
43 }
44 
PayU integration by Krzysztof Gzocha API documentation generated by ApiGen