PHP code example of mobbexco / php-plugins-sdk

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

    

mobbexco / php-plugins-sdk example snippets




\Mobbex\Platform::init('tests', '1.0.0', 'localhost:8000', [], [
    'api_key'      => 'zJ8LFTBX6Ba8D611e9io13fDZAwj0QmKO1Hn1yIj',
    'access_token' => 'd31f0721-2f85-44e7-bcc6-15e19d1a53cc',
    'test'         => true,
    'embed'        => false,
]);
\Mobbex\Api::init();

\Mobbex\Integrity\Attestation::init('prestashop', __DIR__);

// PrestaShop
\Mobbex\Integrity\Attestation::init('prestashop', __DIR__, null, function () {
    return \Context::getContext()->link->getPageLink('order', true);
});

// WooCommerce
\Mobbex\Integrity\Attestation::init('woocommerce', WC_MOBBEX_DIR, null, 'wc_get_checkout_url');

composer 
bash
php tests/mac_vectors_runner.php   # sin dependencias, corre desde PHP 5.6
composer test                      # suite completa, requiere PHP 7.3+