auto recurring testing phase 20

This commit is contained in:
rizwanisready
2024-08-02 15:38:25 +05:30
parent 1711af39bc
commit 4397ac52b8

View File

@@ -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