Jump to content

how can I use internal api with addtransaction?


jacksoggetto

Recommended Posts

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated