Wt: Wt::Payment::Customer Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Wt::Payment::Customer Class Reference

Contains customer information. More...

`#include <Wt/Payment/Customer.h>`

## Public Member Functions
| Customer ()
| Default constructor.
void | setFirstName (const WString &firstName)
| Sets the first name.
WString | firstName () const
| Returns the first name.
void | setLastName (const WString &lastName)
| Sets the last name.
WString | lastName () const
| Returns the last name.
void | setEmail (const std::string &email)
| Sets the email address.
std::string | email () const
| Returns the email address.
void | setShippingAddress (const Address &address)
| Sets the shipping address.
const Address & | shippingAddress () const
| Returns shipping address.
void | setLocale (const std::string &locale)
| Sets the customer locale.
std::string | locale () const
| Returns locale.
void | setPayerId (const std::string &payerId)
| Sets the payerId field.
std::string | payerId () const
| Returns payerId.

## Detailed Description

Contains customer information.

Wt::Payment::Customer customer;
customer.setEmail("joe.birkenberg@emweb.be");
customer.setFirstName("Joe");
customer.setLastName("Birkenberg");
Wt::Payment::Address address;
address.setCity("Leuven");
address.setCountryCode("BE");
address.setPhoneNumber("123456789");
address.setStreet1("Brusselsestraat 14");
customer.setShippingAddress(address);
Wt::Payment::Address
Contains address information.
Definition Address.h:40
Wt::Payment::Address::setStreet1
void setStreet1(const WString &street1)
Sets first street line.
Wt::Payment::Address::setCity
void setCity(const WString &city)
Sets the city.
Wt::Payment::Address::setPhoneNumber
void setPhoneNumber(const std::string &number)
Sets the phone number.
Wt::Payment::Address::setCountryCode
void setCountryCode(const std::string &country)
Sets the country code.
Wt::Payment::Customer
Contains customer information.
Definition Customer.h:39
Wt::Payment::Customer::setShippingAddress
void setShippingAddress(const Address &address)
Sets the shipping address.
Wt::Payment::Customer::setLastName
void setLastName(const WString &lastName)
Sets the last name.
Wt::Payment::Customer::setFirstName
void setFirstName(const WString &firstName)
Sets the first name.
Wt::Payment::Customer::setEmail
void setEmail(const std::string &email)
Sets the email address.

## Constructor & Destructor Documentation

## ◆ Customer()

Wt::Payment::Customer::Customer | ( |  | ) |

Default constructor.

All information is blank.

## Member Function Documentation

## ◆ email()

std::string Wt::Payment::Customer::email | ( |  | ) | const

Returns the email address.

See also
  setEmail()

## ◆ firstName()

WString Wt::Payment::Customer::firstName | ( |  | ) | const

Returns the first name.

See also
  setFirstName()

## ◆ lastName()

WString Wt::Payment::Customer::lastName | ( |  | ) | const

Returns the last name.

See also
  setLastName()

## ◆ locale()

std::string Wt::Payment::Customer::locale | ( |  | ) | const

Returns locale.

See also
  setLocale()

## ◆ payerId()

std::string Wt::Payment::Customer::payerId | ( |  | ) | const

Returns payerId.

See also
  setPayerId()

## ◆ setLocale()

void Wt::Payment::Customer::setLocale | ( | const std::string & | locale | ) |

Sets the customer locale.

The customer locale must be specified according to the payment broker (usually to help the user being served in his native language), which is usually a language code like http://en.wikipedia.org/wiki/BCP_47

## ◆ setPayerId()

void Wt::Payment::Customer::setPayerId | ( | const std::string & | payerId | ) |

Sets the payerId field.

This is the identification of the user with a payment broker which also keeps login information (and other information like shipping addresses) on the user.

Not all payment brokers support (or need this).

## ◆ shippingAddress()

const Address & Wt::Payment::Customer::shippingAddress | ( |  | ) | const

Returns shipping address.

See also
  setShippingAddress()