Wt  3.7.1
Public Member Functions | List of all members
Wt::Payment::PayPalService Class Reference

This is a PayPal service class. More...

#include <Wt/Payment/PayPal>

Public Member Functions

 PayPalService ()
 Default constructor. More...
 
bool configureFromProperties ()
 Configures the service using properties. More...
 
void configureTestSandbox ()
 Configures the service for the PayPal test sandbox.
 
void setUser (const std::string &user)
 Sets the user.
 
std::string user () const
 Returns the user. More...
 
void setPassword (const std::string &password)
 Sets the password.
 
std::string password () const
 Returns the password. More...
 
void setSignature (const std::string &signature)
 Sets the signature.
 
std::string signature () const
 Returns the signature. More...
 
void setVersion (const std::string &version)
 Sets the version. More...
 
std::string version () const
 Returns version. More...
 
void setApiServerUrl (const std::string &url)
 Sets the PayPal API server url. More...
 
std::string apiServerUrl () const
 Returns PayPal API server url. More...
 
void setPayServerUrl (const std::string &url)
 Sets the payment server url. More...
 
std::string payServerUrl () const
 Returns the payment server url. More...
 
PayPalExpressCheckoutcreateExpressCheckout (const Customer &customer, const Order &order)
 Starts a PayPal checkout process. More...
 

Detailed Description

This is a PayPal service class.

This class holds the PayPal configuration, and is usually shared between sessions.

Constructor & Destructor Documentation

◆ PayPalService()

Wt::Payment::PayPalService::PayPalService ( )

Default constructor.

You can call configureFromProperties() to configure the service from properties in the configuration, or configureTestSandbox() to configure the PayPal sanbox (for testing).

Alternatively, you could set a suitable configuration using the individual methods.

Member Function Documentation

◆ apiServerUrl()

std::string Wt::Payment::PayPalService::apiServerUrl ( ) const

Returns PayPal API server url.

See also
setApiServerUrl()

◆ configureFromProperties()

bool Wt::Payment::PayPalService::configureFromProperties ( )

Configures the service using properties.

Returns true if values were found for all required properties:

  • paypal-user
  • paypal-password
  • paypal-signature
  • paypal-api-server-url
  • paypal-pay-server-url
  • paypal-version
Note
the PayPalExpressCheckout process assumes version 92.0

◆ createExpressCheckout()

PayPalExpressCheckout * Wt::Payment::PayPalService::createExpressCheckout ( const Customer customer,
const Order order 
)

Starts a PayPal checkout process.

Every distinct PayPal checkout process is managed by a PayPalExpressCheckout instance, which tracks the state and progress of the payment.

◆ password()

std::string Wt::Payment::PayPalService::password ( ) const

Returns the password.

See also
setPassword()

◆ payServerUrl()

std::string Wt::Payment::PayPalService::payServerUrl ( ) const

Returns the payment server url.

See also
setPayServerUrl()

◆ setApiServerUrl()

void Wt::Payment::PayPalService::setApiServerUrl ( const std::string &  url)

Sets the PayPal API server url.

This is the server that is communicated with using the PayPal API.

◆ setPayServerUrl()

void Wt::Payment::PayPalService::setPayServerUrl ( const std::string &  url)

Sets the payment server url.

This is the server to which the user is redirected for the payment.

◆ setVersion()

void Wt::Payment::PayPalService::setVersion ( const std::string &  version)

Sets the version.

The Paypal version that is used.

Note
the PayPalExpressCheckout process assumes version 92.0

◆ signature()

std::string Wt::Payment::PayPalService::signature ( ) const

Returns the signature.

See also
setSignature()

◆ user()

std::string Wt::Payment::PayPalService::user ( ) const

Returns the user.

See also
setUser()

◆ version()

std::string Wt::Payment::PayPalService::version ( ) const

Returns version.

See also
setVersion()

Generated on Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13