Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the XML API for AIM gateway #6

Closed
wants to merge 72 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
d584200
Completely separated AIM and SIM classes. Updated AIM to use the new …
anush Aug 2, 2014
7c7578b
AIM request classes construct XML requests
anush Aug 2, 2014
f055372
PSR-2 formatting
anush Aug 2, 2014
69fe39d
Removed missed dependencies between AIM and SIM
anush Aug 2, 2014
69eb1c4
Added functional tests
anush Aug 2, 2014
426bc3f
Update AuthorizeNet_AIM to support refunds
rushi Aug 13, 2014
47f47be
Add tests for success and failure responses in AIMGatewayTest
rushi Aug 13, 2014
9f078db
Remove support for description attribute. This is because description…
rushi Aug 13, 2014
e17f7a7
Decouple SIMGateway from AIMGateway
rushi Aug 13, 2014
00d0f8e
Code formatting
anush Aug 14, 2014
881d9d4
Code formatting
anush Aug 14, 2014
c121250
Do not validate credit card for Refund transactions because it is not…
rushi Aug 18, 2014
2e39772
Merge pull request #2 from rushi/master
rushi Aug 18, 2014
4426ff1
CC last 4 to string
rushi Aug 18, 2014
7c2b2c0
CC last 4 to string
rushi Aug 18, 2014
0f5f96d
Create card implemented with integration test for Authorize.net CIM
kotrakrishna Sep 16, 2014
d1b6501
Abstract out common method for CIM requests
kotrakrishna Sep 17, 2014
f7abefc
Implement all transactions in CIM Gateway
kotrakrishna Sep 17, 2014
9d43913
Add unit tests using mocks. CIM response also checks and parses Error…
kotrakrishna Sep 18, 2014
6ad83f6
Clean up logging used during development
kotrakrishna Sep 18, 2014
58e4de3
Use Developer mode rather than test mode for setting the dev context …
kotrakrishna Sep 18, 2014
de9ef97
Use customer shipping address id only if present while making a tran…
kotrakrishna Sep 18, 2014
87e594d
If create card fails due to duplicate profile error, then create a pa…
kotrakrishna Sep 19, 2014
b076d75
Unit test using mocks for get profile, update payment profile
kotrakrishna Sep 22, 2014
9967d32
Add forceCardUpdate parameter to createCard.
kotrakrishna Sep 23, 2014
d697e2f
Create card will always return customer profile as response. Card ref…
kotrakrishna Sep 23, 2014
c7022a5
Create card always returns response of a perticular payment profile
kotrakrishna Sep 23, 2014
d398f93
Response is always an array. Create card response is augmented with f…
kotrakrishna Sep 26, 2014
808e673
Add expiry month and expiry year to the CIM create card response.
kotrakrishna Sep 26, 2014
5084452
Merge pull request #1 from kotrakrishna/master
rushi Nov 13, 2014
5efb7c2
Cleanup code, fix failing unit tests
rushi Nov 13, 2014
c6b1e3f
Move dependencies into require-dev
rushi Nov 13, 2014
a95b5ca
Fix xml2array and issues that arise because of it.
rushi Nov 14, 2014
169edbd
Do not format the amount as it voids the XML schema.
rushi Nov 14, 2014
e9e0c44
Fix duplicate payment profile handling
rushi Nov 17, 2014
81343c3
Update unit tests
rushi Nov 17, 2014
36d7c3a
Remove dev dependencies that are no longer required
rushi Nov 19, 2014
a57d213
Merge pull request #4 from rushi/master
juzerali Nov 25, 2014
e1e590c
Fix PSR-2 issues
rushi Nov 27, 2014
e8e986e
Update README.md to include mention of AuthorizeNet_CIM
rushi Nov 27, 2014
6ca8e75
Add ability to specify custom 'billTo' information
rushi Jan 28, 2015
9a227cc
Change populateBillTo to defaultBillTo. Set flags at a gateway level
rushi Jan 28, 2015
d4ff08b
Merge pull request #5 from rushi/master
anush Jan 28, 2015
1287a3f
Merge remote-tracking branch 'origin/master'
anush Mar 22, 2015
8fb8087
PHP 5.3 compatible array style
anush Mar 22, 2015
cf540fa
PHP 5.3 compatible array style
anush Mar 22, 2015
16140f8
Merge branch 'master' of github.com:thephpleague/omnipay-authorizenet
anush Aug 20, 2015
70e6c9c
XOL-2533 Adding extraOptions payload to request XML
sachinsudheendra Aug 27, 2015
87a39f0
XOL-2533 Parameterizing x_duplicate_window value and using it across …
sachinsudheendra Aug 28, 2015
6bfdef7
XOL-2533 Using the value of the parameter passed in for x_duplicate_w…
sachinsudheendra Sep 10, 2015
9344b3e
Merge pull request #7 from sachinsudheendra/XOL-2533
rushi Sep 10, 2015
9af958e
Fix CodeSniffer issue. Line should be <= 120 chars
rushi Feb 23, 2016
131d7cf
Fix test that failed due to change in SIMGateway's parent
rushi Feb 23, 2016
44e7a06
SIMGateway should inherit AIMGateway
rushi Feb 23, 2016
84b2c3f
Make CVV optional
anush Feb 29, 2016
90329a3
Merge pull request #9 from rushi/fix_codesniffer
anush Feb 29, 2016
6f24297
Merge branch 'master' of github.com:xola/authorizenet into optional-cvv
anush Feb 29, 2016
a0de700
Fix codesniffer and namespace issues
rushi Mar 1, 2016
35fc3a7
Do not validate card if no cvv provided
anush Mar 1, 2016
68d4382
CS-137 Look for duplicate payment profiles even if you reach maximum …
rushi Mar 2, 2016
4d5c93a
CS-137 Use PHP 5.3 array() syntax so tests pass
rushi Mar 2, 2016
d1e7f10
CS-137 Add tests for verification of duplicate payment profile logic
rushi Mar 2, 2016
10442c6
CS-137 Set constants for the profile response codes
rushi Mar 2, 2016
d9d1156
Merge pull request #11 from rushi/CS-137
anush Mar 2, 2016
0d5b940
XOL-2788 Ability to void a transaction and auto-void if refund fails
rushi Mar 3, 2016
b6edd12
XOL-2788 Fix transactionReference bug
rushi Mar 3, 2016
599386e
XOL-2788 Fix array syntax for PHP 5.3 compatibility
rushi Mar 3, 2016
2b5ad5e
Merge branch 'master' of github.com:xola/authorizenet into optional-cvv
rushi Mar 3, 2016
adfd19b
Merge pull request #10 from anushr/optional-cvv
rushi Mar 3, 2016
f9f1397
XOL-2788 Update test name
rushi Mar 3, 2016
c7d9a71
XOL-2788 Address code review comment
rushi Mar 3, 2016
f4fc378
Merge pull request #12 from rushi/XOL-2788
anush Mar 4, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Abstract out common method for CIM requests
  • Loading branch information
