Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -128,6 +128,11 @@ abstract class Gateway extends Model
|
||||
* @brief [Node] Title prefix. If specified, will look for a language key with "{$key}_title" as the key
|
||||
*/
|
||||
public static ?string $titleLangPrefix = 'nexus_paymethod_';
|
||||
|
||||
/**
|
||||
* @brief [Node] Enabled/Disabled Column
|
||||
*/
|
||||
public static ?string $databaseColumnEnabledDisabled = 'active';
|
||||
|
||||
/**
|
||||
* Construct ActiveRecord from database row
|
||||
@@ -176,28 +181,6 @@ abstract class Gateway extends Model
|
||||
return $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Node] Get whether or not this node is enabled
|
||||
*
|
||||
* @note Return value NULL indicates the node cannot be enabled/disabled
|
||||
* @return bool|null
|
||||
*/
|
||||
protected function get__enabled(): ?bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Node] Set whether or not this node is enabled
|
||||
*
|
||||
* @param bool|int $enabled Whether to set it enabled or disabled
|
||||
* @return void
|
||||
*/
|
||||
protected function set__enabled( bool|int $enabled ) : void
|
||||
{
|
||||
$this->enabled = $enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief [Node] ACP Restrictions
|
||||
* @code
|
||||
@@ -490,6 +473,12 @@ abstract class Gateway extends Model
|
||||
*/
|
||||
public function checkValidity(Money $amount, ?GeoLocation $billingAddress = NULL, ?Customer $customer = NULL, array $recurrings = array() ) : bool
|
||||
{
|
||||
/* If the gateway is disabled, skip it */
|
||||
if( !$this->active )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $this->countries !== '*' )
|
||||
{
|
||||
if ( $billingAddress )
|
||||
|
||||
Reference in new issue
Block a user