-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGatewayInterface.php
65 lines (55 loc) · 1.53 KB
/
GatewayInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
namespace gateways;
use Omnipay\Common\Message\ResponseInterface;
/**
* Interface GatewayInterface
*
* This interface defines the functions that any gateway classes must contain.
*
* @package app\modules\internal\models\gateways
*
*
*/
interface GatewayInterface
{
/**
* Get the data for a purchase transaction.
*
* @param array $paymentDetails The full data from the original json to be processed.
*
* @return \Omnipay\Common\Message\ResponseInterface
*/
public function getPurchaseData($paymentDetails);
/**
* Get the data for a refund transaction.
*
* @param array $paymentDetails The full data from the original json to be processed.
*
* @return \Omnipay\Common\Message\ResponseInterface
*/
public function getRefundData($paymentDetails);
/**
* Get the data for a void transaction
*
* @param array $paymentDetails The full data from the original json to be processed.
*
* @return mixed
*/
public function getVoidData($paymentDetails);
/**
* Get the transaction ID from the response
*
* @param \Omnipay\Common\Message\ResponseInterface $response
*
* @return null|string
*/
public function getTransactionId(ResponseInterface $response);
/**
* Get the transaction result code from the response
*
* @param \Omnipay\Common\Message\ResponseInterface $response
*
* @return null|string
*/
public function getTransactionResultCode(ResponseInterface $response);
}