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

Update Bank Account Payment #1

Open
wants to merge 333 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
333 commits
Select commit Hold shift + click to select a range
7fa9d7e
Fix for BC break of returning messages when asking for codes
Jun 10, 2015
272b7b0
Issue #19 Main changes.
judgej Jul 5, 2015
152959c
Issue #19 Add getTransactionId() to SIMcompleteAuthorize.php for acce…
judgej Jul 5, 2015
56e1cec
Issue #22 and Issue #16 implementation
judgej Jul 7, 2015
4a4da57
Issue #16 Test for use of notifyUrl.
judgej Jul 7, 2015
1c6e4d6
Issue #16 Further test for DPM.
judgej Jul 7, 2015
21b39c6
Issue #22 test coverage, some fixes and simplification now much of DP…
judgej Jul 7, 2015
e2c25ff
Issue #22 Typo and additional comment.
judgej Jul 7, 2015
142a95f
Merge pull request #23 from judgej/issue_19
greydnls Jul 15, 2015
1aad9da
Update Endpoint
greydnls Jul 27, 2015
ccf3229
Merge pull request #26 from thephpleague/kayladnls-patch-1
greydnls Jul 27, 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
23fbedc
Include omnipay_transaction_id in hidden fields for the DPM form.
judgej 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
566cddd
[AIMRefund] Pass credit card expiration date only when an expiration …
mikealmond Feb 25, 2016
b24ebe8
AIMRefund fix PHP < 5.5 bugs
mikealmond Feb 25, 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
e54383a
[AIMRefundRequest] Add test when no credit card expiry dates are set
mikealmond Mar 7, 2016
391c1f3
Merge pull request #33 from mikealmond/patch-1
delatbabel Mar 10, 2016
e2e813b
Merge pull request #27 from academe/master
judgej Mar 10, 2016
dde369f
Merge pull request #15 from dstockto/acicali/master
delatbabel Mar 11, 2016
b4d3d09
Consolidate common functionality between AIM and CIM
anush Mar 12, 2016
c95d0fc
Merge branch 'master' of github.com:thephpleague/omnipay-authorizenet…
anush Mar 12, 2016
a5c0a92
Fix merge - make expiry optional for refund
anush Mar 12, 2016
9b1a225
Fixed code style failures
anush Mar 12, 2016
4458875
Merge branch 'master' into xml-api
anush Mar 12, 2016
8ace4bf
Fix duplicate window setting
anush Mar 14, 2016
cfe0227
Point to the origin omnipay-common
anush Mar 18, 2016
95f2899
Fix code style
anush Mar 18, 2016
39542c3
Peg to a proper omnipay-common version dependency
anush Mar 18, 2016
e35e615
Use correct endpoints form DPM and SIM
anush Apr 2, 2016
bd9523c
Merge pull request #34 from anushr/xml-api
judgej Apr 30, 2016
bcb4369
Issue 38 move order of billTo and customerIp elements in AIM authoris…
judgej May 28, 2016
184c5f3
Merge branch 'master' of github.com:thephpleague/omnipay-authorizenet…
judgej May 28, 2016
77729dc
Forgot to save file before last commit.
judgej May 28, 2016
45c85fc
Issue #38 new test to confirm order of transactionRequest elements.
judgej May 28, 2016
439bb6e
Merge pull request #39 from thephpleague/issue38
judgej Jun 16, 2016
a8cafa8
DeleteCustomerPaymentProfile Request
alberto1el Jul 2, 2016
2cf352e
Create CIMDeletePaymentProfileResponse.php
alberto1el Jul 2, 2016
b81954d
Create CIMDeletePaymentProfileRequest.php
alberto1el Jul 2, 2016
7512846
Update CIMDeletePaymentProfileRequest.php
alberto1el Jul 7, 2016
bfd7b84
Update CIMDeletePaymentProfileResponse.php
alberto1el Jul 7, 2016
d1efead
Update CIMGateway.php
alberto1el Jul 7, 2016
9f62df5
Update CIMGatewayIntegrationTest.php
alberto1el Jul 7, 2016
17d1a90
Update CIMDeletePaymentProfileResponse.php
alberto1el Jul 7, 2016
07e5af2
Fixed getShippingLastName() was being used to seed shipTo->firstName.
Jul 16, 2016
6e1990f
Merge pull request #46 from fenzig27/pr-invalid-shipping-firstname
judgej Jul 16, 2016
1a699aa
Merge pull request #45 from alberto1el/alberto1el-feature-deleteCusto…
delatbabel Aug 24, 2016
5863e57
Set phoneNumber billTo and phoneNumber shipTo on AIM requests.
mwisner Aug 30, 2016
c0b361d
Remove phoneNumber from shipTo
mwisner Aug 31, 2016
4cef58d
Merge pull request #47 from mwisner/master
judgej Sep 2, 2016
fd15aea
Update composer.json
VinceG Oct 13, 2016
d0b51eb
#50 - AIMResponse->getTransactionReference
vincentavn Oct 13, 2016
96358ab
#50 - AIMResponse->getTransactionReference
vincentavn Oct 13, 2016
bd0851d
Use new Akamai SureRoute endpoint for AIM and CIM
rherriman Oct 18, 2016
fa4fce2
fixed tests and added php 7.0 to travis yaml file
vincentavn Oct 19, 2016
564da01
Add description to AIM request and update related tests
balexander Oct 21, 2016
6501825
set customer email in AIMAbstractRequest
Nov 1, 2016
5369725
Small code tidy-up.
judgej Nov 9, 2016
497ea02
Added test for AIM XML customer email.
judgej Nov 9, 2016
587d5fa
Restored "createMock" back to deprecated "getMock". It worked for me,…
judgej Nov 9, 2016
ab9cac1
Merge pull request #63 from academe/pr60
judgej Nov 9, 2016
9259136
Merge branch 'Issue44-Descriptions_not_sent' of https://github.com/ba…
judgej Nov 9, 2016
ef36670
Change postion of the AIM "order" element in the request.
judgej Nov 10, 2016
e719a3a
Position of "order" in tests in relation to "customer".
judgej Nov 10, 2016
104290d
Merge pull request #64 from academe/pr57
judgej Nov 10, 2016
01c55f6
Merge branch 'issue42' of https://github.com/rherriman/omnipay-author…
judgej Nov 10, 2016
c05dad2
Merge pull request #54 from rherriman/issue42
judgej Nov 10, 2016
1a3cdb8
Issue 16: support invoiceNumber for both CIM and DPM.
judgej Nov 10, 2016
4f4c03c
Merge branch 'master' of github.com:thephpleague/omnipay-authorizenet…
judgej Nov 10, 2016
485b3f5
Issue #16 Test for correct setting of invoice number.
judgej Nov 10, 2016
5b5c9f0
Merge pull request #66 from academe/issue16
judgej Nov 10, 2016
3abad70
Merge branch 'expose-transaction-object' of https://github.com/avninc…
judgej Nov 10, 2016
7eb50e1
Merge pull request #52 from avninc/expose-transaction-object
judgej Nov 10, 2016
15a7025
Merge branch 'master' of github.com:thephpleague/omnipay-authorizenet
judgej Nov 10, 2016
6021309
Getting malformed guzzle URL
zmonteca Feb 5, 2017
7e61c15
Merge pull request #71 from academe/issue69
judgej Feb 5, 2017
645a25b
Revert "Issue69"
judgej Feb 5, 2017
db5c067
Merge pull request #72 from thephpleague/revert-71-issue69
judgej Feb 5, 2017
36c567c
Issue #69 Include invoiceNumber if supplied in CIM Authorize.
judgej Feb 5, 2017
2da3dfa
Merge pull request #73 from academe/issue69fix
judgej Feb 5, 2017
7f09e7e
Merge branch 'dev-my-bugfix' of https://github.com/zmonteca/omnipay-a…
judgej Feb 6, 2017
48eb3a7
Issue #40 Collect result code, reason code and reason message from th…
judgej Feb 6, 2017
b195c82
Issue #40 switch the "0" result code to "3" (error).
judgej Feb 6, 2017
2db9dd5
Issue #40 Test for AIM Authorize with invalid request data.
judgej Feb 6, 2017
3a06788
Merge pull request #74 from academe/issue40
judgej Feb 10, 2017
d22c493
Small tidy-up of a few scripts.
judgej Feb 21, 2017
f871149
Unit test for fetching error message
felixmaier1989 Mar 2, 2017
66d7b4a
Support for tokenized credit card (Accept.js)
felixmaier1989 Mar 2, 2017
a41d069
Support for tokenized credit card (Accept.js) - unit test
felixmaier1989 Mar 2, 2017
1676edd
Support for tokenized credit card (Accept.js) - PHP doc
felixmaier1989 Mar 2, 2017
e090a13
Do not take opaque data from $_GET
felixmaier1989 Mar 2, 2017
24763d9
Issue #41 Some simple notes on Accept.JS
judgej Mar 3, 2017
902287a
Add getters and setters for hashSecret, an optional authorization par…
eileenmcnaughton Mar 6, 2017
5b9fde9
Typo in readme
Mark-H Mar 7, 2017
229bdb2
Merge pull request #80 from Mark-H/patch-1
judgej Mar 7, 2017
90bceaf
Added solution id
hillelcoren Oct 3, 2017
2850353
Added solution id
hillelcoren Oct 3, 2017
ab2ff86
Add solution id
hillelcoren Oct 4, 2017
7211453
Add solution id
hillelcoren Oct 4, 2017
b36d3c1
Remove PHP5.3 from failing travis tests.
judgej Oct 4, 2017
906d5d2
Merge remote-tracking branch 'upstream/master'
hillelcoren Oct 4, 2017
a508b56
Merge pull request #87 from hillelcoren/master
judgej Oct 7, 2017
af76ebd
Test solutionId for PR #87
judgej Oct 7, 2017
235a0d5
Add PHP 7.1 to the automated tests.
judgej Oct 7, 2017
c1794cd
Merge pull request #88 from academe/master
judgej Oct 7, 2017
97862b7
Merge pull request #78 from eileenmcnaughton/hash_anet
judgej Oct 7, 2017
8216074
Test for PR #78 hashSecret set at AIM gateway level
judgej Oct 7, 2017
ff9dc9d
Extended PR #78 test to CIM gateway.
judgej Oct 7, 2017
30d1d1d
Add actions for querying Authorize.net.
eileenmcnaughton Mar 6, 2017
0388163
Add parent classes into query requests & responses, folderise #79
eileenmcnaughton Nov 6, 2017
2d0b1de
Merge pull request #79 from eileenmcnaughton/anet_query
judgej Nov 27, 2017
379574e
Fix autoloader fatal errors from class reorganization
MegaphoneJon Dec 19, 2017
59fa792
Merge pull request #92 from MegaphoneJon/master
barryvdh Dec 20, 2017
d091c9c
Add capture only tests
Jan 5, 2018
f589329
Add capture only request
Jan 5, 2018
0af67af
Update request based on discussion on issue-93
Jan 7, 2018
5db0086
Update tests
Jan 7, 2018
cea1634
Update capture only request field order
Jan 7, 2018
e755e26
Add capture only to aim gateway
Jan 7, 2018
38a4c4f
Correct spacing
Jan 7, 2018
ac173a1
Merge pull request #94 from samlitowitz/issue-93
judgej Jan 8, 2018
e7cefe2
Add getCVVCode
Jan 12, 2018
29d33aa
Add tests for getCVVCode
Jan 12, 2018
ea732d1
Add getAccountType
Jan 12, 2018
b1a1dda
Add tests for getAccountType
Jan 12, 2018
ecb7665
Reduce line length
Jan 12, 2018
dedf2e3
Merge pull request #100 from samlitowitz/issue-99
judgej Jan 13, 2018
f2f8481
Merge branch 'master' into issue-97
judgej Jan 13, 2018
99c332f
Merge branch 'master' into issue-97
judgej Jan 13, 2018
c2ed236
Merge pull request #98 from samlitowitz/issue-97
judgej Jan 13, 2018
4bb8e18
Add retail data to authOnlyTransactions and authCaptureTransactions
Jan 15, 2018
eb59611
Seperate retail into deviceType and marketType
Jan 16, 2018
898f7b0
Make array object
Jan 17, 2018
d56df20
Add error messages
Jan 17, 2018
5d0f9f6
Add test for retail values in AIMAuthorizeRequest
Jan 17, 2018
ac570da
Issue #105 fix.
judgej Jan 31, 2018
50a3bc2
Introduce PHP7.2 tests
judgej Jan 31, 2018
db39270
Merge branch 'master' of github.com:thephpleague/omnipay-authorizenet…
judgej Jan 31, 2018
0064e7c
Removed a var_dump that escaped.
judgej Jan 31, 2018
138fd48
Update to v3
barryvdh May 17, 2018
3aa8002
Better travisci
barryvdh May 17, 2018
0ffbd6c
Fix codestyle
barryvdh May 17, 2018
05ae4b2
Merge branch 'academe-issue105' into upgrade-v3
barryvdh May 17, 2018
4af9581
Merge pull request #106 from academe/issue105
barryvdh May 17, 2018
efe8ba9
Fix cs
barryvdh May 17, 2018
6d8f56a
Merge pull request #110 from thephpleague/upgrade-v3
barryvdh May 17, 2018
c8e03ff
Update README.md
barryvdh May 17, 2018
04de992
Update README.md
barryvdh May 17, 2018
2e9d853
CVV is optional
May 21, 2018
c109d81
Merge pull request #111 from robertology/cvv-optional
barryvdh May 21, 2018
b8bb904
Merge pull request #1 from thephpleague/master
alberto1el Dec 30, 2018
b66ea0d
Add opaqueData to createCard on CIM
alberto1el Dec 30, 2018
af657ce
Fix psr2 style errors
alberto1el Dec 30, 2018
fe3f20c
go back to previous getData order on CIMCreateCardRequest
alberto1el Dec 30, 2018
87d07ae
remove data variable not used on validateCard method
alberto1el Dec 30, 2018
989fedd
leave validate card which only validates the presence of the card param
alberto1el Dec 30, 2018
b6a881d
Issue #118 merge together "split lines" aka "line folding"
judgej Dec 30, 2018
9ce6b52
Merge pull request #119 from thephpleague/issue118
judgej Dec 30, 2018
c3efc21
Merge pull request #2 from thephpleague/master
alberto1el Dec 30, 2018
5276ada
Merge branch 'issue-101' of https://github.com/samlitowitz/omnipay-au…
judgej Dec 30, 2018
202c660
Move some mystery numbers to constants.
judgej Dec 31, 2018
a9738c3
Merge pull request #120 from thephpleague/issue101
judgej Dec 31, 2018
408773a
remove duplicated methods from extended AIMAbstractRequest
alberto1el Dec 31, 2018
55b6038
Add tests for CIM create card feature using Opaque Data
alberto1el Dec 31, 2018
5988948
adds example of opaque data on CIM createCard
alberto1el Dec 31, 2018
8c7ca9c
Merge pull request #117 from alberto1el/master
judgej Dec 31, 2018
d39b025
Merge pull request #3 from thephpleague/master
alberto1el Jan 5, 2019
079a991
Allow CreatePaymentProfile from opaque data
alberto1el Jan 5, 2019
55b6f52
Fix psr2 style
alberto1el Jan 5, 2019
66a83f1
Enable CIM UpdatePaymentProfile
alberto1el Jan 5, 2019
23458a4
Merge pull request #121 from alberto1el/master
judgej Jan 5, 2019
6ac192d
Fix the HttpClient for tests on CIMIntegrationTests and fix a couple …
alberto1el Jan 8, 2019
3135045
Enabled CIMGetProfile on CIMGateway and added a test for it
alberto1el Jan 8, 2019
1bce345
Enabled CIMCreatePaymentProfile as createAdditionalCard on CIMGateway
alberto1el Jan 8, 2019
7e118ad
Issue #123 support HMAC SHA-512 signatureKey
judgej Jan 20, 2019
bbf1985
Merge branch 'master' of github.com:thephpleague/omnipay-authorizenet…
judgej Jan 20, 2019
7871bd3
Issue #123 add test for generation of signature key.
judgej Jan 20, 2019
089d6b0
Merge pull request #124 from thephpleague/issue123
judgej Jan 20, 2019
39594a6
Merge remote-tracking branch 'thephpleague/master'
alberto1el Jan 21, 2019
a86fd7f
Merge pull request #122 from alberto1el/master
judgej Feb 4, 2019
9e8eeae
Add track data to authOnlyTransactions and authCaptureTransactions
judgej Feb 4, 2019
58948ff
Add track2 support to AIM request.
judgej Feb 4, 2019
4d6c14f
Issue #125 fix query message paths.
judgej Feb 5, 2019
475085a
Issue #125 plus some general tidy up of references and docblocks
judgej Feb 5, 2019
aa43c8b
Issue #125 mask "action" validation error in "query" functions.
judgej Feb 6, 2019
671c8de
Bit of formatting to aid readability.
judgej Feb 6, 2019
bd23ae4
Merge pull request #126 from thephpleague/issue125
judgej Feb 6, 2019
7db3b2f
Fix issues related to xml2Array
Feb 7, 2019
5c43a19
Upadte composer.json home page
Feb 11, 2019
a9d460a
Update home page in composer.json
Feb 11, 2019
1fe6f4e
Merge pull request #127 from dmgctrlr/master
judgej Feb 13, 2019
27d01b6
issue-123: add sha512 support for SIMCompleteAuthorizeRequest
odolbin-altexsoft Mar 12, 2019
f288156
issue-123: add getTransactionId method to SIMAuthorizeResponse
odolbin-altexsoft Mar 12, 2019
40b9871
issue-123: fix getTransactionId method to SIMAuthorizeResponse
odolbin-altexsoft Mar 12, 2019
519011b
issue-123: fix getPostedHash method in SIMCompleteAuthorizeRequest
odolbin-altexsoft Mar 12, 2019
de5eb0c
issue-123: fix SIMCompleteAuthorizeRequest
odolbin-altexsoft Mar 12, 2019
6b97fbd
Refactor PR 128 for adding tests.
judgej Mar 16, 2019
07a1a26
Issue #123 / PR #128 Some general refactoring and SHA hash tests added.
judgej Mar 16, 2019
ffe153d
Added PHP 7.3 to tests
judgej Mar 17, 2019
e0098a4
CS-3726 handle XML to JSON array conversion issue when a single payme…
anush Apr 25, 2019
e919ec0
Updated tests to use new GetProfileSuccess response mock
anush Apr 26, 2019
9145e44
Merge together split `Content-Type` header mock
anush Apr 26, 2019
bf5412b
Minor formatting; no functional changes.
judgej Apr 27, 2019
1c2c341
Merge pull request #130 from anush/xml_array
judgej Apr 27, 2019
8ccce31
Merge pull request #129 from thephpleague/pr128
judgej Apr 27, 2019
9c820ba
Merge remote-tracking branch 'thephpleague/master'
tszulc Jan 9, 2020
8eadc03
fix: move under models folder
tszulc Jan 9, 2020
cda37bc
feat: add BankAccount
tszulc Jan 9, 2020
72d2903
fix: update to work with current API requirements & package setup
tszulc Jan 9, 2020
59cc26c
feat: add billing & shipping address for echeck
tszulc Jan 9, 2020
7620022
fix: incorrect function & variable + return-early
tszulc Jan 10, 2020
c0705d9
fix: update valid accountTypes
tszulc Jan 10, 2020
ba6360a
feat: add bank account to transaction reference
tszulc Jan 10, 2020
d81f4f2
feat: add mock eCheck purchase success and failure responses
tszulc Jan 10, 2020
f7fce96
fix: update to mirror Omnipay/Common/CreditCard
tszulc Jan 10, 2020
de154cb
fix: update to use tweaked BankAccount
tszulc Jan 10, 2020
f780e12
feat: add eCheck testing
tszulc Jan 10, 2020
e85fd2e
feat: add BankAccount testing - similar to Omnipay/Common/CreditCard
tszulc Jan 10, 2020
77053da
feat: custom exception
tszulc Jan 14, 2020
11e54be
feat: add regex for routing number
tszulc Jan 14, 2020
af7de01
feat: use custom exception
tszulc Jan 14, 2020
23e286c
feat: validate the routing number matches regex & passes checksum
tszulc Jan 14, 2020
09493b4
feat: add testing for routing number validation
tszulc Jan 14, 2020
319d671
fix: swap elements to be in the correct order
tszulc Jan 15, 2020
1b9c64e
Issue #135 added clarificartion to help example.
judgej Oct 25, 2020
7f35274
Merge remote-tracking branch 'thephpleague/master'
tszulc Mar 3, 2022
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
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CiviCRM editor configuration normalization
# @see http://editorconfig.org/

