PHP code example of simplephp / iap-service

1. Go to this page and download the library: Download simplephp/iap-service library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

simplephp / iap-service example snippets


$config = [
    'apple' => [
        'default' => [
            'leaf_cert_oid' => '1.2.***.6.11.1',
            'kid' => 'D37***2LT',
            'bundle_id' => 'com.****.bundler',
            'issuer_id' => '69a6-***-a4d1',
            'private_key_path' => __DIR__ . '/cert/SubscriptionKey_****.p8',
        ]
    ],
];
bash
├── examples
│   ├── ....
│   ├── app_store_notify.php      // apple iap 事件通知示例
│   ├── app_store_server_api.php  // apple iap rest api 示例
│   └── huawei_server_api.php     // huawei iap rest api 示例
│   └── huawei_server_notify.php  // huawei iap 事件通知示例
├── ...