Open Journal Systems
3.3.0
vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php
1
<?php
2
3
namespace
Omnipay\PayPal\Message
;
4
5
use
Omnipay\Common\Message\RedirectResponseInterface
;
6
10
class
ExpressAuthorizeResponse
extends
Response implements RedirectResponseInterface
11
{
12
protected
$liveCheckoutEndpoint
=
'https://www.paypal.com/cgi-bin/webscr'
;
13
protected
$testCheckoutEndpoint
=
'https://www.sandbox.paypal.com/cgi-bin/webscr'
;
14
15
public
function
isSuccessful
()
16
{
17
return
false
;
18
}
19
20
public
function
isRedirect
()
21
{
22
return
isset($this->data[
'ACK'
]) && in_array($this->data[
'ACK'
], array(
'Success'
,
'SuccessWithWarning'
));
23
}
24
25
public
function
getRedirectUrl
()
26
{
27
return
$this->
getCheckoutEndpoint
().
'?'
.http_build_query($this->
getRedirectQueryParameters
(),
''
,
'&'
);
28
}
29
30
public
function
getTransactionReference
()
31
{
32
return
isset($this->data[
'TOKEN'
]) ? $this->data[
'TOKEN'
] :
null
;
33
}
34
35
public
function
getRedirectMethod
()
36
{
37
return
'GET'
;
38
}
39
40
public
function
getRedirectData
()
41
{
42
return
null
;
43
}
44
45
protected
function
getRedirectQueryParameters
()
46
{
47
return
array(
48
'cmd'
=>
'_express-checkout'
,
49
'useraction'
=>
'commit'
,
50
'token'
=> $this->
getTransactionReference
(),
51
);
52
}
53
54
protected
function
getCheckoutEndpoint
()
55
{
56
return
$this->
getRequest
()->getTestMode() ? $this->testCheckoutEndpoint :
$this->liveCheckoutEndpoint
;
57
}
58
}
Omnipay\PayPal\Message\ExpressAuthorizeResponse\getRedirectData
getRedirectData()
Definition:
vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:40
Omnipay\PayPal\Message\ExpressAuthorizeResponse\getRedirectUrl
getRedirectUrl()
Definition:
vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:25
Omnipay\PayPal\Message\ExpressAuthorizeResponse\getRedirectMethod
getRedirectMethod()
Definition:
vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:35
Omnipay\Common\Message\RedirectResponseInterface
Definition:
lib/vendor/omnipay/common/src/Omnipay/Common/Message/RedirectResponseInterface.php:18
Omnipay\PayPal\Message\ExpressAuthorizeResponse\isRedirect
isRedirect()
Definition:
vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:20
Omnipay\PayPal\Message\ExpressAuthorizeResponse\getRedirectQueryParameters
getRedirectQueryParameters()
Definition:
lib/vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:45
Omnipay\PayPal\Message\ExpressAuthorizeResponse\$liveCheckoutEndpoint
$liveCheckoutEndpoint
Definition:
lib/vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:12
Omnipay\PayPal\Message\ExpressAuthorizeResponse\getTransactionReference
getTransactionReference()
Definition:
vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:30
Omnipay\PayPal\Message\ExpressAuthorizeResponse\$testCheckoutEndpoint
$testCheckoutEndpoint
Definition:
lib/vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:13
Omnipay\Common\Message\AbstractResponse\getRequest
getRequest()
Definition:
lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractResponse.php:71
Omnipay\PayPal\Message\ExpressAuthorizeResponse\getCheckoutEndpoint
getCheckoutEndpoint()
Definition:
lib/vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:54
Omnipay\PayPal\Message
Definition:
lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:6
Omnipay\PayPal\Message\ExpressAuthorizeResponse\isSuccessful
isSuccessful()
Definition:
vendor/omnipay/paypal/src/Message/ExpressAuthorizeResponse.php:15
plugins
paymethod
paypal
vendor
omnipay
paypal
src
Message
ExpressAuthorizeResponse.php
Generated on Fri Aug 28 2020 14:51:43 for Open Journal Systems by
1.8.17