diff --git a/README.md b/README.md index 8c9114c..d4ef07e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/Gateway.php b/src/Gateway.php index 1ffa163..51e090e 100644 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -3,7 +3,6 @@ namespace Omnipay\FirstAtlanticCommerce; use Omnipay\Common\AbstractGateway; -use Omnipay\FirstAtlanticCommerce\ParameterTrait; /** * First Atlantic Commerce Payment Gateway 2 (XML POST Service) diff --git a/src/Message/AuthorizeRequest.php b/src/Message/AuthorizeRequest.php index ea072ea..1ea3bb6 100644 --- a/src/Message/AuthorizeRequest.php +++ b/src/Message/AuthorizeRequest.php @@ -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 { diff --git a/src/Message/CaptureRequest.php b/src/Message/CaptureRequest.php index a72523e..3564e6b 100644 --- a/src/Message/CaptureRequest.php +++ b/src/Message/CaptureRequest.php @@ -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 { diff --git a/src/Message/CreateCardRequest.php b/src/Message/CreateCardRequest.php index e13c400..34dbc4c 100644 --- a/src/Message/CreateCardRequest.php +++ b/src/Message/CreateCardRequest.php @@ -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 { diff --git a/src/Message/PurchaseRequest.php b/src/Message/PurchaseRequest.php index 93e1595..45bafa0 100644 --- a/src/Message/PurchaseRequest.php +++ b/src/Message/PurchaseRequest.php @@ -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 { /** diff --git a/src/Message/RefundRequest.php b/src/Message/RefundRequest.php index 0eeb854..4ab06e7 100644 --- a/src/Message/RefundRequest.php +++ b/src/Message/RefundRequest.php @@ -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 { diff --git a/src/Message/StatusRequest.php b/src/Message/StatusRequest.php index 64b09c0..597b012 100644 --- a/src/Message/StatusRequest.php +++ b/src/Message/StatusRequest.php @@ -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 { diff --git a/src/Message/UpdateCardRequest.php b/src/Message/UpdateCardRequest.php index b96c0e8..32ba363 100644 --- a/src/Message/UpdateCardRequest.php +++ b/src/Message/UpdateCardRequest.php @@ -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 { diff --git a/src/Message/VoidRequest.php b/src/Message/VoidRequest.php index 90ed9ce..f9d8cfa 100644 --- a/src/Message/VoidRequest.php +++ b/src/Message/VoidRequest.php @@ -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 { diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php index 9a1efc1..4a5ca81 100644 --- a/tests/IntegrationTest.php +++ b/tests/IntegrationTest.php @@ -187,6 +187,5 @@ public function testAuthorizeWithCreateCard() $this->assertTrue($authorizeResponse->isSuccessful()); $this->assertNotEmpty($authorizeResponse->getCardReference()); - echo $authorizeResponse->getCardReference(); } } \ No newline at end of file