public function sendBill($bill, callable $onSuccess, callable $onFailure)
    {
        // return if the bill is not defined by creating one.
        if ($bill === false) {
            return;
        }

        $currencyEntry = new CurrencyEntry();
        $currencyEntry->setBill($bill);
        $currencyEntry->setSuccessCallback($onSuccess);
        $currencyEntry->setFailureCallback($onFailure);
        $this->currencyPlugin->sendBill($currencyEntry);

    }