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\Configuration\Credentials;
 6 
 7 use Team3\PayU\SignatureCalculator\Encoder\Algorithms\AlgorithmInterface;
 8 use Team3\PayU\SignatureCalculator\Encoder\Algorithms\Md5Algorithm;
 9 
10 class Credentials implements CredentialsInterface
11 {
12     /**
13      * @var string
14      */
15     protected $merchantPosId;
16 
17     /**
18      * @var string
19      */
20     protected $privateKey;
21 
22     /**
23      * @var AlgorithmInterface
24      */
25     protected $signatureAlgorithm;
26 
27     /**
28      * Used to specify CURLOPT_SSL_CIPHER_LIST cURL option
29      * @var string
30      */
31     protected $encryptionProtocols;
32 
33     /**
34      * @param string             $merchantPosId
35      * @param string             $privateKey
36      * @param AlgorithmInterface $signatureAlgorithm
37      * @param string             $encryptionProtocols
38      */
39     public function __construct(
40         $merchantPosId,
41         $privateKey,
42         AlgorithmInterface $signatureAlgorithm = null,
43         $encryptionProtocols = 'TLSv1'
44     ) {
45         $this->merchantPosId = $merchantPosId;
46         $this->privateKey = $privateKey;
47 
48         if (null === $signatureAlgorithm) {
49             $signatureAlgorithm = new Md5Algorithm();
50         }
51 
52         $this->signatureAlgorithm = $signatureAlgorithm;
53         $this->encryptionProtocols = $encryptionProtocols;
54     }
55 
56     /**
57      * @return string
58      */
59     public function getMerchantPosId()
60     {
61         return $this->merchantPosId;
62     }
63 
64     /**
65      * @return string
66      */
67     public function getPrivateKey()
68     {
69         return $this->privateKey;
70     }
71 
72     /**
73      * @return AlgorithmInterface
74      */
75     public function getSignatureAlgorithm()
76     {
77         return $this->signatureAlgorithm;
78     }
79 
80     /**
81      * @return string
82      */
83     public function getEncryptionProtocols()
84     {
85         return $this->encryptionProtocols;
86     }
87 }
88 
PayU integration by Krzysztof Gzocha API documentation generated by ApiGen