PHP code example of mhndev / sap-client

1. Go to this page and download the library: Download mhndev/sap-client 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/ */

    

mhndev / sap-client example snippets


use mhndev\sapClient\SapClient;

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);


function get_string_between($string, $start, $end){
    $string = ' ' . $string;
    $ini = strpos($string, $start);
    if ($ini == 0) return '';
    $ini += strlen($start);
    $len = strpos($string, $end, $ini) - $ini;
    return substr($string, $ini, $len);
}

/var_dump($sap_client->checkBusinessPartner('3732981134', '09364517379'));
//die();


var_dump($sap_client->getBusinessPartnerByMobile('09123169242'));

die();

//var_dump($sap_client->getBusinessPartnerByBPSapIdentifier('C0010702'));
//var_dump($sap_client->getBusinessPartnerByNationalCode('3732981134'));


//var_dump($sap_client->healthCheck());

//var_dump($sap_client->createBusinessPartner(
//    'Majid Abdolhosseini',
//    '0014297884',
//    '09124971706',
//    '[email protected]'
//));
//
//var_dump($sap_client->checkBusinessPartner('0014297884', '09124971706'));
//die();


//
//var_dump($sap_client->updateBusinessPartner(
//    'Majid Abdolhosseini',
//    '0014297884',
//    '09124971706',
//    '[email protected]'
//));

die();