# This is the top-most .editorconfig file; do not search in parent directories.
root = true

# All files.
[*]
end_of_line = LF
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
composer.lock
composer.phar
phpunit.xml
.idea
31 changes: 23 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
- 7.0
- 7.1
- 7.2
- 7.3

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

## Cache composer
cache:
directories:
- $HOME/.composer/cache

env:
global:
- setup=basic

matrix:
allow_failures:
- php: hhvm
include:
- php: 5.6
env: setup=lowest

before_script:
- composer install -n --dev --prefer-source
install:
- if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi

script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text
131 changes: 117 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,135 @@ processing library for PHP 5.3+. This package implements Authorize.Net support f

## Installation

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it
to your `composer.json` file:

```json
{
"require": {
"omnipay/authorizenet": "~2.0"
}
}
```

And run composer to update your dependencies:
Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply require `league/omnipay` and `omnipay/authorizenet` with Composer:

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
```
composer require league/omnipay omnipay/authorizenet:"3.x@dev"
```

## Basic Usage

The following gateways are provided by this package:

* AuthorizeNet_AIM
* AuthorizeNet_CIM
* AuthorizeNet_SIM
* AuthorizeNet_DPM

In addition, `Accept.JS` is supported by the AIM driver and CIM (create card). More details are provided below.

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)
repository.

