auto recurring testing phase 20
This commit is contained in:
@@ -136,6 +136,7 @@ class WebhookService:
|
||||
|
||||
def get_coupon(self):
|
||||
coupon_code = self.charge_data["metadata"].get("couponCode")
|
||||
print("get_coupon:coupon_code: ", coupon_code)
|
||||
if coupon_code:
|
||||
try:
|
||||
return Coupon.objects.get(coupon_code=coupon_code)
|
||||
@@ -275,6 +276,7 @@ class SubscriptionService:
|
||||
if coupon:
|
||||
coupon.no_of_redeems += 1
|
||||
coupon.save()
|
||||
print("Coupon Saved Successfully!!!")
|
||||
self.principal_subscription = principal_subscription
|
||||
return principal_subscription
|
||||
|
||||
|
||||
Reference in New Issue
Block a user