Completed
Push — master ( 3e6656...a43425 )
by Andrii
10s
created

CompletePurchaseRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 2
cbo 4
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 6 1
A sendData() 0 4 1
1
<?php
2
3
/*
4
 * RoboKassa driver for the Omnipay PHP payment processing library
5
 *
6
 * @link      https://github.com/hiqdev/omnipay-epayservice
7
 * @package   omnipay-epayservice
8
 * @license   MIT
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace Omnipay\RoboKassa\Message;
13
14
/**
15
 * RoboKassa Complete Purchase Request.
16
 */
17
class CompletePurchaseRequest extends AbstractRequest
18
{
19
    /**
20
     * Get the data for this request.
21
     *
22
     * @return array request data
23
     */
24
    public function getData()
25
    {
26
        $this->validate('purse');
27
28
        return $this->httpRequest->request->all();
29
    }
30
31
    /**
32
     * Send the request with specified data.
33
     *
34
     * @param mixed $data The data to send
35
     *
36
     * @return CompletePurchaseResponse
37
     */
38
    public function sendData($data)
39
    {
40
        return $this->response = new CompletePurchaseResponse($this, $data);
41
    }
42
}
43