AbstractSignatureRequest::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @link https://github.com/phpviet/omnipay-onepay
4
 * @copyright (c) PHP Viet
5
 * @license [MIT](http://www.opensource.org/licenses/MIT)
6
 */
7
8
namespace Omnipay\OnePay\Message;
9
10
/**
11
 * @author Vuong Minh <[email protected]>
12
 * @since 1.0.0
13
 */
14
abstract class AbstractSignatureRequest extends AbstractRequest
15
{
16
    use Concerns\RequestEndpoint;
17
    use Concerns\RequestSignature;
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getData(): array
23
    {
24
        $parameters = $this->getParameters();
25
        call_user_func_array(
26
            [$this, 'validate'],
27
            $this->getSignatureParameters()
28
        );
29
        $parameters['vpc_SecureHash'] = $this->generateSignature();
30
        unset($parameters['vpc_HashKey'], $parameters['testMode']);
31
32
        return $parameters;
33
    }
34
}
35