woocommerce-square
/
includes
/
Framework
/
PaymentGateway
/
Integrations
/
Payment_Gateway_Integration.php
Payment_Gateway_Integration.php
3 years ago
Payment_Gateway_Integration_Pre_Orders.php
1 year ago
Payment_Gateway_Integration_Subscriptions.php
1 year ago
Payment_Gateway_Integration.php
62 lines
| 1 | <?php |
| 2 | /** |
| 3 | * WooCommerce Payment Gateway Framework |
| 4 | * |
| 5 | * This source file is subject to the GNU General Public License v3.0 |
| 6 | * that is bundled with this package in the file license.txt. |
| 7 | * It is also available through the world-wide-web at this URL: |
| 8 | * http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 or later |
| 9 | * If you did not receive a copy of the license and are unable to |
| 10 | * obtain it through the world-wide-web, please send an email |
| 11 | * to license@skyverge.com so we can send you a copy immediately. |
| 12 | * |
| 13 | * @since 3.0.0 |
| 14 | * @author WooCommerce / SkyVerge |
| 15 | * @copyright Copyright (c) 2013-2019, SkyVerge, Inc. |
| 16 | * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0 or later |
| 17 | * |
| 18 | * Modified by WooCommerce on 15 December 2021. |
| 19 | */ |
| 20 | |
| 21 | namespace WooCommerce\Square\Framework\PaymentGateway\Integrations; |
| 22 | use WooCommerce\Square\Framework\PaymentGateway\Payment_Gateway; |
| 23 | |
| 24 | defined( 'ABSPATH' ) or exit; |
| 25 | |
| 26 | /** |
| 27 | * Abstract Integration |
| 28 | * |
| 29 | * @since 3.0.0 |
| 30 | */ |
| 31 | abstract class Payment_Gateway_Integration { |
| 32 | |
| 33 | |
| 34 | /** @var Payment_Gateway direct gateway instance */ |
| 35 | protected $gateway; |
| 36 | |
| 37 | |
| 38 | /** |
| 39 | * Bootstraps the class. |
| 40 | * |
| 41 | * @since 3.0.0 |
| 42 | * |
| 43 | * @param Payment_Gateway $gateway direct gateway instance |
| 44 | */ |
| 45 | public function __construct( Payment_Gateway $gateway ) { |
| 46 | |
| 47 | $this->gateway = $gateway; |
| 48 | } |
| 49 | |
| 50 | |
| 51 | /** |
| 52 | * Return the gateway for the integration |
| 53 | * |
| 54 | * @since 3.0.0 |
| 55 | * @return Payment_Gateway |
| 56 | */ |
| 57 | public function get_gateway() { |
| 58 | |
| 59 | return $this->gateway; |
| 60 | } |
| 61 | } |
| 62 |