Skip to content

Commit

Permalink
Merge pull request #413 from AuthorizeNet/php-version-upgrade
Browse files Browse the repository at this point in the history
Changes for March 2021
  • Loading branch information
gnongsie authored Mar 31, 2021
2 parents 23de64e + 373938e commit 2760e2b
Show file tree
Hide file tree
Showing 245 changed files with 1,651 additions and 1,307 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ phplog
.buildpath
.project
.settings
backup
51 changes: 40 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,43 @@ language: php

sudo: false

dist: trusty

env:
- TEST_SUITE=samples

php:
- 5.6
- 7.0
- 7.1
matrix:
include:
- php: 5.6
env:
- PHPUNIT_VERSION=5.6.*
- TEST_SUITE=samples
dist: trusty
- php: 7.0
env:
- PHPUNIT_VERSION=5.6.*
- TEST_SUITE=samples
dist: trusty
- php: 7.1
env:
- PHPUNIT_VERSION=5.7.*
- TEST_SUITE=samples
dist: trusty
- php: 7.2
env:
- PHPUNIT_VERSION=8.5.*
- TEST_SUITE=samples
dist: bionic
- php: 7.3
env:
- PHPUNIT_VERSION=9.5.*
- TEST_SUITE=samples
dist: bionic
- php: 7.4
env:
- PHPUNIT_VERSION=9.5.*
- TEST_SUITE=samples
dist: bionic
- php: 8.0
env:
- PHPUNIT_VERSION=9.5.*
- TEST_SUITE=samples
dist: bionic

before_install:
# execute all of the commands which need to be executed
Expand All @@ -20,7 +48,8 @@ before_install:
install:
# install all of the dependencies we need here
- pecl install xmldiff
- composer install --prefer-dist
- composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --no-update
- composer update --prefer-dist

before_script:
# execute all of the commands which need to be executed
Expand All @@ -30,7 +59,7 @@ before_script:
script:
# execute all of the tests or other commands to determine
# whether the build will pass or fail
- 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
- 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

after_script:
# - if [[ "$TEST_SUITE" == "coverage" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
Expand Down
165 changes: 160 additions & 5 deletions AnetApiSchema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
</xs:restriction>
</xs:simpleType>
<!-- ===================================================== -->
<xs:simpleType name="alphaNumericSpaceString">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9a-zA-Z\s]+"/>
</xs:restriction>
</xs:simpleType>
<!-- ===================================================== -->
<xs:complexType name="ArrayOfLong">
<xs:sequence>
<xs:element name="long" type="xs:long" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
Expand Down Expand Up @@ -83,6 +89,23 @@
</xs:sequence>
</xs:complexType>
<!-- ===================================================== -->
<xs:complexType name="ArrayOfContactDetail">
<xs:sequence>
<xs:element name="contactDetail" type="anet:ContactDetailType" nillable="false" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>
<!--
==============================================================================
Reason for MasterCard Auth Indicator Transaction Value
==============================================================================
-->
<xs:simpleType name="authIndicatorEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="pre"/>
<xs:enumeration value="final"/>
</xs:restriction>
</xs:simpleType>
<!-- ===================================================== -->
<xs:simpleType name="bankAccountTypeEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="checking"/>
Expand Down Expand Up @@ -602,6 +625,7 @@
<xs:element name="dataDescriptor" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="dataValue" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="dataKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="expirationTimeStamp" type="xs:dateTime" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<!-- ===================================================== -->
Expand Down Expand Up @@ -1383,6 +1407,7 @@
<xs:element name="subsequentAuthInformation" type="anet:subsequentAuthInformation" minOccurs="0" maxOccurs="1"/>
<xs:element name="otherTax" minOccurs="0" type="anet:otherTaxType" />
<xs:element name="shipFrom" minOccurs="0" type="anet:nameAndAddressType" />
<xs:element name="authorizationIndicatorType" type="anet:authorizationIndicatorType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<!-- ===================================================== -->
Expand Down Expand Up @@ -1644,6 +1669,11 @@
<xs:documentation>string. Used by getHostedProfilePage method to accept button text configuration.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="hostedPaymentVisaCheckoutOptions">
<xs:annotation>
<xs:documentation>string. Used by getHostedPaymentPage method to accept VisaCheckout configuration.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<!-- ===================================================== -->
Expand Down Expand Up @@ -1685,6 +1715,7 @@
</xs:simpleType>
</xs:element>
<xs:element name="defaultPaymentProfile" type="xs:boolean" minOccurs="0"/>
<xs:element name="subsequentAuthInformation" type="anet:subsequentAuthInformation" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
Expand Down Expand Up @@ -1717,6 +1748,15 @@
</xs:simpleType>
</xs:element>
<xs:element name="subscriptionIds" type="anet:SubscriptionIdList" minOccurs="0" maxOccurs="1"/>
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
<xs:element name="originalAuthAmount" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0.00"/>
<xs:fractionDigits value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
Expand Down Expand Up @@ -2021,7 +2061,7 @@
<xs:element name="productCode" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15"/>
<xs:maxLength value="30"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Expand Down Expand Up @@ -2082,6 +2122,7 @@
<xs:element name="splitTenderId" type="anet:numericString" minOccurs="0"/>
<xs:element name="processingOptions" type="anet:processingOptions" minOccurs="0" maxOccurs="1"/>
<xs:element name="subsequentAuthInformation" type="anet:subsequentAuthInformation" minOccurs="0" maxOccurs="1"/>
<xs:element name="authorizationIndicatorType" type="anet:authorizationIndicatorType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
Expand Down Expand Up @@ -2342,6 +2383,17 @@
<xs:element name="tip" type="anet:extendedAmountType" minOccurs="0"/>
<xs:element name="otherTax" minOccurs="0" type="anet:otherTaxType" />
<xs:element name="shipFrom" minOccurs="0" type="anet:nameAndAddressType" />
<xs:element name="networkTransId" type="anet:networkTransId" minOccurs="0" />
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
<xs:element name="originalAuthAmount" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0.00"/>
<xs:fractionDigits value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="authorizationIndicator" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!-- ===================================================== -->
Expand Down Expand Up @@ -2528,9 +2580,36 @@
</xs:element>
<xs:element name="transHashSha2" type="xs:string" minOccurs="0"/>
<xs:element name="profile" type="anet:customerProfileIdType" minOccurs="0"/>
<xs:element name="networkTransId" type="anet:networkTransId" minOccurs="0"/>
<xs:element name="networkTransId" type="anet:networkTransId" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!-- ===================================================== -->
<xs:complexType name="ContactDetailType">
<xs:sequence>
<xs:element name="email" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="firstName" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="lastName" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>

