Transaction::cancelTransaction()   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 1
1
<?php
2
/**
3
 * Created By: Henry Ejemuta
4
 * PC: Enrico Systems
5
 * Project: laravel-clubkonnect
6
 * Company: Stimolive Technologies Limited
7
 * Class Name: Transaction.php
8
 * Date Created: 5/14/21
9
 * Time Created: 10:24 AM
10
 */
11
12
namespace HenryEjemuta\LaravelClubKonnect;
13
14
use HenryEjemuta\LaravelClubKonnect\Classes\ClubKonnectResponse;
15
16
abstract class Transaction
17
{
18
    private $clubKonnect;
19
20
    /**
21
     * Transactions constructor.
22
     * @param ClubKonnect $clubKonnect
23
     */
24
    public function __construct(ClubKonnect $clubKonnect)
25
    {
26
        $this->clubKonnect = $clubKonnect;
27
    }
28
29
30
    /**
31
     *
32
     * @param string $orderID
33
     * @return ClubKonnectResponse
34
     */
35
    public function queryByOrderID(string $orderID): ClubKonnectResponse
36
    {
37
        return $this->clubKonnect->withAuth('APIQueryV1.asp', [
38
            'OrderID' => $orderID
39
        ]);
40
    }
41
42
    /**
43
     *
44
     * @param string $requestID
45
     * @return ClubKonnectResponse
46
     */
47
    public function queryByRequestID(string $requestID): ClubKonnectResponse
48
    {
49
        return $this->clubKonnect->withAuth('APIQueryV1.asp', [
50
            'RequestID' => $requestID
51
        ]);
52
    }
53
54
    /**
55
     *
56
     * @param string $orderID
57
     * @return ClubKonnectResponse
58
     */
59
    public function cancelTransaction(string $orderID): ClubKonnectResponse
60
    {
61
        return $this->clubKonnect->withAuth('APICancelV1.asp', [
62
            'OrderID' => $orderID
63
        ]);
64
    }
65
66
67
}
68