Download the PHP package nikspyratos/investec-sdk-php without Composer
On this page you can find all versions of the php package nikspyratos/investec-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nikspyratos/investec-sdk-php
More information about nikspyratos/investec-sdk-php
Files in nikspyratos/investec-sdk-php
Package investec-sdk-php
Short Description Investec SDK for PHP
License MIT
Homepage https://github.com/nikspyratos/investec-sdk-php
Informations about the package investec-sdk-php
Investec API SDK for PHP
- Investec API SDK for PHP
- Support
- Installation
- Usage
- Internal use
- External use
- Environments
- Data Transfer Objects
- Testing
- Roadmap
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
This is a PHP SDK for Investec's API, using Saloon.
This is a community-made package, and not directly affiliated with Investec.
Support
Installation
You can install the package via composer:
NOTE: Currently, the stable release only includes support for authorization (both personal and 3-legged OAuth) and the Private Banking API. Other APIs are written but untested. See Roadmap for more details.
If you would like to use these other APIs, install from the main
branch:
Usage
See the API documentation for more details.
If you're accessing your own account data, see External use.
See Environments for accessing the Sandbox environment.
Internal use
Firstly, make sure you've obtained your API credentials - this is how you get your client ID, secret and API key.
Note: Internal use
access tokens have a lifespan of 30 minutes.
External use
See API documentation for details.
Your organisation will need to chat with Investec directly to get access. The Investec API uses an OAuth flow for the customer to grant access to you for their data.
Reminder: This package is not affiliated with Investec.
After being redirected back to your specified $redirectUri
, you should have a code. Proceed as usual:
Environments
The API offers two environments: Sandbox and Production.
By default this SDK will use the Production environment. To change this, you may specify the environment using the provided enum like so:
Data Transfer Objects
For Transfer Multiple
and Pay Multiple
endpoints, arrays of beneficiaries/accounts are accepted.
To handle this in a structured manner this package uses dragon-code/simple-dto
to build the DTOs with the required data.
Testing
Tests are set to run with sandbox credentials (which Investec provides us with, luckily).
Then, copy the sandbox environment variable values from here into your .env file.
Then, to run tests:
TODO
-
Using the excellent Saloon SDK Generator, the remaining APIs have been implemented, save for some Forex API endpoints:
Update BOP Report
- the input is massive and has several nested arrays and objects, resulting in a DTO nightmare currently.Validate BOP Report
- similar issues toUpdate BOP Report
.Upload file contents for document handle
- documentation is unclear on how to fill in this data.
- For the non-Private Banking implemented endpoints, tests are either not working (sandbox credentials issue) or are unwritten. Given that, their resource methods are marked as experimental.
If you would like to see any of those APIs be more actively supported, please:
- Let me know if it works, any issues you run into, etc.
- Make a PR with working tests for an API matching the existing testing style, using PestPHP
- Make a PR updating the Documentation with usage guides for the remaining endpoints
TODOs:
- Tests for remaining API endpoint groups
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Nik Spyratos
- All Contributors
- Saloon
- Saloon SDK Generator for speeding up the work on the remaining APIs!
License
The MIT License (MIT). Please see License File for more information.
All versions of investec-sdk-php with dependencies
dragon-code/simple-dto Version ^2.7
nesbot/carbon Version ^2.66
sammyjo20/saloon Version ^2.0