<!--
===================================================================
The ANetApiRequest defines elements common to all API method
Expand Down Expand Up @@ -4247,6 +4326,15 @@ Payment Profile Type.
<xs:element name="customerProfileId" type="xs:int" minOccurs="1" maxOccurs="1"/>
<xs:element name="billTo" type="anet:customerAddressType" minOccurs="1" maxOccurs="1"/>
<xs:element name="payment" type="anet:paymentMaskedType" minOccurs="1" maxOccurs="1"/>
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
<xs:element name="originalAuthAmount" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0.00"/>
<xs:fractionDigits value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="arrayOfCustomerPaymentProfileListItemType">
Expand Down Expand Up @@ -4506,15 +4594,34 @@ The merchant must be signed up for the CIM service to use it.
</xs:complexType>
<!--
==============================================================================
Processing Options type
Processing Options are used to pass additional transaction processing options
==============================================================================
-->
<xs:complexType name="authorizationIndicatorType">
<xs:sequence>
<xs:element name="authorizationIndicator" type="anet:authIndicatorEnum" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<!--
==============================================================================
Subsequent Auth Information type
Subsequent Auth Information is used to pass additional information for
Merchant-Initiated transactions
==============================================================================
-->
<xs:complexType name="subsequentAuthInformation">
<xs:sequence>
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
<xs:element name="reason" type="anet:merchantInitTransReasonEnum" minOccurs="0" maxOccurs="1"/>
<xs:element name="originalNetworkTransId" type="anet:networkTransId" minOccurs="0" maxOccurs="1"/>
<xs:element name="originalAuthAmount" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0.00"/>
<xs:fractionDigits value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="reason" type="anet:merchantInitTransReasonEnum" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<!--
Expand All @@ -4523,10 +4630,11 @@ The merchant must be signed up for the CIM service to use it.
==============================================================================
-->
<xs:simpleType name="networkTransId">
<xs:restriction base="anet:alphaNumericString">
<xs:restriction base="anet:alphaNumericSpaceString">
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>

