PHP code example of alejandrotrevi / php-bluesnap-sdk
1. Go to this page and download the library: Download alejandrotrevi/php-bluesnap-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/ */
alejandrotrevi / php-bluesnap-sdk example snippets
public function __construct()
{
$environment = 'sandbox'; // or 'production'
\Bluesnap\Bluesnap::init($environment, 'YOUR_API_KEY', 'YOUR_API_PASSWORD');
}
public function getHostedPaymentFieldsToken() {
$data = \Bluesnap\HostedPaymentFieldsToken::create();
return $data['hosted_payment_fields_token'];
}