PaymentModuleInterface
interface PaymentModuleInterface implements BaseModuleInterface
Methods
This method is called when the plugin is installed for the first time
This method is called when a newer version of the plugin is installed
This method is called just before the deletion of the module, giving the module an opportunity to delete its data.
This method is called before the module activation, and may prevent it by returning false.
This method is called just after the module was successfully activated.
This method is called before the module de-activation, and may prevent it by returning false.
This method is called just after the module was successfully deactivated.
Sets a module titles for various languages
Get a module's configuration variable
Set module configuration variable, creating it if required
Ensure the proper deployment of the module's images.
Create or update module hooks returned by the getHooks
function
This method is call on Payment loop.
if you want, you can manage stock in your module instead of order process.
Details
in
BaseModuleInterface at line 25
install(
ConnectionInterface $con = null)
This method is called when the plugin is installed for the first time
in
BaseModuleInterface at line 34
update(
string $currentVersion,
string $newVersion,
ConnectionInterface $con = null)
This method is called when a newer version of the plugin is installed
in
BaseModuleInterface at line 44
destroy(
ConnectionInterface $con = null,
bool $deleteModuleData = false)
This method is called just before the deletion of the module, giving the module an opportunity to delete its data.
in
BaseModuleInterface at line 51
activate(
Module $moduleModel = null)
This method is called when the module is activated
in
BaseModuleInterface at line 58
deActivate(
Module $moduleModel = null)
This method is called when the module is deactivated
in
BaseModuleInterface at line 68
bool
preActivation(
ConnectionInterface $con = null)
This method is called before the module activation, and may prevent it by returning false.
in
BaseModuleInterface at line 75
postActivation(
ConnectionInterface $con = null)
This method is called just after the module was successfully activated.
in
BaseModuleInterface at line 83
bool
preDeactivation(
ConnectionInterface $con = null)
This method is called before the module de-activation, and may prevent it by returning false.
in
BaseModuleInterface at line 90
postDeactivation(
ConnectionInterface $con = null)
This method is called just after the module was successfully deactivated.
in
BaseModuleInterface at line 99
setTitle(
Module $module,
array $titles)
Sets a module titles for various languages
in
BaseModuleInterface at line 109
static
string
getConfigValue(
string $variableName,
string $defaultValue = null,
null $valueLocale = null)
Get a module's configuration variable
in
BaseModuleInterface at line 121
static
$this;
setConfigValue(
string $variableName,
string $variableValue,
null $valueLocale = null,
bool $createIfNotExists = true)
Set module configuration variable, creating it if required
in
BaseModuleInterface at line 141
deployImageFolder(
Module $module,
string $folderPath,
ConnectionInterface $con = null)
Ensure the proper deployment of the module's images.
TODO : this method does not take care of internationalization. This is a bug.
in
BaseModuleInterface at line 147
Module
getModuleModel()
in
BaseModuleInterface at line 152
static
string
getModuleId()
in
BaseModuleInterface at line 157
static
string
getModuleCode()
in
BaseModuleInterface at line 162
string
getCode()
in
BaseModuleInterface at line 200
static
getCompilers()
This method adds new compilers to Thelia container
You must return an array. This array can contain : - arrays - one or many instance(s) of \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
in the first case, your array must contains 2 indexes. The first is the compiler instance and the second the compilerPass type. Example : return array( array( new \MyModule\DependencyInjection\Compiler\MySuperCompilerPass(), \Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPEBEFOREOPTIMIZATION ) );
In the seconde case, just an instance of CompilerPassInterface. Example : return array ( new \MyModule\DependencyInjection\Compiler\MySuperCompilerPass() );
But you can combine both behaviors Example :
return array( new \MyModule\DependencyInjection\Compiler\MySuperCompilerPass(), array( new \MyModule\DependencyInjection\Compiler\MyOtherSuperCompilerPass(), Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPEBEFOREOPTIMIZATION ) );
in
BaseModuleInterface at line 244
array
getHooks()
in
BaseModuleInterface at line 249
registerHooks()
Create or update module hooks returned by the getHooks
function
at line 32
null|Response
pay(
Order $order)
Method used by payment gateway.
If this method return a \Thelia\Core\HttpFoundation\Response instance, this response is send to the browser.
In many cases, it's necessary to send a form to the payment gateway. On your response you can return this form already completed, ready to be sent
at line 43
boolean
isValidPayment()
This method is call on Payment loop.
If you return true, the payment method will de display If you return false, the payment method will not be display
at line 52
bool
manageStockOnCreation()
if you want, you can manage stock in your module instead of order process.
Return false to decrease the stock when order status switch to pay