first commit
This commit is contained in:
38
autoload/shop/class.PaymentMethod.php
Normal file
38
autoload/shop/class.PaymentMethod.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?
|
||||
namespace shop;
|
||||
class PaymentMethod implements \ArrayAccess
|
||||
{
|
||||
// lista dostępnych form płatności
|
||||
static public function method_list()
|
||||
{
|
||||
global $mdb;
|
||||
return $mdb -> select( 'pp_shop_payment_methods', '*', [ 'status' => 1 ] );
|
||||
}
|
||||
|
||||
// get_apilo_payment_method_id
|
||||
static public function get_apilo_payment_method_id( $payment_method_id )
|
||||
{
|
||||
global $mdb;
|
||||
return $mdb -> get( 'pp_shop_payment_methods', 'apilo_payment_type_id', [ 'id' => $payment_method_id ] );
|
||||
}
|
||||
|
||||
public function offsetExists( $offset )
|
||||
{
|
||||
return isset( $this -> $offset );
|
||||
}
|
||||
|
||||
public function offsetGet( $offset )
|
||||
{
|
||||
return $this -> $offset;
|
||||
}
|
||||
|
||||
public function offsetSet( $offset, $value )
|
||||
{
|
||||
$this -> $offset = $value;
|
||||
}
|
||||
|
||||
public function offsetUnset( $offset )
|
||||
{
|
||||
unset( $this -> $offset );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user