Download the PHP package readdle/app-store-server-api without Composer

On this page you can find all versions of the php package readdle/app-store-server-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package app-store-server-api

About

This is a *zero-dependencies* pure PHP* library that allows managing customer transactions using the App Store Server API and handling server-to-server notifications by providing everything you need to implement the App Store Server Notifications V2 endpoint.

* Zero-dependencies means this library doesn't rely on any third-party library. At the same time, this library relies on such essential PHP extensions as json and openssl

NOTE

If you need to deal with receipts instead of (or additionally to) API, check out this library.

Installation

Nothing special here, just use composer to install the package:

composer require readdle/app-store-server-api

Usage

App Store Server API

API initialization:

Performing API call:

App Store Server Notifications

Examples

In examples/ directory you can find examples for all implemented endpoints. Initialization of the API client is separated into client.php and used in all examples.

In order to run examples you have to create credentials.json and/or notifications.json inside examples/ directory.

credentials.json structure should be as follows:

In most examples transactionId is used. Please, consider that transactionId is related to environment, so if you put transactionId from the sandbox the environment property should be Sandbox as well, otherwise you'll get {"errorCode":4040010,"errorMessage":"Transaction id not found."} error.

For Order ID lookup you have to specify orderId. This endpoint (and, consequently, the example) is not available in the sandbox environment.

notification.json structure is the same as you receive it in your server-to-server notification endpoint:

What is covered

In-app purchase history V1 (Deprecated, but left for backwards compatibility)

Get Transaction History

AppStoreServerAPI::getTransactionHistory(string $transactionId, array $queryParams)

Get a customer’s in-app purchase transaction history for your app.

In-app purchase history V2

Get Transaction History

AppStoreServerAPI::getTransactionHistoryV2(string $transactionId, array $queryParams)

Get a customer’s in-app purchase transaction history for your app.

Transaction Info

Get Transaction Info

AppStoreServerAPI::getTransactionInfo(string $transactionId)

Get information about a single transaction for your app.

Subscription status

Get All Subscription Statuses

AppStoreServerAPI::getAllSubscriptionStatuses(string $transactionId, array $queryParams = [])

Get the statuses for all of a customer’s auto-renewable subscriptions in your app.

Consumption information

Send Consumption Information

AppStoreServerAPI::sendConsumptionInformation(string $transactionId, array $requestBody)

Send consumption information about a consumable in-app purchase to the App Store after your server receives a consumption request notification.

Order ID lookup

Look Up Order ID

AppStoreServerAPI::lookUpOrderId(string $orderId)

Get a customer’s in-app purchases from a receipt using the order ID.

Refund lookup

Get Refund History

AppStoreServerAPI::getRefundHistory(string $transactionId)

Get a list of all of a customer’s refunded in-app purchases for your app.

Subscription-renewal-date extension

Extend a Subscription Renewal Date

AppStoreServerAPI::extendSubscriptionRenewalDate(string $originalTransactionId, array $requestBody)

Extends the renewal date of a customer’s active subscription using the original transaction identifier.

Extend Subscription Renewal Dates for All Active Subscribers

AppStoreServerAPI::massExtendSubscriptionRenewalDate(array $requestBody)

Uses a subscription’s product identifier to extend the renewal date for all of its eligible active subscribers.

Get Status of Subscription Renewal Date Extensions

AppStoreServerAPI::getStatusOfSubscriptionRenewalDateExtensionsRequest(string $productId, string $requestIdentifier)

Checks whether a renewal date extension request completed, and provides the final count of successful or failed extensions.

App Store Server Notifications history

Get Notification History

AppStoreServerAPI::getNotificationHistory(array $requestBody)

Get a list of notifications that the App Store server attempted to send to your server.

App Store Server Notifications testing

Request a Test Notification

AppStoreServerAPI::requestTestNotification()

Ask App Store Server Notifications to send a test notification to your server.

Get Test Notification Status

AppStoreServerAPI::getTestNotificationStatus(string $testNotificationToken)

Check the status of the test App Store server notification sent to your server.


All versions of app-store-server-api with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package readdle/app-store-server-api contains the following files

Loading the files please wait ....