PHP

The PHP SDK includes two controllers, AccountLinkingController and PurchaseController that should be used in two different endpoints. The AccountLinkingController supports the account linking API call and the PurchaseController supports API calls for purchase and subscription fulfillment. Also, both controllers need a credential store with a valid key, which can be found during the profile configuration in the developer portal.

The controller’s lifecycle is as follows:

  1. Controller is created passing a valid Credential Store;
  2. Callbacks are assigned to the corresponding operations;
  3. Function process is called passing the $_SERVER variable, where the request is validated and the proper callback is called;
  4. The return of process is sent as a response;
  5. Controller is destroyed;

When using the controllers, be careful not to send anything besides the response returned by process, otherwise the AIA server is not going to recognize the message.

The SDK can be found on GitHub