Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

Commit

Permalink
Added more robust documentation for each request to include a list of…
Browse files Browse the repository at this point in the history
… the required parameters and removed some unnecessary code.
  • Loading branch information
Derek Caswell committed Feb 17, 2017
1 parent 60216d1 commit a66a3b1
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This package implements the following methods:
* ``updateCard($options)`` – update a stored card's expiry or customer reference.

For general usage instructions, please see the [Omnipay documentation](http://omnipay.thephpleague.com/).
For information on the parameters needed for each request, see the class documentation for that request in the Message folder.

### Basic Example

Expand Down
1 change: 0 additions & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Omnipay\FirstAtlanticCommerce;

use Omnipay\Common\AbstractGateway;
use Omnipay\FirstAtlanticCommerce\ParameterTrait;

/**
* First Atlantic Commerce Payment Gateway 2 (XML POST Service)
Expand Down
9 changes: 9 additions & 0 deletions src/Message/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

/**
* FACPG2 Authorize Request
*
* Required Parameters:
* amount - Float ex. "10.00",
* currency - Currency code ex. "USD",
* card - Instantiation of Omnipay\FirstAtlanticCommerce\CreditCard
*
* There are also 2 optional boolean parameters outside of the normal Omnipay parameters:
* requireAVSCheck - will tell FAC that we want the to verify the address through AVS
* createCard - will tell FAC to create a tokenized card in their system while it is authorizing the transaction
*/
class AuthorizeRequest extends AbstractRequest
{
Expand Down
4 changes: 4 additions & 0 deletions src/Message/CaptureRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

/**
* FACPG2 Capture Request
*
* Required Parameters:
* transactionId - Corresponds to the merchant's transaction ID
* amount - eg. "10.00"
*/
class CaptureRequest extends AbstractTransactionModificationRequest
{
Expand Down
6 changes: 5 additions & 1 deletion src/Message/CreateCardRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

namespace Omnipay\FirstAtlanticCommerce\Message;

use Omnipay\FirstAtlanticCommerce\Message\AbstractRequest;

/**
* FACPG2 Tokenize Request
*
* Required Parameters:
* customerReference - name of the customer using the card
* card - Instantiation of Omnipay\FirstAtlanticCommerce\CreditCard()
*
*/
class CreateCardRequest extends AbstractRequest
{
Expand Down
12 changes: 10 additions & 2 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

namespace Omnipay\FirstAtlanticCommerce\Message;

use Omnipay\FirstAtlanticCommerce\Message\AuthorizeRequest;

/**
* FACPG2 Purchase Request
*
* Required Parameters:
* amount - Float ex. "10.00",
* currency - Currency code ex. "USD",
* card - Instantiation of Omnipay\FirstAtlanticCommerce\CreditCard
*
* There are also 2 optional boolean parameters outside of the normal Omnipay parameters:
* requireAVSCheck - will tell FAC that we want the to verify the address through AVS
* createCard - will tell FAC to create a tokenized card in their system while it is authorizing the transaction
*/

class PurchaseRequest extends AuthorizeRequest
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Message/RefundRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

/**
* FACPG2 Refund Request
*
* Required Parameters:
* transactionId - Corresponds to the merchant's transaction ID
* amount - eg. "10.00"
*/
class RefundRequest extends AbstractTransactionModificationRequest
{
Expand Down
5 changes: 3 additions & 2 deletions src/Message/StatusRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

namespace Omnipay\FirstAtlanticCommerce\Message;

use Omnipay\FirstAtlanticCommerce\Message\AbstractRequest;

/**
* FACPG2 Transaction Status Request
*
* Required parameters:
* transactionId - corresponds to the merchant's transaction ID
*/
class StatusRequest extends AbstractRequest
{
Expand Down
5 changes: 5 additions & 0 deletions src/Message/UpdateCardRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

/**
* FACPG2 Update Token Request
*
* Required Parameters:
* customerReference - The name of the customer
* cardReference - This is the token created by FAC for the card being updated
* card - Instantiation of the Omnipay\FirstAtlanticCommerce\CreditCard class
*/
class UpdateCardRequest extends AbstractRequest
{
Expand Down
4 changes: 4 additions & 0 deletions src/Message/VoidRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

/**
* FACPG2 Reversal Request
*
* Required Parameters:
* transactionId - Corresponds to the merchant's transaction ID
* amount - eg. "10.00"
*/
class VoidRequest extends AbstractTransactionModificationRequest
{
Expand Down
1 change: 0 additions & 1 deletion tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,5 @@ public function testAuthorizeWithCreateCard()

$this->assertTrue($authorizeResponse->isSuccessful());
$this->assertNotEmpty($authorizeResponse->getCardReference());
echo $authorizeResponse->getCardReference();
}
}

0 comments on commit a66a3b1

Please sign in to comment.