Skip to content

Commit 2760e2b

Browse files
authored
Merge pull request #413 from AuthorizeNet/php-version-upgrade
Changes for March 2021
2 parents 23de64e + 373938e commit 2760e2b

File tree

245 files changed

+1651
-1307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+1651
-1307
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ phplog
1010
.buildpath
1111
.project
1212
.settings
13+
backup

.travis.yml

+40-11
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,43 @@ language: php
22

33
sudo: false
44

5-
dist: trusty
6-
7-
env:
8-
- TEST_SUITE=samples
9-
10-
php:
11-
- 5.6
12-
- 7.0
13-
- 7.1
5+
matrix:
6+
include:
7+
- php: 5.6
8+
env:
9+
- PHPUNIT_VERSION=5.6.*
10+
- TEST_SUITE=samples
11+
dist: trusty
12+
- php: 7.0
13+
env:
14+
- PHPUNIT_VERSION=5.6.*
15+
- TEST_SUITE=samples
16+
dist: trusty
17+
- php: 7.1
18+
env:
19+
- PHPUNIT_VERSION=5.7.*
20+
- TEST_SUITE=samples
21+
dist: trusty
22+
- php: 7.2
23+
env:
24+
- PHPUNIT_VERSION=8.5.*
25+
- TEST_SUITE=samples
26+
dist: bionic
27+
- php: 7.3
28+
env:
29+
- PHPUNIT_VERSION=9.5.*
30+
- TEST_SUITE=samples
31+
dist: bionic
32+
- php: 7.4
33+
env:
34+
- PHPUNIT_VERSION=9.5.*
35+
- TEST_SUITE=samples
36+
dist: bionic
37+
- php: 8.0
38+
env:
39+
- PHPUNIT_VERSION=9.5.*
40+
- TEST_SUITE=samples
41+
dist: bionic
1442

1543
before_install:
1644
# execute all of the commands which need to be executed
@@ -20,7 +48,8 @@ before_install:
2048
install:
2149
# install all of the dependencies we need here
2250
- pecl install xmldiff
23-
- composer install --prefer-dist
51+
- composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update
52+
- composer update --prefer-dist
2453

2554
before_script:
2655
# execute all of the commands which need to be executed
@@ -30,7 +59,7 @@ before_script:
3059
script:
3160
# execute all of the tests or other commands to determine
3261
# whether the build will pass or fail
33-
- if [[ "$TEST_SUITE" == "samples" ]]; then phpenv config-rm xdebug.ini; cp -R lib sample-code-php/; cp -R vendor sample-code-php/; cd sample-code-php; vendor/phpunit/phpunit/phpunit test-runner.php .; fi
62+
- if [[ "$TEST_SUITE" == "samples" ]]; then phpenv config-rm xdebug.ini; cp -R lib sample-code-php/; cp -R vendor sample-code-php/; cd sample-code-php; vendor/phpunit/phpunit/phpunit TestRunner.php .; fi
3463

3564
after_script:
3665
# - if [[ "$TEST_SUITE" == "coverage" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi

AnetApiSchema.xsd

