diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index d58559e..d604f99 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -75,6 +75,9 @@ void ATBDeviceControllerPlugin::requestStartCashInput(const QString & amount) void ATBDeviceControllerPlugin::requestStopCashInput() { hw->cash_stopPayment(); + + // we need new cash value in application... + QTimer::singleShot(500, this, SLOT(onCashPayStoped())); } void ATBDeviceControllerPlugin::cashCollect() @@ -322,6 +325,21 @@ void ATBDeviceControllerPlugin::onCashPayStopByTimeout() ""); } +void ATBDeviceControllerPlugin::onCashPayStoped() +{ + // DEBUG + qCritical() << "ATBDeviceControllerPlugin::onCashPayStoped()"; + + uint32_t amountInt = this->hw->getInsertedAmount(); + + QString amountString = QString::number(amountInt); + + emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::SUCCESS, + amountString, + "", + ""); +} + bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName) { diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.h b/src/ATBAPP/ATBDeviceControllerPlugin.h index b8eba92..2278375 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.h +++ b/src/ATBAPP/ATBDeviceControllerPlugin.h @@ -127,6 +127,7 @@ private slots: // cash payment void onCashGotCoin(); + void onCashPayStoped(); void onCashPayStopByMax(); void onCashPayStopByEscrow(); void onCashPayStopByError();