## Accept.JS

This gateway uses a JavaScript script to tokenize credit card details at the front end,
i.e. in the payment form.
Just the tokenized version of the credit card is then sent back to the merchant site,
where it is used as a proxy for the credit card.

The card is tokenized into two values returned in `opaqueData` object from Accept.JS:

* dataDescriptor - the type of opaque data, e.g. "COMMON.ACCEPT.INAPP.PAYMENT"
* dataValue - the value for the opaque data, e.g. "eyJjb2RlIjoiNT... {256 characters} ...idiI6IjEuMSJ9"

These two values must be POSTed back to the merchant application, usually as a part of the payment form.
Make sure the raw credit card details are NOT posted back to your site.
How this is handled is beyond this short note, but examples are always welcomed in the documentation.

On the server, the tokenized details are passed into the `payment` or `authorize` request object.
You will still need to pass in the `CreditCard` object, as that contains details of the payee and
recipient, but just leave the credit card details of that object blank. For example:

```php
// $gateway is an instantiation of the AIM driver.
// $dataDescriptor and $dataValue come from the payment form at the front end.

use Omnipay\Common\CreditCard;

$request = $gateway->purchase(
[
'notifyUrl' => '...',
'amount' => $amount,
//
'opaqueDataDescriptor' => $dataDescriptor,
'opaqueDataValue' => $dataValue,
//
'card' => new CreditCard([
'firstName' => 'Anne',
'lastName' => 'Payee',
...
]),
...
]
);
```

