AbstractPaymentModule
class AbstractPaymentModule extends BaseModule implements PaymentModuleInterface
Traits
Constants
CLASSIC_MODULE_TYPE |
|
DELIVERY_MODULE_TYPE |
|
PAYMENT_MODULE_TYPE |
|
MODULE_CATEGORIES |
|
IS_ACTIVATED |
|
IS_NOT_ACTIVATED |
|
Methods
No description
No description
No description
Check if this module is the payment module for a given order
Check if this module is the delivery module for a given order
A convenient method to get the current order total, with or without tax, discount or postage.
No description
No description
Render the payment gateway template. The module should provide the gateway URL and the form fields names and values.
Return the order payment success page URL
Redirect the customer to the failure payment page. if $message is null, a generic message is displayed.
No description
Details
in
BaseModule at line 66
activate(
Module $moduleModel = null)
This method is called when the module is activated
in
BaseModule at line 92
deActivate(
Module $moduleModel = null)
This method is called when the module is deactivated
in
BaseModule at line 115
hasContainer()
in
BaseModule at line 120
getContainer()
in
BaseModule at line 129
hasRequest()
in
BaseModule at line 134
setRequest(
Request $request)
in
BaseModule at line 144
Request
getRequest()
in
BaseModule at line 158
hasDispatcher()
in
BaseModule at line 163
setDispatcher(
EventDispatcherInterface $dispatcher)
in
BaseModule at line 172
EventDispatcherInterface
getDispatcher()
in
BaseModule at line 189
setTitle(
Module $module,
array $titles)
in
BaseModule at line 216
static
string
getConfigValue(
string $variableName,
string $defaultValue = null,
null $valueLocale = null)
in
BaseModule at line 225
static
$this;
setConfigValue(
string $variableName,
string $variableValue,
null $valueLocale = null,
bool $createIfNotExists = true)
in
BaseModule at line 234
deployImageFolder(
Module $module,
string $folderPath,
ConnectionInterface $con = null)
in
BaseModule at line 313
Module
getModuleModel()
in
BaseModule at line 341
static
string
getModuleId()
in
BaseModule at line 362
static
string
getModuleCode()
in
BaseModule at line 372
string
getCode()
in
BaseModule at line 383
bool
isPaymentModuleFor(
Order $order)
Check if this module is the payment module for a given order
in
BaseModule at line 396
bool
isDeliveryModuleFor(
Order $order)
Check if this module is the delivery module for a given order
in
BaseModule at line 415
float|int
getCurrentOrderTotalAmount(
bool $with_tax = true,
bool $with_discount = true,
bool $with_postage = true)
A convenient method to get the current order total, with or without tax, discount or postage.
This method operates on the order currently in the user's session, and should not be used to get the total amount of an order already stored in the database. For such orders, use Order::getTotalAmount() method.
in
BaseModule at line 448
static
getCompilers()
in
BaseModule at line 456
install(
ConnectionInterface $con = null)
in
BaseModule at line 464
update(
string $currentVersion,
string $newVersion,
ConnectionInterface $con = null)
in
BaseModule at line 472
bool
preActivation(
ConnectionInterface $con = null)
in
BaseModule at line 481
postActivation(
ConnectionInterface $con = null)
in
BaseModule at line 489
bool
preDeactivation(
ConnectionInterface $con = null)
in
BaseModule at line 498
postDeactivation(
ConnectionInterface $con = null)
in
BaseModule at line 506
destroy(
ConnectionInterface $con = null,
bool $deleteModuleData = false)
in
BaseModule at line 514
array
getHooks()
in
BaseModule at line 522
registerHooks()
at line 33
Response
generateGatewayFormResponse(
Order $order,
string $gateway_url,
array $form_data)
Render the payment gateway template. The module should provide the gateway URL and the form fields names and values.
at line 61
string
getPaymentSuccessPageUrl(
int $order_id)
Return the order payment success page URL
at line 82
string
getPaymentFailurePageUrl(
int $order_id,
string|null $message)
Redirect the customer to the failure payment page. if $message is null, a generic message is displayed.