Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#include <SvDebitCmdBuild.h>
Inherits keyple::calypso::command::po::AbstractPoCommandBuilder< SvDebitRespPars >.
Public Member Functions | |
SvDebitCmdBuild (const PoClass &poClass, const PoRevision &poRevision, const int amount, const uint8_t kvc, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time) | |
void | finalizeBuilder (const std::vector< uint8_t > &debitComplementaryData) |
const std::vector< uint8_t > | getSvDebitData () const |
std::shared_ptr< SvDebitRespPars > | createResponseParser (std::shared_ptr< ApduResponse > apduResponse) override |
virtual bool | isSessionBufferUsed () const override |
![]() | |
AbstractPoCommandBuilder (std::shared_ptr< CalypsoPoCommand > commandRef, std::shared_ptr< ApduRequest > request) | |
virtual | ~AbstractPoCommandBuilder ()=default |
virtual const std::shared_ptr< SeCommand > | getCommandRef () const override |
virtual bool | isSessionBufferUsed () const=0 |
![]() | |
AbstractIso7816CommandBuilder (const std::shared_ptr< SeCommand > commandReference, const std::shared_ptr< ApduRequest > request) | |
AbstractIso7816CommandBuilder (const std::string &name, const std::shared_ptr< ApduRequest > request) | |
virtual | ~AbstractIso7816CommandBuilder ()=default |
![]() | |
AbstractApduCommandBuilder (const std::shared_ptr< SeCommand > commandRef, const std::shared_ptr< ApduRequest > request) | |
AbstractApduCommandBuilder (const std::string &name, const std::shared_ptr< ApduRequest > request) | |
virtual | ~AbstractApduCommandBuilder ()=default |
virtual void | addSubName (const std::string &subName) |
virtual const std::shared_ptr< SeCommand > | getCommandRef () const |
virtual const std::string & | getName () const |
virtual const std::shared_ptr< ApduRequest > | getApduRequest () const |
Additional Inherited Members | |
![]() | |
virtual std::shared_ptr< ApduRequest > | setApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const std::vector< uint8_t > &dataIn) |
virtual std::shared_ptr< ApduRequest > | setApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const uint8_t le) |
virtual std::shared_ptr< ApduRequest > | setApduRequest (const uint8_t cla, const SeCommand &command, const uint8_t p1, const uint8_t p2, const std::vector< uint8_t > &dataIn, const uint8_t le) |
![]() | |
const std::shared_ptr< Logger > | mLogger |
![]() | |
const std::shared_ptr< SeCommand > | mCommandRef |
std::shared_ptr< ApduRequest > | mRequest |
The Class SvDebitCmdBuild. This class provides the dedicated constructor to build the SV Debit command. Note: keyple::calypso::command::po::builder::storedvalue::SvDebitCmdBuild and keyple::calypso::command::po::builder::storedvalue::SvUndebitCmdBuild shares the same parser keyple::calypso::command::po::parser::storedvalue::SvDebitRespPars.
keyple::calypso::command::po::builder::storedvalue::SvDebitCmdBuild::SvDebitCmdBuild | ( | const PoClass & | poClass, |
const PoRevision & | poRevision, | ||
const int | amount, | ||
const uint8_t | kvc, | ||
const std::vector< uint8_t > & | date, | ||
const std::vector< uint8_t > & | time | ||
) |
Instantiates a new SvDebitCmdBuild.
poClass | indicates which CLA byte should be used for the Apdu |
poRevision | the PO revision |
amount | amount to debit (positive integer from 0 to 32767) |
kvc | the KVC |
date | debit date (not checked by the PO) |
time | debit time (not checked by the PO) |
IllegalArgumentException | - if the command is inconsistent |
|
overridevirtual |
Create the response parser matching the builder
apduResponse | the response data from the SE |
Implements keyple::calypso::command::po::AbstractPoCommandBuilder< SvDebitRespPars >.
void keyple::calypso::command::po::builder::storedvalue::SvDebitCmdBuild::finalizeBuilder | ( | const std::vector< uint8_t > & | debitComplementaryData | ) |
Complete the construction of the APDU to be sent to the PO with the elements received from the SAM:
4-byte SAM id
3-byte challenge
3-byte transaction number
5 or 10 byte signature (hi part)
debitComplementaryData | the data out from the SvPrepareDebit SAM command |
const std::vector< uint8_t > keyple::calypso::command::po::builder::storedvalue::SvDebitCmdBuild::getSvDebitData | ( | ) | const |
Gets the SV Debit part of the data to include in the SAM SV Prepare Debit command
|
overridevirtual |