PHP code example of transferwise / wise-php
1. Go to this page and download the library: Download transferwise/wise-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/ */
transferwise / wise-php example snippets
$client = new \TransferWise\Client(
[
"token" => "WISE_TOKEN",
"profile_id" => "WISE_PROFILE_ID",
"env" => "sandbox" // optional
]
);
$client->recipient_accounts->create(
[
"accountHolderName" => "John Snow",
"currency" => "EUR",
"type" => "iban",
"details" => [
"legalType" => "PRIVATE",
"IBAN" => "GBFSDFS546S5DF46S5"
]
]
);
$client->validators->iban($iban);
$client->quotes->create(
[
"sourceCurrency" => "EUR",
"targetCurrency" => "GBP",
"sourceAmount" => "100.00",
"targetAmount" => null
]
);
$client->transfers->create(
[
"targetAccount" => "account id",
"quoteUuid" => "generated quote id",
"customerTransactionId" => "transaction id",
"details" => [
"reference" => "Company X",
"transferPurpose"=> "verification.transfers.purpose.pay.bills",
"sourceOfFunds"=> "verification.source.of.funds.other"
]
]
);
$client->recipient_accounts->create();
$client->recipient_accounts->all();
$client->recipient_accounts->retrieve();
$client->recipient_accounts->delete();
$client->quotes->create();
$client->quotes->temporary();
$client->quotes->update();
$client->quotes->retrieve();
$client->transfers->create();
$client->transfers->ancel();
$client->transfers->retrieve();
$client->transfers->issues();
$client->transfers->list();
$client->validators->sortcode();
$client->validators->accountNo();
$client->validators->iban();
$client->validators->ibanandbic();
$client->validators->aba();
$client->validators->abaAccountNo();
$client->validators->ifsc();
$client->validators->banks();
$client->validators->branch();
$client->profiles->create();
$client->profiles->update();
$client->profiles->all();
$client->profiles->retrieve();
$client->profiles->directors();
$client->profiles->addDirector();
$client->profiles->addIdentificationDocument();
composer