PHP code example of achbanking / sdk

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

    

achbanking / sdk example snippets


// Via constructor


$client = new \AchBanking\Sdk\Client(
    'API_TOKEN', // from the site
    'API_KEY', // from the site
    'ENDPOINT_URL'
);

// Or set credentials later


$client = new \AchBanking\Sdk\Client();
$client->useCredentials(
    'API_TOKEN',
    'API_KEY',
    'ENDPOINT_URL'
);



$result = $client->methodName([
    'param1' => 'value1',
    'param2' => 'value2',
    'param3' => 'value3',
]);

// or
$object = new \stdClass();
$object->param1 = 'value1';
$object->param2 = 'value2';
$object->param3 = 'value3';

$result = $client->methodName($object);



// get payment profile by ID
$paymentProfile = $client->getPaymentProfile([
    'payment_profile_id' => 'payment-profile-id',
]);

// modify the email address
$paymentProfile->payment_profile_email_address = '[email protected]';

// and save it
$result = $client->savePaymentProfile($paymentProfile);