kotrakrishna committed Sep 17, 2014
commit d1b65010f09ba77ef5b2b9dc0a4695a32b98628f
21 changes: 20 additions & 1 deletion src/Message/CIMAbstractRequest.php
Original file line number Diff line number Diff line change
@@ -2,13 +2,16 @@

namespace Omnipay\AuthorizeNet\Message;

use Omnipay\Common\Exception\InvalidRequestException;

/**
* Authorize.Net CIM Abstract Request
*/
abstract class CIMAbstractRequest extends AIMAbstractRequest
{
// Need the below setters and getters for accessing this data within createCardRequest.send
private $xmlRootElement = 'createCustomerProfileRequest';

// Need the below setters and getters for accessing this data within createCardRequest.send
public function setEmail($value)
{
return $this->setParameter('email', $value);
@@ -28,4 +31,20 @@ public function getName()
{
return $this->getParameter('name');
}

/**
* @throws InvalidRequestException
* @return mixed|\SimpleXMLElement
*/
public function getBaseData()
{
$data = new \SimpleXMLElement("<" . $this->xmlRootElement . "/>");
$data->addAttribute('xmlns', 'AnetApi/xml/v1/schema/AnetApiSchema.xsd');

// Credentials
$data->merchantAuthentication->name = $this->getApiLoginId();
$data->merchantAuthentication->transactionKey = $this->getTransactionKey();

return $data;
}
}
17 changes: 0 additions & 17 deletions src/Message/CIMCreateCardRequest.php
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
namespace Omnipay\AuthorizeNet\Message;

use Omnipay\Common\CreditCard;
use Omnipay\Common\Exception\InvalidRequestException;

/**
* Create Credit Card Request.
@@ -27,22 +26,6 @@ public function getData()
return $data;
}

/**
* @throws InvalidRequestException
* @return mixed|\SimpleXMLElement
*/
public function getBaseData()
{
$data = new \SimpleXMLElement('<createCustomerProfileRequest/>');
$data->addAttribute('xmlns', 'AnetApi/xml/v1/schema/AnetApiSchema.xsd');

// Credentials
$data->merchantAuthentication->name = $this->getApiLoginId();
$data->merchantAuthentication->transactionKey = $this->getTransactionKey();

return $data;
}

/**
* Adds billing data to a partially filled request data object.
*