PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 3.21.1
GiveWP – Donation Plugin and Fundraising Platform v3.21.1
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Framework / PaymentGateways / Contracts / SubscriptionModuleInterface.php
SubscriptionModuleInterface.php
61 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Framework\PaymentGateways\Contracts;
4
5 use Give\Donations\Models\Donation;
6 use Give\Framework\PaymentGateways\Commands\GatewayCommand;
7 use Give\Framework\PaymentGateways\Commands\RedirectOffsite;
8 use Give\Subscriptions\Models\Subscription;
9
10 interface SubscriptionModuleInterface
11 {
12 /**
13 * Create a subscription with gateway
14 * Note: You can use "givewp_create_subscription_gateway_data_{$gatewayId}" filter hook to pass additional data for gateway which helps/require to process initial subscription transaction.
15 * This filter will help to add additional arguments to this function which should be optional otherwise you will get PHP fatal error.
16 *
17 * @since 2.21.2 Add third param to function to pass gateway data to process transaction
18 * @since 2.18.0
19 *
20 * @param array $gatewayData
21 *
22 * @return GatewayCommand|RedirectOffsite
23 */
24 public function createSubscription(Donation $donation, Subscription $subscription, $gatewayData);
25
26 /**
27 * Cancel subscription.
28 *
29 * @since 2.20.0
30 */
31 public function cancelSubscription(Subscription $subscription);
32
33 /**
34 * Whether the gateway supports pausing subscriptions.
35 *
36 * @since 3.17.0
37 */
38 public function canPauseSubscription(): bool;
39
40 /**
41 * Returns whether the gateway supports syncing subscriptions.
42 *
43 * @since 2.20.0
44 */
45 public function canSyncSubscriptionWithPaymentGateway(): bool;
46
47 /**
48 * Whether the gateway supports updating subscription amount.
49 *
50 * @since 2.20.0
51 */
52 public function canUpdateSubscriptionAmount(): bool;
53
54 /**
55 * Whether the gateway supports updating subscription method.
56 *
57 * @since 2.20.0
58 */
59 public function canUpdateSubscriptionPaymentMethod(): bool;
60 }
61