PHP code example of vdhoangson / zmp-openapi-php

1. Go to this page and download the library: Download vdhoangson/zmp-openapi-php 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/ */

    

vdhoangson / zmp-openapi-php example snippets


use Vdhoangson\ZmpOpenApi\Classes\PartnerClient;
$proxy = [
    "host" => "127.0.0.1",
    "port" => 123
];

$client = new PartnerClient(
    "{YOUR-PARTNER-API-KEY}",
    "{YOUR-PARTNER-ID}",
    $proxy, // optional
);

$response = $client->getMiniApps();
print_r($response);

$deployApp = [
    'file' => '/path/to/file.zip',
    'miniAppId' => 123,
    'name' => 'Tên app',
    'description' => 'Mô tả app'
];
$response = $client->deployMiniApp($deployApp);
bash
composer