Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Niels Tholenaar
committed
Feb 17, 2016
1 parent
d39f65b
commit b878cd3
Showing
55 changed files
with
3,330 additions
and
756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,157 +1,19 @@ | ||
<?php namespace Omnipay\MultiSafepay; | ||
<?php | ||
/** | ||
* MultiSafepay XML Api Gateway. | ||
*/ | ||
|
||
use Omnipay\Common\AbstractGateway; | ||
namespace Omnipay\MultiSafepay; | ||
|
||
/** | ||
* MultiSafepay gateway. | ||
* MultiSafepay XML Api gateway. | ||
* | ||
* @link https://www.multisafepay.com/documentation/doc/API-Reference/ | ||
* @deprecated This API is deprecated and will be removed in | ||
* an upcoming version of this package. Please switch to the Rest API. | ||
* | ||
* @link https://www.multisafepay.com/downloads/handleidingen/Handleiding_connect(ENG).pdf | ||
*/ | ||
class Gateway extends AbstractGateway | ||
class Gateway extends XmlGateway | ||
{ | ||
public function getName() | ||
{ | ||
return 'MultiSafepay'; | ||
} | ||
|
||
/** | ||
* Get the gateway parameters | ||
* | ||
* @return array | ||
*/ | ||
public function getDefaultParameters() | ||
{ | ||
return array( | ||
'apiKey' => '', | ||
'locale' => 'en', | ||
'testMode' => false, | ||
); | ||
} | ||
|
||
/** | ||
* Get the locale. | ||
* | ||
* Optional ISO 639-1 language code which is used to specify a | ||
* a language used to display gateway information and other | ||
* messages in the responses. | ||
* | ||
* The default language is English. | ||
* | ||
* @return string | ||
*/ | ||
public function getLocale() | ||
{ | ||
return $this->getParameter('locale'); | ||
} | ||
|
||
/** | ||
* Set the locale. | ||
* | ||
* Optional ISO 639-1 language code which is used to specify a | ||
* a language used to display gateway information and other | ||
* messages in the responses. | ||
* | ||
* The default language is English. | ||
* | ||
* @param $value | ||
* @return \Omnipay\Common\Message\AbstractRequest | ||
*/ | ||
public function setLocale($value) | ||
{ | ||
return $this->setParameter('locale', $value); | ||
} | ||
|
||
/** | ||
* Get the gateway API Key | ||
* | ||
* Authentication is by means of a single secret API key set as | ||
* the apiKey parameter when creating the gateway object. | ||
* | ||
* @return string | ||
*/ | ||
public function getApiKey() | ||
{ | ||
return $this->getParameter('apiKey'); | ||
} | ||
|
||
/** | ||
* Set the gateway API Key | ||
* | ||
* Authentication is by means of a single secret API key set as | ||
* the apiKey parameter when creating the gateway object. | ||
* | ||
* @param string $value | ||
* @return Gateway provides a fluent interface. | ||
*/ | ||
public function setApiKey($value) | ||
{ | ||
return $this->setParameter('apiKey', $value); | ||
} | ||
|
||
/** | ||
* Retrieve payment methods active on the given MultiSafepay | ||
* account. | ||
* | ||
* @param array $parameters | ||
* | ||
* @return \Omnipay\MultiSafepay\Message\FetchPaymentMethodsRequest | ||
*/ | ||
public function fetchPaymentMethods(array $parameters = array()) | ||
{ | ||
return $this->createRequest('Omnipay\MultiSafepay\Message\FetchPaymentMethodsRequest', $parameters); | ||
} | ||
|
||
/** | ||
* Retrieve issuers for gateway. | ||
* | ||
* @param array $parameters | ||
* | ||
* @return \Omnipay\MultiSafepay\Message\FetchIssuersRequest | ||
*/ | ||
public function fetchIssuers(array $parameters = array()) | ||
{ | ||
return $this->createRequest('Omnipay\MultiSafepay\Message\FetchIssuersRequest', $parameters); | ||
} | ||
|
||
/** | ||
* Retrieve transaction by the given identifier. | ||
* | ||
* @param array $parameters | ||
* @return \Omnipay\Common\Message\AbstractRequest | ||
*/ | ||
public function fetchTransaction(array $parameters = array()) | ||
{ | ||
return $this->createRequest('Omnipay\MultiSafepay\Message\FetchTransactionRequest', $parameters); | ||
} | ||
|
||
/** | ||
* Create a refund. | ||
* | ||
* @param array $parameters | ||
* @return \Omnipay\Common\Message\AbstractRequest | ||
*/ | ||
public function refund(array $parameters = array()) | ||
{ | ||
return $this->createRequest('Omnipay\MultiSafepay\Message\RefundRequest', $parameters); | ||
} | ||
|
||
/** | ||
* @param array $parameters | ||
* | ||
* @return \Omnipay\MultiSafepay\Message\PurchaseRequest | ||
*/ | ||
public function purchase(array $parameters = array()) | ||
{ | ||
return $this->createRequest('Omnipay\MultiSafepay\Message\PurchaseRequest', $parameters); | ||
} | ||
|
||
/** | ||
* @param array $parameters | ||
* | ||
* @return \Omnipay\MultiSafepay\Message\CompletePurchaseRequest | ||
*/ | ||
public function completePurchase(array $parameters = array()) | ||
{ | ||
return $this->createRequest('Omnipay\MultiSafepay\Message\CompletePurchaseRequest', $parameters); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.