← All changes
|
src/Framework/PaymentGateways/SubscriptionModule.php
+10
-0
2.30.0
→
4.16.9
View file →
| @@ -3,9 +3,11 @@ | ||
| 3 | 3 | namespace Give\Framework\PaymentGateways; |
| 4 | 4 | |
| 5 | 5 | use Give\Framework\PaymentGateways\Contracts\Subscription\SubscriptionAmountEditable; |
| 6 | 6 | use Give\Framework\PaymentGateways\Contracts\Subscription\SubscriptionDashboardLinkable; |
| 7 | +use Give\Framework\PaymentGateways\Contracts\Subscription\SubscriptionPausable; | |
| 7 | 8 | use Give\Framework\PaymentGateways\Contracts\Subscription\SubscriptionPaymentMethodEditable; |
| 9 | +use Give\Framework\PaymentGateways\Contracts\Subscription\SubscriptionResumable; | |
| 8 | 10 | use Give\Framework\PaymentGateways\Contracts\Subscription\SubscriptionTransactionsSynchronizable; |
| 9 | 11 | use Give\Framework\PaymentGateways\Contracts\SubscriptionModuleInterface; |
| 10 | 12 | use Give\Framework\PaymentGateways\Traits\HasRouteMethods; |
| 11 | 13 | |
| @@ -28,8 +30,16 @@ | ||
| 28 | 30 | */ |
| 29 | 31 | public function setGateway(PaymentGateway $gateway) |
| 30 | 32 | { |
| 31 | 33 | $this->gateway = $gateway; |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * @since 3.17.0 | |
| 38 | + */ | |
| 39 | + public function canPauseSubscription(): bool | |
| 40 | + { | |
| 41 | + return $this instanceof SubscriptionPausable; | |
| 32 | 42 | } |
| 33 | 43 | |
| 34 | 44 | /** |
| 35 | 45 | * @inheritDoc |