PHP code example of fena / php-payment-sdk
1. Go to this page and download the library: Download fena/php-payment-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/ */
fena / php-payment-sdk example snippets
use Fena\PaymentSDK\Connection;
use Fena\PaymentSDK\Payment;
$connection = Connection::createConnection(
$integrationId = '8afa74ae9fe8be53db50',
$integrationSecret = '55d7d5ed-be22-4321-bb3f-aec8524d8be2'
);
$payment = Payment::createPayment(
$connection,
$amount = '10.00'
$reference = 'AA-11',
);
$payment->process();
use Fena\PaymentSDK\Connection;
use Fena\PaymentSDK\Payment;
use Fena\PaymentSDK\Provider;
use Fena\PaymentSDK\User;
$connection = Connection::createConnection($terminalId, $terminalSecret);
$payment = Payment::createPayment(
$connection,
$amount = '10.00',
$reference = 'AA-11',
);
$user = User::createUser(
$email = '[email protected] ',
$firstName = 'John',
$lastName = 'Doe',
$contactNumber = '07000845953'
);
$payment->setUser($user);
$provider = Provider::createProvider(
$providerId = 'lloyds-bank',
$sortCode = '123456',
$accountNumber = '12345678'
);
$payment->setProvider($provider);
bash
composer