+160-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
</xs:restriction>
1818
</xs:simpleType>
1919
<!-- ===================================================== -->
20+
<xs:simpleType name="alphaNumericSpaceString">
21+
<xs:restriction base="xs:string">
22+
<xs:pattern value="[0-9a-zA-Z\s]+"/>
23+
</xs:restriction>
24+
</xs:simpleType>
25+
<!-- ===================================================== -->
2026
<xs:complexType name="ArrayOfLong">
2127
<xs:sequence>
2228
<xs:element name="long" type="xs:long" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
@@ -83,6 +89,23 @@
8389
</xs:sequence>
8490
</xs:complexType>
8591
<!-- ===================================================== -->
92+
<xs:complexType name="ArrayOfContactDetail">
93+
<xs:sequence>
94+
<xs:element name="contactDetail" type="anet:ContactDetailType" nillable="false" minOccurs="0" maxOccurs="unbounded"></xs:element>
95+
</xs:sequence>
96+
</xs:complexType>
97+
<!--
98+
==============================================================================
99+
Reason for MasterCard Auth Indicator Transaction Value
100+
==============================================================================
101+
-->
102+
<xs:simpleType name="authIndicatorEnum">
103+
<xs:restriction base="xs:string">
104+
<xs:enumeration value="pre"/>
105+
<xs:enumeration value="final"/>
106+
</xs:restriction>
107+
</xs:simpleType>
108+
<!-- ===================================================== -->
86109
<xs:simpleType name="bankAccountTypeEnum">
87110
<xs:restriction base="xs:string">
88111
<xs:enumeration value="checking"/>
@@ -602,6 +625,7 @@
602625
<xs:element name="dataDescriptor" type="xs:string" minOccurs="1" maxOccurs="1"/>
603626
<xs:element name="dataValue" type="xs:string" minOccurs="1" maxOccurs="1"/>
604627
<xs:element name="dataKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
628+
<xs:element name="expirationTimeStamp" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
605629
</xs:sequence>
606630
</xs:complexType>
607631
<!-- ===================================================== -->
@@ -1383,6 +1407,7 @@
13831407
<xs:element name="subsequentAuthInformation" type="anet:subsequentAuthInformation" minOccurs="0" maxOccurs="1"/>
13841408
<xs:element name="otherTax" minOccurs="0" type="anet:otherTaxType" />
13851409
<xs:element name="shipFrom" minOccurs="0" type="anet:nameAndAddressType" />
1410+
<xs:element name="authorizationIndicatorType" type="anet:authorizationIndicatorType" minOccurs="0" maxOccurs="1"/>
13861411
</xs:sequence>
13871412
</xs:complexType>
13881413
<!-- ===================================================== -->
@@ -1644,6 +1669,11 @@
16441669
<xs:documentation>string. Used by getHostedProfilePage method to accept button text configuration.</xs:documentation>
16451670
</xs:annotation>
16461671
</xs:enumeration>
1672+
<xs:enumeration value="hostedPaymentVisaCheckoutOptions">
1673+
<xs:annotation>
1674+
<xs:documentation>string. Used by getHostedPaymentPage method to accept VisaCheckout configuration.</xs:documentation>
1675+
</xs:annotation>
1676+
</xs:enumeration>
16471677
</xs:restriction>
16481678
</xs:simpleType>
16491679
<!-- ===================================================== -->
@@ -1685,6 +1715,7 @@
16851715
</xs:simpleType>
16861716
</xs:element>
16871717
<xs:element name="defaultPaymentProfile" type="xs:boolean" minOccurs="0"/>
1718+
<xs:element name="subsequentAuthInformation" type="anet:subsequentAuthInformation" minOccurs="0" maxOccurs="1"/>
16881719
</xs:sequence>
16891720
</xs:extension>
16901721
</xs:complexContent>
@@ -1717,6 +1748,15 @@
17171748
</xs:simpleType>
17181749
</xs:element>
17191750
<xs:element name="subscriptionIds" type="anet:SubscriptionIdList" minOccurs="0" maxOccurs="1"/>
1751+
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
1752+
<xs:element name="originalAuthAmount" minOccurs="0">
1753+
<xs:simpleType>
1754+
<xs:restriction base="xs:decimal">
1755+
<xs:minInclusive value="0.00"/>
1756+
<xs:fractionDigits value="4"/>
1757+
</xs:restriction>
1758+
</xs:simpleType>
1759+
</xs:element>
17201760
</xs:sequence>
17211761
</xs:extension>
17221762
</xs:complexContent>
@@ -2021,7 +2061,7 @@
20212061
<xs:element name="productCode" minOccurs="0">
20222062
<xs:simpleType>
20232063
<xs:restriction base="xs:string">
2024-
<xs:maxLength value="15"/>
2064+
<xs:maxLength value="30"/>
20252065
</xs:restriction>
20262066
</xs:simpleType>
20272067
</xs:element>
@@ -2082,6 +2122,7 @@
20822122
<xs:element name="splitTenderId" type="anet:numericString" minOccurs="0"/>
20832123
<xs:element name="processingOptions" type="anet:processingOptions" minOccurs="0" maxOccurs="1"/>
20842124
<xs:element name="subsequentAuthInformation" type="anet:subsequentAuthInformation" minOccurs="0" maxOccurs="1"/>
2125+
<xs:element name="authorizationIndicatorType" type="anet:authorizationIndicatorType" minOccurs="0" maxOccurs="1"/>
20852126
</xs:sequence>
20862127
</xs:extension>
20872128
</xs:complexContent>
@@ -2342,6 +2383,17 @@
23422383
<xs:element name="tip" type="anet:extendedAmountType" minOccurs="0"/>
23432384
<xs:element name="otherTax" minOccurs="0" type="anet:otherTaxType" />
23442385
<xs:element name="shipFrom" minOccurs="0" type="anet:nameAndAddressType" />
2386+
<xs:element name="networkTransId" type="anet:networkTransId" minOccurs="0" />
2387+
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
2388+
<xs:element name="originalAuthAmount" minOccurs="0">
2389+
<xs:simpleType>
2390+
<xs:restriction base="xs:decimal">
2391+
<xs:minInclusive value="0.00"/>
2392+
<xs:fractionDigits value="4"/>
2393+
</xs:restriction>
2394+
</xs:simpleType>
2395+
</xs:element>
2396+
<xs:element name="authorizationIndicator" type="xs:string" minOccurs="0"/>
23452397
</xs:sequence>
23462398
</xs:complexType>
23472399
<!-- ===================================================== -->
@@ -2528,9 +2580,36 @@
25282580
</xs:element>
25292581
<xs:element name="transHashSha2" type="xs:string" minOccurs="0"/>
25302582
<xs:element name="profile" type="anet:customerProfileIdType" minOccurs="0"/>
2531-
<xs:element name="networkTransId" type="anet:networkTransId" minOccurs="0"/>
2583+
<xs:element name="networkTransId" type="anet:networkTransId" minOccurs="0"/>
2584+
</xs:sequence>
2585+
</xs:complexType>
2586+
<!-- ===================================================== -->
2587+
<xs:complexType name="ContactDetailType">
2588+
<xs:sequence>
2589+
<xs:element name="email" minOccurs="0" maxOccurs="1">
2590+
<xs:simpleType>
2591+
<xs:restriction base="xs:string">
2592+
<xs:maxLength value="255"/>
2593+
</xs:restriction>
2594+
</xs:simpleType>
2595+
</xs:element>
2596+
<xs:element name="firstName" minOccurs="0" maxOccurs="1">
2597+
<xs:simpleType>
2598+
<xs:restriction base="xs:string">
2599+
<xs:maxLength value="50"/>
2600+
</xs:restriction>
2601+
</xs:simpleType>
2602+
</xs:element>
2603+
<xs:element name="lastName" minOccurs="0" maxOccurs="1">
2604+
<xs:simpleType>
2605+
<xs:restriction base="xs:string">
2606+
<xs:maxLength value="50"/>
2607+
</xs:restriction>
2608+
</xs:simpleType>
2609+
</xs:element>
25322610
</xs:sequence>
25332611
</xs:complexType>
2612+
25342613
<!--
25352614
===================================================================
25362615
The ANetApiRequest defines elements common to all API method
@@ -4247,6 +4326,15 @@ Payment Profile Type.
42474326
<xs:element name="customerProfileId" type="xs:int" minOccurs="1" maxOccurs="1"/>
42484327
<xs:element name="billTo" type="anet:customerAddressType" minOccurs="1" maxOccurs="1"/>
42494328
<xs:element name="payment" type="anet:paymentMaskedType" minOccurs="1" maxOccurs="1"/>
4329+
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
4330+
<xs:element name="originalAuthAmount" minOccurs="0">
4331+
<xs:simpleType>
4332+
<xs:restriction base="xs:decimal">
4333+
<xs:minInclusive value="0.00"/>
4334+
<xs:fractionDigits value="4"/>
4335+
</xs:restriction>
4336+
</xs:simpleType>
4337+
</xs:element>
42504338
</xs:sequence>
42514339
</xs:complexType>
42524340
<xs:complexType name="arrayOfCustomerPaymentProfileListItemType">
@@ -4506,15 +4594,34 @@ The merchant must be signed up for the CIM service to use it.
45064594
</xs:complexType>
45074595
<!--
45084596
==============================================================================
4597+
Processing Options type
4598+
Processing Options are used to pass additional transaction processing options
4599+
==============================================================================
4600+
-->
4601+
<xs:complexType name="authorizationIndicatorType">
4602+
<xs:sequence>
4603+
<xs:element name="authorizationIndicator" type="anet:authIndicatorEnum" minOccurs="0" maxOccurs="1"/>
4604+
</xs:sequence>
4605+
</xs:complexType>
4606+
<!--
4607+
==============================================================================
45094608
Subsequent Auth Information type
45104609
Subsequent Auth Information is used to pass additional information for
45114610
Merchant-Initiated transactions
45124611
==============================================================================
45134612
-->
45144613
<xs:complexType name="subsequentAuthInformation">
45154614
<xs:sequence>
4516-
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
4517-
<xs:element name="reason" type="anet:merchantInitTransReasonEnum" minOccurs="0" maxOccurs="1"/>
4615+
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
4616+
<xs:element name="originalAuthAmount" minOccurs="0">
4617+
<xs:simpleType>
4618+
<xs:restriction base="xs:decimal">
4619+
<xs:minInclusive value="0.00"/>
4620+
<xs:fractionDigits value="4"/>
4621+
</xs:restriction>
4622+
</xs:simpleType>
4623+
</xs:element>
4624+
<xs:element name="reason" type="anet:merchantInitTransReasonEnum" minOccurs="0" maxOccurs="1"/>
45184625
</xs:sequence>
45194626
</xs:complexType>
45204627
<!--
@@ -4523,10 +4630,11 @@ The merchant must be signed up for the CIM service to use it.
45234630
==============================================================================
45244631
-->
45254632
<xs:simpleType name="networkTransId">
4526-
<xs:restriction base="anet:alphaNumericString">
4633+
<xs:restriction base="anet:alphaNumericSpaceString">
45274634
<xs:maxLength value="255"/>
45284635
</xs:restriction>
45294636
</xs:simpleType>
4637+
45304638
<!--
45314639
==============================================================================
45324640
Reason for Merchant Initiated Transaction
@@ -4648,6 +4756,7 @@ The merchant must be signed up for the CIM service to use it.
46484756
<xs:enumeration value="VisaCheckout"/>
46494757
<xs:enumeration value="ApplePay"/>
46504758
<xs:enumeration value="AndroidPay"/>
4759+
<xs:enumeration value="GooglePay"/>
46514760
</xs:restriction>
46524761
</xs:simpleType>
46534762
<!--
@@ -4716,6 +4825,15 @@ The merchant must be signed up for the CIM service to use it.
47164825
<xs:element name="paymentMethods" type="anet:ArrayOfPaymentMethod"/>
47174826
<xs:element name="currencies" type="anet:ArrayOfCurrencyCode"/>
47184827
<xs:element name="publicClientKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
4828+
<xs:element name="businessInformation" type="anet:customerAddressType" minOccurs="0" maxOccurs="1" />
4829+
<xs:element name="merchantTimeZone" minOccurs="0" maxOccurs="1">
4830+
<xs:simpleType>
4831+
<xs:restriction base="xs:string">
4832+
<xs:maxLength value="100"/>
4833+
</xs:restriction>
4834+
</xs:simpleType>
4835+
</xs:element>
4836+
<xs:element name="contactDetails" type="anet:ArrayOfContactDetail" minOccurs="0" />
47194837
</xs:sequence>
47204838
</xs:extension>
47214839
</xs:complexContent>
@@ -4751,4 +4869,41 @@ The merchant must be signed up for the CIM service to use it.
47514869
</xs:complexContent>
47524870
</xs:complexType>
47534871
</xs:element>
4872+
4873+
<!--
4874+
===================================================================
4875+
getCustomerPaymentProfileNonceRequest
4876+
This method is used to get Nonce (payment token) for an existing customer payment profile for a customer profile.
4877+
===================================================================
4878+
-->
4879+
<xs:element name="getCustomerPaymentProfileNonceRequest">
4880+
<xs:complexType>
4881+
<xs:complexContent>
4882+
<xs:extension base="anet:ANetApiRequest">
4883+
<xs:sequence>
4884+
<xs:element maxOccurs="1" minOccurs="1" name="connectedAccessToken" type="xs:string"/>
4885+
<xs:element name="customerProfileId" type="anet:numericString" minOccurs="1" maxOccurs="1"/>
4886+
<xs:element name="customerPaymentProfileId" type="anet:numericString" minOccurs="1" maxOccurs="1"/>
4887+
</xs:sequence>
4888+
</xs:extension>
4889+
</xs:complexContent>
4890+
</xs:complexType>
4891+
</xs:element>
4892+
4893+
<!--
4894+
===================================================================
4895+
getCustomerPaymentProfileNonceResponse
4896+
===================================================================
4897+
-->
4898+
<xs:element name="getCustomerPaymentProfileNonceResponse">
4899+
<xs:complexType>
4900+
<xs:complexContent>
4901+
<xs:extension base="anet:ANetApiResponse">
4902+
<xs:sequence>
4903+
<xs:element name="opaqueData" type="anet:opaqueDataType" minOccurs="0" maxOccurs="1"/>
4904+
</xs:sequence>
4905+
</xs:extension>
4906+
</xs:complexContent>
4907+
</xs:complexType>
4908+
</xs:element>
47544909
</xs:schema>

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ override the new secure-http default setting)*.
5656
{
5757
"require": {
5858
"php": ">=5.6",
59-
"authorizenet/authorizenet": "2.0.1"
59+
"authorizenet/authorizenet": "2.0.2"
6060
}
6161
}
6262
```

classmap.php

+2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@
5656
'net\authorize\api\contract\v1\ArrayOfSettingType' => $libDir . 'net/authorize/api/contract/v1/ArrayOfSettingType.php',
5757
'net\authorize\api\contract\v1\AuthenticateTestRequest' => $libDir . 'net/authorize/api/contract/v1/AuthenticateTestRequest.php',
5858
'net\authorize\api\contract\v1\AuthenticateTestResponse' => $libDir . 'net/authorize/api/contract/v1/AuthenticateTestResponse.php',
59+
'net\authorize\api\contract\v1\AuthorizationIndicatorType' => $libDir . 'net/authorize/api/contract/v1/AuthorizationIndicatorType.php',
5960
'net\authorize\api\contract\v1\BankAccountMaskedType' => $libDir . 'net/authorize/api/contract/v1/BankAccountMaskedType.php',
6061
'net\authorize\api\contract\v1\BankAccountType' => $libDir . 'net/authorize/api/contract/v1/BankAccountType.php',
6162
'net\authorize\api\contract\v1\BatchDetailsType' => $libDir . 'net/authorize/api/contract/v1/BatchDetailsType.php',
6263
'net\authorize\api\contract\v1\BatchStatisticType' => $libDir . 'net/authorize/api/contract/v1/BatchStatisticType.php',
6364
'net\authorize\api\contract\v1\CardArtType' => $libDir . 'net/authorize/api/contract/v1/CardArtType.php',
6465
'net\authorize\api\contract\v1\CcAuthenticationType' => $libDir . 'net/authorize/api/contract/v1/CcAuthenticationType.php',
66+
'net\authorize\api\contract\v1\ContactDetailType' => $libDir . 'net/authorize/api/contract/v1/ContactDetailType.php',
6567
'net\authorize\api\contract\v1\CreateCustomerPaymentProfileRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerPaymentProfileRequest.php',
6668
'net\authorize\api\contract\v1\CreateCustomerPaymentProfileResponse' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerPaymentProfileResponse.php',
6769
'net\authorize\api\contract\v1\CreateCustomerProfileFromTransactionRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerProfileFromTransactionRequest.php',

0 commit comments

Comments
 (0)