CIM Create Card feature usage:
Accept.js must be implemented on your frontend payment form, once Accept.js 'tokenizes' the customer's
card, just send the two opaque fields and remove the Card's (Number, Expiration and CVV) from your post request.

Accept.js goal is to remove the need of Card information from ever going into your server so be sure to remove that data
before posting to your server.

The create card feature on CIM will automatically create a Customer Profile and a Payment Profile with the
'tokenized' card for each customer you request it for on your authorize.net account, you can use these Payment Profiles
later to request payments from your customers.

In order to create a Customer & Payment Profile pass the opaque fields and the card array with the billing information
to the createCard method on the CIM driver:

```php
// $gateway is an instantiation of the CIM driver. //Omnipay::create( 'AuthorizeNet_CIM' )
// $dataDescriptor and $dataValue come from the payment form at the front end.

$request = $gateway->createCard(
[
'opaqueDataDescriptor' => $dataDescriptor,
'opaqueDataValue' => $dataValue,
'name' => $name,
'email' => $email, //Authorize.net will use the email to identify the CustomerProfile
'customerType' => 'individual',
'customerId' => $user_customer_id,//a customer ID generated by your system or send null
'description' => 'MEMBER',//whichever description you wish to send
'forceCardUpdate' => true
'card' => [
'billingFirstName' => $name,
'billingLastName' => $last_name,
'billingAddress1' => $address,
'billingCity' => $city,
'billingState' => $state,
'billingPostcode' => $zipcode,
'billingPhone' => '',
//... may include shipping info but do not include card (number, cvv or expiration)
],
]
);
$response = $request->send();
$data = $response->getData();

$data['paymentProfile']['customerProfileId'];
$data['paymentProfile']['customerPaymentProfileId'];

// Now you can use these 2 fields to reference this customer and this payment profile for later use with
// the rest of the CIM driver features as usual.
```

