dev-version-2
dev-version-2 http://satispay.comSatispay Online API PHP SDK
MIT
The Requires
- ext-curl *
- ext-json *
- ext-mbstring *
- php >=5.4.0
by satispay
api php sdk online satispay
Satispay Online API PHP SDK
For new integrations please use https://github.com/satispay/gbusiness-api-php-sdk., (*2)
Run the following command:, (*3)
composer require satispay/online-api-php-sdk
If you do not wish to use Composer, import the init.php
file., (*4)
require_once("/path/init.php");
https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html, (*5)
Sign in to your Dashboard at business.satispay.com, click "Negozi Online", click on "Crea codice di attivazione" and select "Security bearer" on top menu., (*6)
\SatispayOnline\Api::setSecurityBearer("osh_...");
Sign in to your Dashboard at business.satispay.com, click "Negozi Online", and then click on "Genera un token di attivazione" to generate an activation token., (*7)
Use the activation token with the authenticateWithToken
function to generate and exchange a pair of RSA keys., (*8)
Save the keys in your database or in a safe place not accesibile from your website., (*9)
// Authenticate and generate the keys $authentication = \SatispayOnline\Api::authenticateWithToken("XXXXXX"); // Export keys $publicKey = $authentication->publicKey; $privateKey = $authentication->privateKey; $keyId = $authentication->keyId;
Reuse the keys after authentication., (*10)
// Keys variables $publicKey = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhk..."; $privateKey = "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBg..."; $keyId = "ldg9sbq283og7ua1abpj989kbbm2g60us6f18c1sciq..."; // Set keys \SatispayOnline\Api::setPublicKey($publicKey); \SatispayOnline\Api::setPrivateKey($privateKey); \SatispayOnline\Api::setKeyId($keyId); // Test the authentication \SatispayOnline\Api::testAuthentication();
To enable sandbox use setSandbox
function., (*11)
\SatispayOnline\Api::setSandbox(true);
Satispay Online API PHP SDK
MIT
api php sdk online satispay