<?php

require_once('config.php');
require_once('../source/paysafe-neteller-api.php');

use Neteller\StandaloneCredit;

$standaloneCredit = new StandaloneCredit;
//this should contain your unuique transaction ID
$standaloneCredit->merchantRefNum = uniqid();
//this should contain the paymentHandleToken from the payment handle
$standaloneCredit->paymentHandleToken = "PHOAiy7JqGEyWkKm";
//this should contain the amount from the payment handle
$standaloneCredit->amount = 1000;
//this should contain the currency from the payment handle
$standaloneCredit->currency = "EUR";

try{
    $standaloneCredit->create($netellerApiKey, $netellerApiUrl);

    print "Standalone Credit ID: " . $standaloneCredit->id . "<br />";
    print "Status: " . $standaloneCredit->status;
    /* Do something with the data here */

}catch(NetellerException $e){
    print $e->getMessage(); //handle the exception
}

