-
Notifications
You must be signed in to change notification settings - Fork 1
/
example-gateway-givewp.php
29 lines (26 loc) · 1.05 KB
/
example-gateway-givewp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/**
* Plugin Name: Example Gateway for GiveWP
* Description: Create your own GiveWP payment gateway using this plugin as a guide.
* Version: 0.1.0
* Requires at least: 6.0
* Requires PHP: 7.2
* Author: GiveWP - Ben Meredith
* Author URI: https://givewp.com
* Text Domain: example-give
* Domain Path: /languages
*/
// Register the gateways
add_action('givewp_register_payment_gateway', static function ($paymentGatewayRegister) {
include 'class-example-gateway-api.php';
include 'class-offsite-example-gateway.php';
include 'class-onsite-example-gateway.php';
$paymentGatewayRegister->registerGateway(ExampleGatewayOffsiteClass::class);
$paymentGatewayRegister->registerGateway(ExampleGatewayOnsiteClass::class);
});
// Register the gateways subscription module for onsite example test gateway
add_filter("givewp_gateway_onsite-example-test-gateway_subscription_module", static function () {
include 'class-onsite-example-gateway-subscription-module.php';
return ExampleGatewayOnsiteSubscriptionModuleClass::class;
}
);