PHP code example of phone2action / ym-api

1. Go to this page and download the library: Download phone2action/ym-api 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/ */

    

phone2action / ym-api example snippets


P2A\YourMembership\YourMembershipServiceProvider::class,

$client = app(P2A\YourMembership\YourMembershipClient::class,[$apiKey,$saPasscode]);

$response = $client->makeCall('Session.Create')->toArray();
echo $response['SessionID'];

$response = $client->makeCall('Session.Create')->toObject();
echo $response->SessionID;
bash
php artisan vendor:publish --provider="P2A\YourMembership\YourMembershipServiceProvider"