PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.2.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.2.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / classes / abstract-payment-gateways.php

abstract-payment-gateways.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.2.0, at includes/classes/abstract-payment-gateways.php

50 lines 816 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace StoreEngine\Classes;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 die();
7 }
8
9 /**
10 * @deprecated
11 */
12 abstract class AbstractPaymentGateways {
13
14
15 protected static $gateways = [];
16
17
18 protected $id;
19
20 protected $title;
21
22
23 protected $description;
24
25 public function __construct( $id, $title, $description ) {
26 $this->id = $id;
27 $this->title = $title;
28 $this->description = $description;
29 self::$gateways[ $this->id ] = $this;
30 }
31
32 abstract public function process_payment( Order $order );
33
34 /**
35 * Get payment gateway instance.
36 *
37 * @param string $id
38 *
39 * @return AbstractPaymentGateways|null
40 */
41 public static function get_gateway( $id ) {
42 return self::$gateways[ $id ] ?? null;
43 }
44
45
46 public static function get_gateways() {
47 return self::$gateways;
48 }
49 }
50