PHP code example of enbit / afterbuy-sdk

1. Go to this page and download the library: Download enbit/afterbuy-sdk 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/ */

    

enbit / afterbuy-sdk example snippets



      
      ig = array(
          'userId'     => 'userid',
          'userPass' => 'userpass',
          'partnerId'    => '123456',
          'partnerPass'    => '123',
          'errorLang'    => 'en',
      );
      
      
      $factory  = new Ns\Afterbuy\Factory();
      $api = $factory->createRequest($config);
      try {
          $soldItems =  $api->getSoldItems();
          $result = $soldItems->getResult();
          var_dump($result);
      } catch (Exception $e) {
          echo $e;
      }