monero-integrations / monerophp

Monero PHP library + JsonRPC Client
MIT License
116 stars 76 forks source link

wrong path #121

Closed ghost closed 3 years ago

cypherbits commented 3 years ago

Hi, which version of the library are you using?

Are you always using these parameters $monero->transfer($receive_amount,$receive_address) ?

Is it always failing?

cypherbits commented 3 years ago

Can you confirm you are only calling transfer() once and not any other function before this one?

serhack commented 3 years ago

I've spotted some issue with the recent change of "path", and deprecation of "id" field on request. Could you please retest it now?

My demo code works:

<?php
use MoneroIntegrations\MoneroPhp\walletRPC;

// Make sure to display all errors
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

require_once("../monerophp/src/jsonRPCClient.php");
require_once("../monerophp/src/walletRPC.php");

$walletRPC = new walletRPC('127.0.0.1', 1234, false);
$amount = "0.1";
$address = "56bY2v2RJZNEvrKdYuwG73Q2idshQyGc5fV74BZqoVv72MPSBEakPbfWYtQH4PLGhk3uaCjNZ81XJ7o9pimAXzQFCv7bxxf";
$try_transfer = $walletRPC->transfer($amount, $address);
print_r($try_transfer);