PHP code example of wadify / wadify-sdk-php

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

    

wadify / wadify-sdk-php example snippets



// Require the Composer autoloader.
lient.
$client = new Client([
    'apiKey' => '{your-api-key}',
    'clientId' => '{your-client-id}',
    'clientSecret' => '{your-client-secret}'
]);


// Require the Composer autoloader.
lient.
$client = new Client([
    'apiKey' => '{your-api-key}',
    'clientId' => '{your-client-id}',
    'clientSecret' => '{your-client-secret}'
    'token' => [
        'provider' => '{your-provider-class-namespace}',
        'args' => [...]
    ]
]);


$user = $client->getUser(); // array


$transactions = $client->getTransactions(); // array


$transaction = $client->getTransaction('your-trasaction-id'); // array


$id = ;
$transaction = $client->abortTransaction('your-trasaction-id'); // array


$data = [
    "amount" => 100,
    "subject" => "Transaction number one",
    "response_url" => "http://your.response.url/",
    "source_account" => "e76ad9ea-dbc1-11e5-a764-109add42947b",
    "destination_account" => [
        "name" => "Javier Rodriguez",
        "iban" => "ES1800491500042710151321"
    ],
    "fingerprint" => [
        "order" => "secret,amount,subject,response_url,source_account,destination_account.name,destination_account.iban",
        "hash" => "{hash}"
    ]
]
$transaction = $client->createTransaction($data); // array



namespace Your\Namespace;

use Wadify\Token\StorageProvider\StorageProviderInterface;
use Wadify\Token\Token;

class CustomProvider implements StorageProviderInterface
{   
    public function get() 
    {
    ...
    }
    
    public function set(Token $token)
    {
    ...
    }
}
bash
composer