PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Modules/PaymentMethods/Core/AbstractSubscriptionModule.php +30 -0 1.3.26 → 1.6.5 View file →
@@ -84,12 +84,42 @@
84 84 {
85 85 // cancel the subscription on the vendor side, implement on the child class
86 86 }
87 87
88 + /**
89 + * Pull the subscription's remote state and repair the local rows to match.
90 + *
91 + * Implementations may declare extra OPTIONAL parameters for pre-fetched
92 + * vendor payloads (e.g. PayPal accepts the already-fetched subscription and
93 + * transaction list so a webhook costs one remote pull). Callers typed
94 + * against this base class must pass only the subscription model.
95 + *
96 + * @param Subscription $subscriptionModel
97 + * @return Subscription|\WP_Error
98 + */
88 99 public function reSyncSubscriptionFromRemote(Subscription $subscriptionModel)
89 100 {
90 101 return new \WP_Error(
91 102 'not_implemented',
92 103 esc_html__('Re-sync subscription from remote is not implemented for this payment method.', 'fluent-cart')
104 + );
105 + }
106 +
107 + /**
108 + * Read-only lookup of a candidate vendor subscription id, used by the admin
109 + * "Edit Vendor IDs" verify action before the id is saved. Writes nothing.
110 + * Only reached when the gateway declares the verify_vendor_ids feature.
111 + *
112 + * $args carries both candidate ids because some gateways nest the
113 + * subscription under its customer.
114 + *
115 + * @param array $args vendor_subscription_id, vendor_customer_id
116 + * @return array|\WP_Error normalized id/status/amount/currency/customer_id/next_billing_date
117 + */
118 + public function verifyVendorSubscription(array $args, $mode = 'current')
119 + {
120 + return new \WP_Error(
121 + 'not_implemented',
122 + esc_html__('Vendor subscription lookup is not implemented for this payment method.', 'fluent-cart')
93 123 );
94 124 }
95 125 }