Quantcast
Channel: WHMCS Community Forums
Viewing all articles
Browse latest Browse all 13458

how can I use internal api with addtransaction?

$
0
0
I was trying to use the internal api to add a transaction but was unable to do it...


the code was:


<?php

# Set Vars
$command = 'AddTransaction';
$values = array( 'amountout' => '1.23', 'description' => 'transaction', 'transid' => 'abcdefgh', 'date' => '31/12/2008' );
$adminuser = 'admin'; #my username

# Call API
$results = localAPI($command,$values,$adminuser);
if ($results['result']!="success") echo "An Error Occurred: ".$results['result'];

?>

I also tried some different values for $command and $values but I alway get the api error.

what am I doing wrong?
can you write an example to add a transaction using internal api so I can start from there?

Viewing all articles
Browse latest Browse all 13458

Latest Images

Trending Articles



Latest Images