Wt  4.10.4
Public Member Functions | List of all members
Wt::Payment::Result Class Reference

A class that represents the result of a payment API call. More...

#include <Wt/Payment/Result.h>

Inheritance diagram for Wt::Payment::Result:
[legend]

Public Member Functions

 Result ()
 Default constructor. More...
 
 Result (const WString &errorMessage)
 Constructor with an error message. More...
 
bool error () const
 Returns whether the result indicates success.
 
WString errorMessage () const
 Returns the error message.
 
void setRequestMessage (const std::map< std::string, std::string > &msg)
 Sets the request parameters. More...
 
std::map< std::string, std::string > requestMessage () const
 Returns the request parameters. More...
 
void setResponseMessage (const std::map< std::string, std::string > &msg)
 Sets the response parameters. More...
 
std::map< std::string, std::string > responseMessage () const
 Returns the response parameters. More...
 

Detailed Description

A class that represents the result of a payment API call.

This class indicates the result of an asynchronous call: error() indicates whether there was an error.

Constructor & Destructor Documentation

◆ Result() [1/2]

Wt::Payment::Result::Result ( )

Default constructor.

This creates a successful result.

◆ Result() [2/2]

Wt::Payment::Result::Result ( const WString errorMessage)

Constructor with an error message.

This creates an unsuccessful result. The error message cannot be empty.

Member Function Documentation

◆ requestMessage()

std::map< std::string, std::string > Wt::Payment::Result::requestMessage ( ) const

Returns the request parameters.

See also
setRequestMessage()

◆ responseMessage()

std::map< std::string, std::string > Wt::Payment::Result::responseMessage ( ) const

Returns the response parameters.

See also
setResponseMessage()

◆ setRequestMessage()

void Wt::Payment::Result::setRequestMessage ( const std::map< std::string, std::string > &  msg)

Sets the request parameters.

For an asynchronous API call that uses name value pairs, this sets the underlying values that were sent in the request.

◆ setResponseMessage()

void Wt::Payment::Result::setResponseMessage ( const std::map< std::string, std::string > &  msg)

Sets the response parameters.

For an asynchronous API call that uses name value pairs, this sets the underlying values that were returned in the response.