MagicSmoke  $VERSION$
MTOrderPay Class Reference

pay for an order with money/credit card/...; see UseVoucher for using a voucher to pay More...

#include <srcMTOrderPay.h>

Inheritance diagram for MTOrderPay:
MTransaction

Public Member Functions

 MTOrderPay ()
 default constructor: generates an invalid transaction More...
 
 MTOrderPay (const MTOrderPay &)
 copy constructor: the two copies share their state More...
 
virtual ~MTOrderPay ()
 deletes this instance More...
 
Q_SLOT Nullable< qint64 > getamount () const
 the amount actually taken, it is between 0 and at maximum the amount due for the order, it is never above the offered amount More...
 
Q_SLOT Nullable< MOOrdergetorder () const
 fresh copy of the order More...
 
MTOrderPayoperator= (const MTOrderPay &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTOrderPay asyncQuery (const qint64 &aorderid, const qint64 &aamount, const QString &apaytype, const QString &apaydata, QString iface="MagicSmoke")
 emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state More...
 
static MTOrderPay query (const qint64 &aorderid, const qint64 &aamount, const QString &apaytype, const QString &apaydata, QString iface="MagicSmoke")
 emits the query over the network and returns the finished transaction object More...
 
- Static Public Member Functions inherited from MTransaction
static void setStartStopActions (const MTStartStop &start, const MTStartStop &stop)
 set actions to be executed at start/stop More...
 

Protected Member Functions

 MTOrderPay (const qint64 &aorderid, const qint64 &aamount, const QString &apaytype, const QString &apaydata, QString iface)
 generates an instance from its properties More...
 
virtual void endQuery ()
 
- Protected Member Functions inherited from MTransaction
 MTransaction (QString iface=QString())
 internal: construct the transaction More...
 
 MTransaction (const WTransaction &)
 internal: copy the transaction More...
 
 MTransaction (const MTransaction &)
 internal: copy the transaction More...
 
QByteArray executeQuery (QString, QByteArray)
 internal: extend executeQuery to show a wait cursor More...
 

Friends

class MTOrderPay_Private
 

Detailed Description

pay for an order with money/credit card/...; see UseVoucher for using a voucher to pay

Constructor & Destructor Documentation

MTOrderPay::MTOrderPay ( const qint64 &  aorderid,
const qint64 &  aamount,
const QString &  apaytype,
const QString &  apaydata,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
aorderidThe order to be paid
aamountamount offered, it must be positive
apaytypethe type of payment
apaydataadditional data, like card number or date of bank transaction
ifaceID of the interface that the transaction will be sent on

References MTOrderPay_Private::in_amount, MTOrderPay_Private::in_orderid, MTOrderPay_Private::in_paydata, MTOrderPay_Private::in_paytype, and MTOrderPay_Private.

MTOrderPay::MTOrderPay ( )

default constructor: generates an invalid transaction

References MTOrderPay_Private.

MTOrderPay::MTOrderPay ( const MTOrderPay t)

copy constructor: the two copies share their state

References MTOrderPay_Private::attach().

MTOrderPay::~MTOrderPay ( )
virtual

deletes this instance

References MTOrderPay_Private::detach().

Member Function Documentation

MTOrderPay MTOrderPay::asyncQuery ( const qint64 &  aorderid,
const qint64 &  aamount,
const QString &  apaytype,
const QString &  apaydata,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state

Parameters
aorderidThe order to be paid
aamountamount offered, it must be positive
apaytypethe type of payment
apaydataadditional data, like card number or date of bank transaction
ifaceID of the interface that the transaction will be sent on
void MTOrderPay::endQuery ( )
protectedvirtual
Nullable< qint64 > MTOrderPay::getamount ( ) const

the amount actually taken, it is between 0 and at maximum the amount due for the order, it is never above the offered amount

References MTOrderPay_Private::out_amount.

Nullable< MOOrder > MTOrderPay::getorder ( ) const

fresh copy of the order

References MTOrderPay_Private::out_order.

MTOrderPay & MTOrderPay::operator= ( const MTOrderPay t)

copy assignment: the copy shares the state of the original object

References MTOrderPay_Private::attach(), and MTOrderPay_Private::detach().

MTOrderPay MTOrderPay::query ( const qint64 &  aorderid,
const qint64 &  aamount,
const QString &  apaytype,
const QString &  apaydata,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the finished transaction object

Parameters
aorderidThe order to be paid
aamountamount offered, it must be positive
apaytypethe type of payment
apaydataadditional data, like card number or date of bank transaction
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryOrderPay().

Friends And Related Function Documentation

friend class MTOrderPay_Private
friend

Referenced by MTOrderPay().


The documentation for this class was generated from the following files: