Open Journal Systems
3.3.0
lib/vendor/omnipay/paypal/src/Message/Response.php
1
<?php
2
3
namespace
Omnipay\PayPal\Message
;
4
5
use
Omnipay\Common\Message\AbstractResponse
;
6
use
Omnipay\Common\Message\RequestInterface
;
7
11
class
Response
extends
AbstractResponse
12
{
13
public
function
__construct
(
RequestInterface
$request
,
$data
)
14
{
15
$this->request =
$request
;
16
parse_str(
$data
, $this->data);
17
}
18
19
public
function
isPending
()
20
{
21
return
isset($this->data[
'PAYMENTINFO_0_PAYMENTSTATUS'
])
22
&& $this->data[
'PAYMENTINFO_0_PAYMENTSTATUS'
] ==
'Pending'
;
23
}
24
25
public
function
isSuccessful
()
26
{
27
return
isset($this->data[
'ACK'
]) && in_array($this->data[
'ACK'
], array(
'Success'
,
'SuccessWithWarning'
));
28
}
29
30
public
function
getTransactionReference
()
31
{
32
foreach
(array(
'REFUNDTRANSACTIONID'
,
33
'TRANSACTIONID'
,
34
'PAYMENTINFO_0_TRANSACTIONID'
,
35
'AUTHORIZATIONID'
) as $key) {
36
if
(isset($this->data[$key])) {
37
return
$this->data[$key];
38
}
39
}
40
}
41
42
public
function
getMessage
()
43
{
44
return
isset($this->data[
'L_LONGMESSAGE0'
]) ? $this->data[
'L_LONGMESSAGE0'
] :
null
;
45
}
46
}
Omnipay\Common\Message\RequestInterface
Definition:
lib/vendor/omnipay/common/src/Omnipay/Common/Message/RequestInterface.php:16
Omnipay\PayPal\Message\Response\getMessage
getMessage()
Definition:
lib/vendor/omnipay/paypal/src/Message/Response.php:42
Omnipay\PayPal\Message\Response
Definition:
lib/vendor/omnipay/paypal/src/Message/Response.php:11
Omnipay\Common\Message\AbstractResponse\$data
$data
Definition:
lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractResponse.php:52
Omnipay\PayPal\Message\Response\isPending
isPending()
Definition:
lib/vendor/omnipay/paypal/src/Message/Response.php:19
Omnipay\PayPal\Message\Response\isSuccessful
isSuccessful()
Definition:
lib/vendor/omnipay/paypal/src/Message/Response.php:25
Omnipay\Common\Message\AbstractResponse
Definition:
lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractResponse.php:31
Omnipay\PayPal\Message\Response\__construct
__construct(RequestInterface $request, $data)
Definition:
lib/vendor/omnipay/paypal/src/Message/Response.php:13
Omnipay\Common\Message\AbstractResponse\$request
$request
Definition:
lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractResponse.php:42
Omnipay\PayPal\Message\Response\getTransactionReference
getTransactionReference()
Definition:
lib/vendor/omnipay/paypal/src/Message/Response.php:30
Omnipay\PayPal\Message
Definition:
lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:6
plugins
paymethod
paypal
lib
vendor
omnipay
paypal
src
Message
Response.php
Generated on Fri Aug 28 2020 14:53:25 for Open Journal Systems by
1.8.17