1. Go to this page and download the library: Download nuvocode/nuvo-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/ */
nuvocode / nuvo-payment-sdk example snippets
use NuvoPayment\NuvoPayment;
$nuvo = new NuvoPayment();
// Create a payment
$payment = $nuvo->payments->create(49.99, 'USD', [
'success' => 'https://example.com/success',
'cancel' => 'https://example.com/cancel'
]);
if (!isset($payment['error'])) {
header('Location: ' . $payment['redirect_url']);
} else {
echo "Error: " . $payment['message'];
}
// Get payment status
$status = $nuvo->payments->find('pay_123');