<!--
==============================================================================
Reason for Merchant Initiated Transaction
Expand Down Expand Up @@ -4648,6 +4756,7 @@ The merchant must be signed up for the CIM service to use it.
<xs:enumeration value="VisaCheckout"/>
<xs:enumeration value="ApplePay"/>
<xs:enumeration value="AndroidPay"/>
<xs:enumeration value="GooglePay"/>
</xs:restriction>
</xs:simpleType>
<!--
Expand Down Expand Up @@ -4716,6 +4825,15 @@ The merchant must be signed up for the CIM service to use it.
<xs:element name="paymentMethods" type="anet:ArrayOfPaymentMethod"/>
<xs:element name="currencies" type="anet:ArrayOfCurrencyCode"/>
<xs:element name="publicClientKey" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="businessInformation" type="anet:customerAddressType" minOccurs="0" maxOccurs="1" />
<xs:element name="merchantTimeZone" minOccurs="0" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="contactDetails" type="anet:ArrayOfContactDetail" minOccurs="0" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
Expand Down Expand Up @@ -4751,4 +4869,41 @@ The merchant must be signed up for the CIM service to use it.
</xs:complexContent>
</xs:complexType>
</xs:element>

<!--
===================================================================
getCustomerPaymentProfileNonceRequest
This method is used to get Nonce (payment token) for an existing customer payment profile for a customer profile.
===================================================================
-->
<xs:element name="getCustomerPaymentProfileNonceRequest">
<xs:complexType>
<xs:complexContent>
<xs:extension base="anet:ANetApiRequest">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="connectedAccessToken" type="xs:string"/>
<xs:element name="customerProfileId" type="anet:numericString" minOccurs="1" maxOccurs="1"/>
<xs:element name="customerPaymentProfileId" type="anet:numericString" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

<!--
===================================================================
getCustomerPaymentProfileNonceResponse
===================================================================
-->
<xs:element name="getCustomerPaymentProfileNonceResponse">
<xs:complexType>
<xs:complexContent>
<xs:extension base="anet:ANetApiResponse">
<xs:sequence>
<xs:element name="opaqueData" type="anet:opaqueDataType" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ override the new secure-http default setting)*.
{
"require": {
"php": ">=5.6",
"authorizenet/authorizenet": "2.0.1"
"authorizenet/authorizenet": "2.0.2"
}
}
```
Expand Down
2 changes: 2 additions & 0 deletions classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@
'net\authorize\api\contract\v1\ArrayOfSettingType' => $libDir . 'net/authorize/api/contract/v1/ArrayOfSettingType.php',
'net\authorize\api\contract\v1\AuthenticateTestRequest' => $libDir . 'net/authorize/api/contract/v1/AuthenticateTestRequest.php',
'net\authorize\api\contract\v1\AuthenticateTestResponse' => $libDir . 'net/authorize/api/contract/v1/AuthenticateTestResponse.php',
'net\authorize\api\contract\v1\AuthorizationIndicatorType' => $libDir . 'net/authorize/api/contract/v1/AuthorizationIndicatorType.php',
'net\authorize\api\contract\v1\BankAccountMaskedType' => $libDir . 'net/authorize/api/contract/v1/BankAccountMaskedType.php',
'net\authorize\api\contract\v1\BankAccountType' => $libDir . 'net/authorize/api/contract/v1/BankAccountType.php',
'net\authorize\api\contract\v1\BatchDetailsType' => $libDir . 'net/authorize/api/contract/v1/BatchDetailsType.php',
'net\authorize\api\contract\v1\BatchStatisticType' => $libDir . 'net/authorize/api/contract/v1/BatchStatisticType.php',
'net\authorize\api\contract\v1\CardArtType' => $libDir . 'net/authorize/api/contract/v1/CardArtType.php',
'net\authorize\api\contract\v1\CcAuthenticationType' => $libDir . 'net/authorize/api/contract/v1/CcAuthenticationType.php',
'net\authorize\api\contract\v1\ContactDetailType' => $libDir . 'net/authorize/api/contract/v1/ContactDetailType.php',
'net\authorize\api\contract\v1\CreateCustomerPaymentProfileRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerPaymentProfileRequest.php',
'net\authorize\api\contract\v1\CreateCustomerPaymentProfileResponse' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerPaymentProfileResponse.php',
'net\authorize\api\contract\v1\CreateCustomerProfileFromTransactionRequest' => $libDir . 'net/authorize/api/contract/v1/CreateCustomerProfileFromTransactionRequest.php',
Expand Down
Loading

0 comments on commit 2760e2b

Please sign in to comment.