-
Notifications
You must be signed in to change notification settings - Fork 91
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 #34 from anushr/xml-api
Migrate to XML API for AIM + CIM support
- Loading branch information
Showing
84 changed files
with
3,377 additions
and
327 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
composer.lock | ||
composer.phar | ||
phpunit.xml | ||
.idea |
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
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,73 @@ | ||
<?php | ||
|
||
namespace Omnipay\AuthorizeNet; | ||
|
||
use Omnipay\AuthorizeNet\Message\CIMCreateCardRequest; | ||
|
||
/** | ||
* Authorize.Net CIM Class | ||
*/ | ||
class CIMGateway extends AIMGateway | ||
{ | ||
public function getName() | ||
{ | ||
return 'Authorize.Net CIM'; | ||
} | ||
|
||
public function setForceCardUpdate($forceCardUpdate) | ||
{ | ||
return $this->setParameter('forceCardUpdate', $forceCardUpdate); | ||
} | ||
|
||
public function getForceCardUpdate() | ||
{ | ||
return $this->getParameter('forceCardUpdate'); | ||
} | ||
|
||
public function setDefaultBillTo($defaultBillTo) | ||
{ | ||
return $this->setParameter('defaultBillTo', $defaultBillTo); | ||
} | ||
|
||
public function getDefaultBillTo() | ||
{ | ||
return $this->getParameter('defaultBillTo'); | ||
} | ||
|
||
/** | ||
* Create a new debit or credit card | ||
* | ||
* @param array $parameters | ||
* | ||
* @return CIMCreateCardRequest | ||
*/ | ||
public function createCard(array $parameters = array()) | ||
{ | ||
return $this->createRequest('\Omnipay\AuthorizeNet\Message\CIMCreateCardRequest', $parameters); | ||
} | ||
|
||
public function authorize(array $parameters = array()) | ||
{ | ||
return $this->createRequest('\Omnipay\AuthorizeNet\Message\CIMAuthorizeRequest', $parameters); | ||
} | ||
|
||
public function capture(array $parameters = array()) | ||
{ | ||
return $this->createRequest('\Omnipay\AuthorizeNet\Message\CIMCaptureRequest', $parameters); | ||
} | ||
|
||
public function purchase(array $parameters = array()) | ||
{ | ||
return $this->createRequest('\Omnipay\AuthorizeNet\Message\CIMPurchaseRequest', $parameters); | ||
} | ||
|
||
public function refund(array $parameters = array()) | ||
{ | ||
return $this->createRequest('\Omnipay\AuthorizeNet\Message\CIMRefundRequest', $parameters); | ||
} | ||
|
||
public function void(array $parameters = array()) | ||
{ | ||
return $this->createRequest('\Omnipay\AuthorizeNet\Message\CIMVoidRequest', $parameters); | ||
} | ||
} |
Oops, something went wrong.