percentage done
This commit is contained in:
parent
53adac2d26
commit
b29e7207a9
1 changed files with 4 additions and 5 deletions
|
|
@ -38,9 +38,6 @@ class BasePromotionHandler:
|
|||
|
||||
|
||||
class WalletPercentageHandler(BasePromotionHandler):
|
||||
payee_type = 2
|
||||
payee_uuid = ''
|
||||
|
||||
def calculate(self, **kwargs):
|
||||
base_amount = kwargs.get('base_amount', 0)
|
||||
|
||||
|
|
@ -52,13 +49,15 @@ class WalletPercentageHandler(BasePromotionHandler):
|
|||
return promotion_amount
|
||||
|
||||
def promote(self, promotion, **kwargs):
|
||||
payee_type = self.policy.get('payee_type')
|
||||
payee_uuid = self.policy.get('payee_uuid')
|
||||
|
||||
# promotion_amount = self.calculate(**kwargs)
|
||||
try:
|
||||
data = {
|
||||
"uuid": str(promotion.uuid),
|
||||
"payee_id": str(self.payee_uuid),
|
||||
"payee_type": self.payee_type,
|
||||
"payee_id": str(payee_uuid),
|
||||
"payee_type": payee_type,
|
||||
"amount": promotion.promotion_amount,
|
||||
"details": {
|
||||
'description': "for promotion",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue