File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -146,9 +146,14 @@ def get_return_url(
146
146
def autocomplete_with_subscription (self , payment ):
147
147
"""
148
148
Complete the payment with subscription
149
- Used by providers, that use server initiated subscription workflow
150
149
151
- Throws RedirectNeeded if there is problem with the payment that needs to be solved by user
150
+ If the provider uses workflow such that the payments are initiated from
151
+ implementer's side.
152
+ The users of django-payments will create a payment and call
153
+ Payment.autocomplete_with_subscription() right before the subscription end.
154
+
155
+ Throws RedirectNeeded if there is problem with the payment
156
+ that needs to be solved by user.
152
157
"""
153
158
raise NotImplementedError ()
154
159
Original file line number Diff line number Diff line change @@ -65,9 +65,6 @@ class TimeUnit(enum.Enum):
65
65
month = "month"
66
66
day = "day"
67
67
68
- def get_token (self ) -> str :
69
- return self .token
70
-
71
68
def set_recurrence (self , token : str , ** kwargs ):
72
69
"""
73
70
Sets token and other values associated with subscription recurrence
@@ -262,9 +259,14 @@ def is_recurring(self) -> bool:
262
259
def autocomplete_with_subscription (self ):
263
260
"""
264
261
Complete the payment with subscription
265
- Used by providers, that use server initiated subscription workflow
266
262
267
- Throws RedirectNeeded if there is problem with the payment that needs to be solved by user
263
+ If the provider uses workflow such that the payments are initiated from
264
+ implementer's side.
265
+ Call this function right before the subscription end to
266
+ make a new subscription payment.
267
+
268
+ Throws RedirectNeeded if there is problem with the payment
269
+ that needs to be solved by user
268
270
"""
269
271
provider = provider_factory (self .variant )
270
272
provider .autocomplete_with_subscription (self )
You can’t perform that action at this time.
0 commit comments