BUGFIX:
composer.json:autoload-devPSR-4 namespace fixedAbstractRequestQueryParams::getQueryString()integer values handling fixed- Unit tests added for
GetTransactionHistoryQueryParams::getQueryString()
IMPROVEMENTS:
setAppAccountToken()support added toAppStoreServerAPI- New request classes for the endpoint:
SetAppAccountTokenRequest,UpdateAppAccountTokenRequestBody
- Proper handling of failed HTTP requests added
StoreKit2TransactionandStoreKit2AppTransactionintroduced
IMPROVEMENTS:
- Introduced new field to
TransactionInfo:offerPeriod
IMPROVEMENTS:
- New
notificationType=ONE_TIME_CHARGEinResponseBodyV2
BUGFIX:
TransactionInfo::getAppTransactionId()make it public (silly bug)
IMPROVEMENTS:
- Introduced new field to
TransactionInfo:appTransactionId - Introduced new fields to
RenewalInfo:appAccountToken,appTransactionId,currency,eligibleWinBackOfferIds,offerDiscountType,offerPeriod,renewalPrice
BUGFIX:
- Calling
sendConsumptionInformation()w/o passing optional parameterrefundPreferenceresults in fatal error (kudos to @javiermarinros)
IMPROVEMENTS:
- Insignificant refactoring of
AbstractRequestParamsBagclass
BUGFIX:
AbstractRequestParamsBag::isValueMatchingPropValues()fixed (double negation if value is an array, kudos to @neoighodaro)AbstractRequestQueryParams::getQueryString()fixed (bool values are now explicitly converted to strings, kudos to @neoighodaro)
IMPROVEMENTS:
- New field
consumptionRequestReasonadded toAppMetadata - New field
refundPreference(and corresponding constants) added toConsumptionRequestBody(kudos to @sedlak477)
IMPROVEMENTS:
- In-app purchase history V2 support added (kudos to @anegve)
BUGFIX:
- Default TTL for payload introduced and set to 5 min. Previous value of 1 hour (which is the maximum) seems to be the cause of failed responses in some cases.
- Makefile introduced just to have a shortcut 'make shell' for running Docker container using PHP image and having project directory mounted
IMPROVEMENTS:
- Nullable properties now are NOT converted to empty int/bool/float/string in AppMetadata, RenewalInfo, ResponseBodyV2, TransactionInfo, kudos to @dbrkv for pointing this out
- ArrayTypeCastGenerator moved to the separate class
- PHPUnit tests introduced (just the first one for ArrayTypeCastGenerator atm)
- Examples reworked a bit (RenewalInfo/TransactionInfo printing moved to the separate helper function)
IMPROVEMENTS:
- Now the response content of the HTTP response is available in
HTTPRequestFailedexception usinggetResponseText()method, kudos to @soxft for pointing this out
BUGFIX:
- Handle empty response headers in case if HTTP request to the API fails (and it fails regularly, kudos to Apple)
BUGFIX:
- If the certificate string already has a prefix, there is no need to add it
BUGFIX:
- Treat "202 Accepted" as successful response (App Store returns it on "Send consumption information" request), kudos to @teanooki for pointing this out
IMPROVEMENTS:
New fields implemented
TransactionInfo:price,currency, andofferDiscountTypefrom App Store Server API version 1.10
BUGFIX:
- Logic issue in PageableResponse, after fixing syntax issue in
3.5.1
BUGFIX:
- Syntax issue in PageableResponse for PHP 7.4, kudos to @JamieSTV
IMPROVEMENTS:
Missing endpoints added:
- Send Consumption Information
- Extend a Subscription Renewal Date
- Extend Subscription Renewal Dates for All Active Subscribers
- Get Status of Subscription Renewal Date Extensions
BUGFIX:
TransactionInfo:storefront,storefrontId, andtransactionReasonare now nullable and null by default, in order to be compatible with old notificationsRenewalInfo:renewalDateis now null by default, in order to be compatible with old notificationsResponse\NotificationHistoryResponse:paginationTokenpresence in response is now optional
IMPROVEMENTS:
- New
notificationType/subtypeinResponseBodyV2
BUGFIX:
- ASN1SequenceOfInteger: multiple
00bytes in the beginning of integer numbers handled when parsing HEX signature representation
BUGFIX:
AppMetadata:bundleId,bundleVersion,renewalInfo,transactionInfoandstatusnow areNULLby default (to preventTyped property ... must not be accessed before initializationerror)
IMPROVEMENTS:
- New field implemented
AppMetadata:status
IMPROVEMENTS:
- New fields implemented
RenewalInfo:renewalDateTransactionInfo:storefront,storefrontId,transactionReason
BUGFIX:
ResponseBodyV2:createFromRawNotification()fix, now it checks incoming notification to be not only a valid JSON, but also to be an array
BUGFIX:
ASN1SequenceOfInteger: math fixesStatusResponse:dataarray initialization with[]
IMPROVEMENTS:
HTTPRequest: PUT method added; HTTP method and URL added toHTTPRequestFailedexception messageJWT: additional information in exception message
BUGFIX:
- Math bug fixed in
ASN1SequenceOfInteger. In rare cases signature was calculated in a wrong way which led toWrong signatureexception inJWT::verifySignature
BREAKING CHANGES:
- Main classes renamed:
APIClient->AppStoreServerAPIAPIClientInterface->AppStoreServerAPIInterfaceNotification\ResponseBodyV2->ResponseBodyV2JWT->Util\JWTRequest\GetTransactionHistory->Request\GetTransactionHistoryRequestRequest\RequestTestNotification->Request\RequestTestNotificationRequestRequest\GetTransactionHistoryQueryParams->RequestQueryParams\GetTransactionHistoryQueryParams
- Environment consts moved out from all classes to the separate class
Environment getTransactionHistory()method signature changed: it no longer expects for QueryParams instance as a second arguments, now it expects array insteadAppStoreServerAPI(previouslyAPIClient) constructor signature changed:$environmentargument type changed from int to string$keyIdand$keyarguments swapped
IMPROVEMENTS:
- PHP 7.4 support out of the box ;)
- A lot of new endpoints (see README)
- Examples for all implemented endpoints (and notification listener)