-
Notifications
You must be signed in to change notification settings - Fork 2
/
Exception.php
55 lines (51 loc) · 1.27 KB
/
Exception.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
<?php
namespace Dfe\TwoCheckout;
use Df\Core\O;
# 2016-08-21
final class Exception extends \Df\Payment\Exception {
/**
* 2016-08-21
* @override
* @see \Df\Core\Exception::__construct()
* @used-by \Dfe\TwoCheckout\Method::charge()
* @param array(string => mixed) $response
* @param array(string => mixed) $request [optional]
*/
function __construct(array $res, array $req = []) {
$this->_req = $req;
$this->_res = new O($res);
parent::__construct();
}
/**
* 2016-08-19
* @override
* @see \Df\Core\Exception::message()
* @used-by df_xts()
* @used-by \Df\Core\Exception::throw_()
* @used-by \Dfe\TwoCheckout\Method::api()
*/
function message():string {return df_api_rr_failed('2Checkout', $this->_res->a(), $this->_req);}
/**
* 2016-08-21
* @override
* @see \Df\Core\Exception::messageC()
* @used-by \Df\Payment\PlaceOrderInternal::message()
*/
function messageC():string {return dfp_error_message(df_first(df_clean(
$this->_res->a('errors/0/message'), $this->_res->a('exception/errorMsg')
)));}
/**
* 2016-08-21
* @used-by self::__construct()
* @used-by self::message()
* @var array(string => mixed)
*/
private $_req;
/**
* 2016-08-21
* @used-by self::__construct()
* @used-by self::message()
* @var O
*/
private $_res;
}