CompletePurchaseRequest::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @link https://github.com/phpviet/omnipay-vtcpay
4
 *
5
 * @copyright (c) PHP Viet
6
 * @license [MIT](https://opensource.org/licenses/MIT)
7
 */
8
9
namespace Omnipay\VTCPay\Message;
10
11
/**
12
 * @author Vuong Minh <[email protected]>
13
 * @since 1.0.0
14
 */
15
class CompletePurchaseRequest extends AbstractIncomingRequest
16
{
17
    /**
18
     * {@inheritdoc}
19
     * @throws \Omnipay\Common\Exception\InvalidRequestException
20
     */
21
    public function getData(): array
22
    {
23
        $this->validate('amount', 'reference_number', 'status', 'website_id');
24
25
        return parent::getData();
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected function getIncomingParameters(): array
32
    {
33
        return $this->httpRequest->query->all();
34
    }
35
}
36