Wt
4.11.0
|
This is a PayPal service class. More...
#include <Wt/Payment/PayPal.h>
Public Member Functions | |
PayPalService () | |
Default constructor. | |
bool | configureFromProperties () |
Configures the service using properties. | |
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. | |
void | setPassword (const std::string &password) |
Sets the password. | |
std::string | password () const |
Returns the password. | |
void | setSignature (const std::string &signature) |
Sets the signature. | |
std::string | signature () const |
Returns the signature. | |
void | setVersion (const std::string &version) |
Sets the version. | |
std::string | version () const |
Returns version. | |
void | setApiServerUrl (const std::string &url) |
Sets the PayPal API server url. | |
std::string | apiServerUrl () const |
Returns PayPal API server url. | |
void | setPayServerUrl (const std::string &url) |
Sets the payment server url. | |
std::string | payServerUrl () const |
Returns the payment server url. | |
PayPalExpressCheckout * | createExpressCheckout (const Customer &customer, const Order &order) |
Starts a PayPal checkout process. | |
This is a PayPal service class.
This class holds the PayPal configuration, and is usually shared between sessions.
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.
std::string Wt::Payment::PayPalService::apiServerUrl | ( | ) | const |
Returns PayPal API server url.
bool Wt::Payment::PayPalService::configureFromProperties | ( | ) |
Configures the service using properties.
Returns true
if values were found for all required properties:
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.
std::string Wt::Payment::PayPalService::password | ( | ) | const |
Returns the password.
std::string Wt::Payment::PayPalService::payServerUrl | ( | ) | const |
Returns the payment server url.
Sets the PayPal API server url.
This is the server that is communicated with using the PayPal API.
Sets the payment server url.
This is the server to which the user is redirected for the payment.
Sets the version.
The Paypal version that is used.
std::string Wt::Payment::PayPalService::signature | ( | ) | const |
Returns the signature.
std::string Wt::Payment::PayPalService::user | ( | ) | const |
Returns the user.
std::string Wt::Payment::PayPalService::version | ( | ) | const |
Returns version.