## DPM and SIM Signatures

DPM and SIM used to sign their requests with the `transactionKey` using the mdh HMAC algorithm.
From early 2019, this algorithm is being removed completely.
Instead, the SHA-512 HMAC algorithm is used to sign the DPM and SIM requests,
and to validate the received notifications.

To start using the SHA-512 signing, set your `signatureKey` in the gateway:

```php
$gateway->setSignatureKey('48D2C629E4A...{100}...E7CA3C4E6CD7223D');
```

The `signatureKey` can be generated in the *API Credentials & Keys* section of your account setings.

## Support

If you are having general issues with Omnipay, we suggest posting on
Expand Down
19 changes: 15 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,25 @@
"psr-4": { "Omnipay\\AuthorizeNet\\" : "src/" }
},
"require": {
"omnipay/common": "~2.0"
"omnipay/common": "^3",
"ext-json": "*",
"ext-libxml": "*",
"ext-simplexml": "*"
},
"require-dev": {
"omnipay/tests": "~2.0"
"omnipay/tests": "^3",
"squizlabs/php_codesniffer": "^3",
"phpro/grumphp": "^0.14"
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.0.x-dev"
}
}
},
"scripts": {
"test": "phpunit",
"check-style": "phpcs -p --standard=PSR2 src/",
"fix-style": "phpcbf -p --standard=PSR2 src/"
},
"prefer-stable": true
}
15 changes: 15 additions & 0 deletions grumphp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
parameters:
git_dir: .
bin_dir: vendor/bin
tasks:
phpunit:
config_file: ~
testsuite: ~
group: []
always_execute: false
phpcs:
standard: PSR2
warning_severity: ~
ignore_patterns:
- tests/
triggered_by: [php]
3 changes: 0 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<directory>./tests/</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="Mockery\Adapter\Phpunit\TestListener" file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php" />
</listeners>
<filter>
<whitelist>
<directory>./src</directory>
Expand Down
Loading