Open Journal Systems
3.3.0
|
Data Fields | |
getParameter as | traitGetParameter |
Protected Member Functions | |
createRequest ($class, array $parameters) | |
createRequest ($class, array $parameters) | |
getDefaultHttpClient () | |
getDefaultHttpClient () | |
getDefaultHttpRequest () | |
getDefaultHttpRequest () | |
Protected Attributes | |
$httpClient | |
$httpRequest | |
$parameters | |
Base payment gateway class
This abstract class should be extended by all payment gateways throughout the Omnipay system. It enforces implementation of the GatewayInterface interface and defines various common attibutes and methods that all gateways should have.
Example:
// Initialise the gateway $gateway->initialize(...);
// Get the gateway parameters. $parameters = $gateway->getParameters();
// Create a credit card object $card = new CreditCard(...);
// Do an authorisation transaction on the gateway if ($gateway->supportsAuthorize()) { $gateway->authorize(...); } else { throw new \Exception('Gateway does not support authorize()'); }
For further code examples see the omnipay-example repository on github.
Base payment gateway class
This abstract class should be extended by all payment gateways throughout the Omnipay system. It enforces implementation of the GatewayInterface interface and defines various common attibutes and methods that all gateways should have.
Example:
// Initialise the gateway $gateway->initialize(...);
// Get the gateway parameters. $parameters = $gateway->getParameters();
// Create a credit card object $card = new CreditCard(...);
// Do an authorisation transaction on the gateway if ($gateway->supportsAuthorize()) { $gateway->authorize(...); } else { throw new \Exception('Gateway does not support authorize()'); }
For further code examples see the omnipay-example repository on github.
Definition at line 45 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::__construct | ( | ClientInterface | $httpClient = null , |
HttpRequest | $httpRequest = null |
||
) |
Create a new gateway instance
ClientInterface | $httpClient | A Guzzle client to make API calls with |
HttpRequest | $httpRequest | A Symfony HTTP request object |
Definition at line 77 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\$httpClient, Omnipay\Common\AbstractGateway\$httpRequest, Omnipay\Common\AbstractGateway\getDefaultHttpClient(), Omnipay\Common\AbstractGateway\getDefaultHttpRequest(), and Omnipay\Common\AbstractGateway\initialize().
Omnipay\Common\AbstractGateway::__construct | ( | ClientInterface | $httpClient = null , |
HttpRequest | $httpRequest = null |
||
) |
Create a new gateway instance
ClientInterface | $httpClient | A HTTP client to make API calls with |
HttpRequest | $httpRequest | A Symfony HTTP request object |
Definition at line 73 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\$httpClient, Omnipay\Common\AbstractGateway\$httpRequest, Omnipay\Common\AbstractGateway\getDefaultHttpClient(), Omnipay\Common\AbstractGateway\getDefaultHttpRequest(), and Omnipay\Common\AbstractGateway\initialize().
|
protected |
Create and initialize a request object
This function is usually used to create objects of type Omnipay\Common\Message\AbstractRequest (or a non-abstract subclass of it) and initialise them with using existing parameters from this gateway.
Example:
class MyRequest extends \Omnipay\Common\Message\AbstractRequest {};
class MyGateway extends \Omnipay\Common\AbstractGateway { function myRequest($parameters) { $this->createRequest('MyRequest', $parameters); } }
// Create the gateway object $gw = Omnipay::create('MyGateway');
// Create the request object $myRequest = $gw->myRequest($someParameters);
string | $class | The request class name |
array | $parameters |
Reimplemented in Omnipay\PayPal\RestGateway, and Omnipay\PayPal\RestGateway.
Definition at line 324 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\getParameters().
|
protected |
Create and initialize a request object
This function is usually used to create objects of type Omnipay\Common\Message\AbstractRequest (or a non-abstract subclass of it) and initialise them with using existing parameters from this gateway.
Example:
class MyRequest extends \Omnipay\Common\Message\AbstractRequest {};
class MyGateway extends \Omnipay\Common\AbstractGateway { function myRequest($parameters) { $this->createRequest('MyRequest', $parameters); } }
// Create the gateway object $gw = Omnipay::create('MyGateway');
// Create the request object $myRequest = $gw->myRequest($someParameters);
string | $class | The request class name |
array | $parameters |
Reimplemented in Omnipay\PayPal\RestGateway, and Omnipay\PayPal\RestGateway.
Definition at line 329 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\getParameters().
Referenced by Omnipay\PayPal\ExpressInContextGateway\authorize(), Omnipay\PayPal\ProGateway\authorize(), Omnipay\PayPal\ExpressGateway\authorize(), Omnipay\Common\AbstractGatewayTest_MockAbstractGateway\callCreateRequest(), Omnipay\PayPal\ProGateway\capture(), Omnipay\PayPal\ExpressGateway\completeAuthorize(), Omnipay\PayPal\ExpressGateway\completeOrder(), Omnipay\PayPal\ExpressGateway\completePurchase(), Omnipay\PayPal\ExpressGateway\fetchCheckout(), Omnipay\PayPal\ProGateway\fetchTransaction(), Omnipay\PayPal\ExpressInContextGateway\order(), Omnipay\PayPal\ExpressGateway\order(), Omnipay\PayPal\ProGateway\purchase(), Omnipay\PayPal\ProGateway\refund(), Omnipay\PayPal\ExpressGateway\transactionSearch(), and Omnipay\PayPal\ExpressGateway\void().
Omnipay\Common\AbstractGateway::getCurrency | ( | ) |
Definition at line 161 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\getParameter().
Omnipay\Common\AbstractGateway::getCurrency | ( | ) |
Definition at line 175 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\getParameter().
|
protected |
Get the global default HTTP client.
Definition at line 336 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
|
protected |
Get the global default HTTP client.
Definition at line 341 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\Common\AbstractGateway\__construct().
|
protected |
Get the global default HTTP request.
Definition at line 346 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
|
protected |
Get the global default HTTP request.
Definition at line 356 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\Common\AbstractGateway\__construct().
Omnipay\Common\AbstractGateway::getDefaultParameters | ( | ) |
Implements Omnipay\Common\GatewayInterface.
Reimplemented in Omnipay\PayPal\RestGateway, Omnipay\PayPal\RestGateway, Omnipay\PayPal\ProGateway, Omnipay\PayPal\ProGateway, Omnipay\PayPal\ExpressGateway, and Omnipay\PayPal\ExpressGateway.
Definition at line 117 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::getDefaultParameters | ( | ) |
Implements Omnipay\Common\GatewayInterface.
Reimplemented in Omnipay\PayPal\RestGateway, Omnipay\PayPal\RestGateway, Omnipay\PayPal\ProGateway, Omnipay\PayPal\ProGateway, Omnipay\PayPal\ExpressGateway, and Omnipay\PayPal\ExpressGateway.
Definition at line 121 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\Common\AbstractGateway\initialize().
Omnipay\Common\AbstractGateway::getParameter | ( | $key | ) |
string | $key |
Definition at line 126 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\traitGetParameter.
Omnipay\Common\AbstractGateway::getParameter | ( | $key | ) |
string | $key |
Definition at line 138 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\PayPal\ExpressGateway\getBorderColor(), Omnipay\PayPal\ExpressGateway\getBrandName(), Omnipay\PayPal\RestGateway\getClientId(), Omnipay\Common\AbstractGateway\getCurrency(), Omnipay\PayPal\ExpressGateway\getHeaderImageUrl(), Omnipay\PayPal\ExpressGateway\getLandingPage(), Omnipay\PayPal\ExpressGateway\getLogoImageUrl(), Omnipay\PayPal\ProGateway\getPassword(), Omnipay\PayPal\RestGateway\getSecret(), Omnipay\PayPal\ExpressGateway\getSellerPaypalAccountId(), Omnipay\PayPal\ProGateway\getSignature(), Omnipay\PayPal\ExpressGateway\getSolutionType(), Omnipay\Common\AbstractGateway\getTestMode(), Omnipay\PayPal\RestGateway\getToken(), Omnipay\PayPal\RestGateway\getTokenExpires(), Omnipay\PayPal\ProGateway\getUsername(), and Omnipay\PayPal\RestGateway\hasToken().
Omnipay\Common\AbstractGateway::getParameters | ( | ) |
Implements Omnipay\Common\GatewayInterface.
Definition at line 129 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\Common\AbstractGateway\createRequest().
Omnipay\Common\AbstractGateway::getShortName | ( | ) |
Get the short name of the Gateway
Implements Omnipay\Common\GatewayInterface.
Definition at line 85 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\Helper\getGatewayShortName().
Omnipay\Common\AbstractGateway::getShortName | ( | ) |
Get the short name of the Gateway
Implements Omnipay\Common\GatewayInterface.
Definition at line 89 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\Helper\getGatewayShortName().
Omnipay\Common\AbstractGateway::getTestMode | ( | ) |
Definition at line 144 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\getParameter().
Omnipay\Common\AbstractGateway::getTestMode | ( | ) |
Definition at line 158 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\getParameter().
Omnipay\Common\AbstractGateway::initialize | ( | array | $parameters = array() | ) |
Initialize this gateway with default parameters
array | $parameters |
Implements Omnipay\Common\GatewayInterface.
Definition at line 96 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\$parameters, Omnipay\Common\AbstractGateway\getDefaultParameters(), Omnipay\Common\Helper\initialize(), and Symfony\Component\HttpFoundation\ParameterBag\set().
Omnipay\Common\AbstractGateway::initialize | ( | array | $parameters = array() | ) |
Initialize this gateway with default parameters
array | $parameters |
Implements Omnipay\Common\GatewayInterface.
Definition at line 100 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\$parameters, Omnipay\Common\AbstractGateway\getDefaultParameters(), Omnipay\Common\Helper\initialize(), and Symfony\Component\HttpFoundation\ParameterBag\set().
Referenced by Omnipay\Common\AbstractGateway\__construct().
Omnipay\Common\AbstractGateway::setCurrency | ( | $value | ) |
string | $value |
Definition at line 170 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\setParameter().
Omnipay\Common\AbstractGateway::setCurrency | ( | $value | ) |
string | $value |
Definition at line 184 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\setParameter().
Omnipay\Common\AbstractGateway::setParameter | ( | $key, | |
$value | |||
) |
string | $key | |
mixed | $value |
Definition at line 136 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::setParameter | ( | $key, | |
$value | |||
) |
string | $key | |
mixed | $value |
Definition at line 148 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\PayPal\ExpressGateway\setBorderColor(), Omnipay\PayPal\ExpressGateway\setBrandName(), Omnipay\PayPal\RestGateway\setClientId(), Omnipay\Common\AbstractGateway\setCurrency(), Omnipay\PayPal\ExpressGateway\setHeaderImageUrl(), Omnipay\PayPal\ExpressGateway\setLandingPage(), Omnipay\PayPal\ExpressGateway\setLogoImageUrl(), Omnipay\PayPal\ProGateway\setPassword(), Omnipay\PayPal\RestGateway\setSecret(), Omnipay\PayPal\ExpressGateway\setSellerPaypalAccountId(), Omnipay\PayPal\ProGateway\setSignature(), Omnipay\PayPal\ExpressGateway\setSolutionType(), Omnipay\Common\AbstractGateway\setTestMode(), Omnipay\PayPal\RestGateway\setToken(), Omnipay\PayPal\RestGateway\setTokenExpires(), and Omnipay\PayPal\ProGateway\setUsername().
Omnipay\Common\AbstractGateway::setTestMode | ( | $value | ) |
boolean | $value |
Definition at line 153 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\setParameter().
Omnipay\Common\AbstractGateway::setTestMode | ( | $value | ) |
boolean | $value |
Definition at line 167 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
References Omnipay\Common\AbstractGateway\setParameter().
Omnipay\Common\AbstractGateway::supportsAcceptNotification | ( | ) |
Supports AcceptNotification
Definition at line 260 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsAcceptNotification | ( | ) |
Supports AcceptNotification
Definition at line 264 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsAuthorize | ( | ) |
Supports Authorize
Definition at line 180 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsAuthorize | ( | ) |
Supports Authorize
Definition at line 194 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCapture | ( | ) |
Supports Capture
Definition at line 200 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCapture | ( | ) |
Supports Capture
Definition at line 214 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCompleteAuthorize | ( | ) |
Supports Complete Authorize
Definition at line 190 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCompleteAuthorize | ( | ) |
Supports Complete Authorize
Definition at line 204 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCompletePurchase | ( | ) |
Supports Complete Purchase
Definition at line 220 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCompletePurchase | ( | ) |
Supports Complete Purchase
Definition at line 234 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCreateCard | ( | ) |
Supports CreateCard
Definition at line 270 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsCreateCard | ( | ) |
Supports CreateCard
Definition at line 274 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsDeleteCard | ( | ) |
Supports DeleteCard
Definition at line 280 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsDeleteCard | ( | ) |
Supports DeleteCard
Definition at line 284 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsFetchTransaction | ( | ) |
Supports Fetch Transaction
Definition at line 230 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsPurchase | ( | ) |
Supports Purchase
Definition at line 210 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsPurchase | ( | ) |
Supports Purchase
Definition at line 224 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsRefund | ( | ) |
Supports Refund
Definition at line 240 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsRefund | ( | ) |
Supports Refund
Definition at line 244 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsUpdateCard | ( | ) |
Supports UpdateCard
Definition at line 290 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsUpdateCard | ( | ) |
Supports UpdateCard
Definition at line 294 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsVoid | ( | ) |
Supports Void
Definition at line 250 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Omnipay\Common\AbstractGateway::supportsVoid | ( | ) |
Supports Void
Definition at line 254 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
|
protected |
Definition at line 61 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\Common\AbstractGateway\__construct(), and Omnipay\Common\AbstractGatewayTest_MockAbstractGateway\getProtectedHttpClient().
|
protected |
Definition at line 69 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\Common\AbstractGateway\__construct(), and Omnipay\Common\AbstractGatewayTest_MockAbstractGateway\getProtectedHttpRequest().
|
protected |
Definition at line 53 of file lib/vendor/omnipay/common/src/Omnipay/Common/AbstractGateway.php.
Referenced by Omnipay\PayPal\ExpressInContextGateway\authorize(), Omnipay\PayPal\ProGateway\authorize(), Omnipay\PayPal\ExpressGateway\authorize(), Omnipay\PayPal\RestGateway\authorize(), Omnipay\Common\AbstractGatewayTest_MockAbstractGateway\callCreateRequest(), Omnipay\PayPal\RestGateway\cancelSubscription(), Omnipay\PayPal\ProGateway\capture(), Omnipay\PayPal\RestGateway\capture(), Omnipay\PayPal\ExpressGateway\completeAuthorize(), Omnipay\PayPal\ExpressGateway\completeOrder(), Omnipay\PayPal\ExpressGateway\completePurchase(), Omnipay\PayPal\RestGateway\completePurchase(), Omnipay\PayPal\RestGateway\completeSubscription(), Omnipay\PayPal\RestGateway\createCard(), Omnipay\PayPal\RestGateway\createPlan(), Omnipay\PayPal\RestGateway\createRequest(), Omnipay\PayPal\RestGateway\createSubscription(), Omnipay\PayPal\RestGateway\deleteCard(), Omnipay\PayPal\ExpressGateway\fetchCheckout(), Omnipay\PayPal\RestGateway\fetchPurchase(), Omnipay\PayPal\ProGateway\fetchTransaction(), Omnipay\PayPal\RestGateway\fetchTransaction(), Omnipay\Common\AbstractGateway\initialize(), Omnipay\PayPal\RestGateway\listPlan(), Omnipay\PayPal\RestGateway\listPurchase(), Omnipay\PayPal\ExpressInContextGateway\order(), Omnipay\PayPal\ExpressGateway\order(), Omnipay\PayPal\ProGateway\purchase(), Omnipay\PayPal\ExpressGateway\purchase(), Omnipay\PayPal\RestGateway\purchase(), Omnipay\PayPal\RestGateway\reactivateSubscription(), Omnipay\PayPal\ProGateway\refund(), Omnipay\PayPal\RestGateway\refund(), Omnipay\PayPal\RestGateway\refundCapture(), Omnipay\PayPal\RestGateway\searchTransaction(), Omnipay\PayPal\RestGateway\suspendSubscription(), Omnipay\PayPal\ExpressGateway\transactionSearch(), Omnipay\PayPal\RestGateway\updatePlan(), Omnipay\PayPal\ExpressGateway\void(), and Omnipay\PayPal\RestGateway\void().
getParameter as Omnipay\Common\AbstractGateway::traitGetParameter |
Definition at line 48 of file vendor/omnipay/common/src/Common/AbstractGateway.php.
Referenced by Omnipay\Common\AbstractGateway\getParameter().