-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from academe/issue112
Issue112 - Support Sage Pay Form
- Loading branch information
Showing
18 changed files
with
1,222 additions
and
93 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Omnipay\SagePay; | ||
|
||
use Omnipay\Common\AbstractGateway as OmnipayAbstractGateway; | ||
use Omnipay\SagePay\Traits\GatewayParamsTrait; | ||
|
||
abstract class AbstractGateway extends OmnipayAbstractGateway implements ConstantsInterface | ||
{ | ||
use GatewayParamsTrait; | ||
|
||
/** | ||
* Examples for language: EN, DE and FR. | ||
* Also supports a locale format. | ||
*/ | ||
public function getDefaultParameters() | ||
{ | ||
return [ | ||
'vendor' => null, | ||
'testMode' => false, | ||
'referrerId' => null, | ||
'language' => null, | ||
'useOldBasketFormat' => false, | ||
'exitOnResponse' => false, | ||
'apply3DSecure' => null, | ||
'useAuthenticate' => null, | ||
'accountType' => null, | ||
]; | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace Omnipay\SagePay; | ||
|
||
use Omnipay\SagePay\Message\Form\AuthorizeRequest; | ||
use Omnipay\SagePay\Message\Form\CompleteAuthorizeRequest; | ||
use Omnipay\SagePay\Message\Form\CompletePurchaseRequest; | ||
use Omnipay\SagePay\Message\Form\PurchaseRequest; | ||
|
||
/** | ||
* Sage Pay Server Gateway | ||
*/ | ||
class FormGateway extends AbstractGateway | ||
{ | ||
public function getName() | ||
{ | ||
return 'Sage Pay Form'; | ||
} | ||
|
||
/** | ||
* Authorize a payment. | ||
*/ | ||
public function authorize(array $parameters = array()) | ||
{ | ||
return $this->createRequest(AuthorizeRequest::class, $parameters); | ||
} | ||
|
||
/** | ||
* Authorize and capture a payment. | ||
*/ | ||
public function purchase(array $parameters = array()) | ||
{ | ||
return $this->createRequest(PurchaseRequest::class, $parameters); | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
public function completeAuthorize(array $parameters = array()) | ||
{ | ||
return $this->createRequest(CompleteAuthorizeRequest::class, $parameters); | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
public function completePurchase(array $parameters = array()) | ||
{ | ||
return $this->createRequest(CompletePurchaseRequest::class, $parameters); | ||
} | ||
} |
Oops, something went wrong.