@@ -47,7 +47,7 @@ |
||
47 | 47 | $concatData .= $data[$key]; |
48 | 48 | } |
49 | 49 | } |
50 | - $hash = hash('sha256', $this->pin . $concatData); |
|
50 | + $hash = hash('sha256', $this->pin.$concatData); |
|
51 | 51 | |
52 | 52 | return $data['signature'] === $hash; |
53 | 53 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function register() |
28 | 28 | { |
29 | - $this->app->singleton(DotpayApi::class, function ($app) { |
|
29 | + $this->app->singleton(DotpayApi::class, function($app) { |
|
30 | 30 | return new DotpayApi($app['config']['dotpay']['api']); |
31 | 31 | }); |
32 | 32 |
@@ -29,6 +29,6 @@ |
||
29 | 29 | 'headers' => ['content-type' => 'application/json', 'Accept' => 'application/json'], |
30 | 30 | 'body' => json_encode($request->toArray(), 320) |
31 | 31 | ]; |
32 | - return json_decode($this->client->request($request->method(),$this->base_url.$request->path(), $options)->getBody()); |
|
32 | + return json_decode($this->client->request($request->method(), $this->base_url.$request->path(), $options)->getBody()); |
|
33 | 33 | } |
34 | 34 | } |
@@ -39,14 +39,14 @@ |
||
39 | 39 | */ |
40 | 40 | public function __construct($operation_number, $data) |
41 | 41 | { |
42 | - if(!$operation_number){ |
|
42 | + if (!$operation_number) { |
|
43 | 43 | throw new RequestIntegrityException("Operation number is not set"); |
44 | 44 | } |
45 | 45 | |
46 | 46 | $this->operation_number = $operation_number; |
47 | 47 | |
48 | 48 | foreach ($data as $key => $value) { |
49 | - if(!$value || is_numeric($value) && $value <= 0){ |
|
49 | + if (!$value || is_numeric($value) && $value <= 0) { |
|
50 | 50 | throw new RequestIntegrityException(); |
51 | 51 | } |
52 | 52 | $this->$key = $value; |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * @throws Exceptions\RequestIntegrityException |
50 | 50 | * @throws \GuzzleHttp\Exception\GuzzleException |
51 | 51 | */ |
52 | - public function refundPayment($operation_number, $data){ |
|
52 | + public function refundPayment($operation_number, $data) { |
|
53 | 53 | return $this->dotpayApi->refundPayment($operation_number, $data); |
54 | 54 | } |
55 | 55 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | * @throws \Evilnet\Dotpay\Exceptions\RequestIntegrityException |
58 | 58 | * @throws \GuzzleHttp\Exception\GuzzleException |
59 | 59 | */ |
60 | - public function refundPayment($operation_number, $payment){ |
|
60 | + public function refundPayment($operation_number, $payment) { |
|
61 | 61 | return $this->client->makeRequest(new CreateRefund($operation_number, $payment)); |
62 | 62 | } |
63 | 63 |