setup upfront amount
This commit is contained in:
parent
b9ba7c691d
commit
c802dd9701
2 changed files with 9 additions and 7 deletions
|
|
@ -34,7 +34,8 @@ Example:
|
|||
"start_date": "2018-08-30",
|
||||
"billing_period": "Month" #(Day, Week, SemiMonth, Month, Year),
|
||||
"billing_frequency": 1,
|
||||
"customer_notify": 1
|
||||
"customer_notify": 1,
|
||||
"upfront_amount": 1000
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -296,13 +297,12 @@ def create_recurring_profile(token, payerid):
|
|||
"BILLINGPERIOD": subscription_details.get("billing_period"),
|
||||
"BILLINGFREQUENCY": subscription_details.get("billing_frequency"),
|
||||
"AMT": data.get("amount"),
|
||||
"CURRENCYCODE": data.get("currency").upper()
|
||||
"CURRENCYCODE": data.get("currency").upper(),
|
||||
"INITAMT": subscription_details.get("upfront_amount")
|
||||
})
|
||||
|
||||
if subscription_details.get("start_date"):
|
||||
starts_at = subscription_details.get("start_date")
|
||||
else:
|
||||
starts_at = frappe.utils.now()
|
||||
starts_at = subscription_details.get("start_date") if subscription_details.get("start_date")\
|
||||
else frappe.utils.now()
|
||||
|
||||
params.update({
|
||||
"PROFILESTARTDATE": datetime.utcfromtimestamp(get_timestamp(starts_at)).isoformat()
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ Example:
|
|||
"start_date": "2018-08-30",
|
||||
"billing_period": "Month" #(Day, Week, Month, Year),
|
||||
"billing_frequency": 1,
|
||||
"customer_notify": 1
|
||||
"customer_notify": 1,
|
||||
"upfront_amount": 1000
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -132,6 +133,7 @@ class RazorpaySettings(Document):
|
|||
"start_at": cint(start_date),
|
||||
"total_count": kwargs.get('subscription_details').get("billing_frequency"),
|
||||
"customer_notify": kwargs.get('subscription_details').get("customer_notify"),
|
||||
"upfront_amount": kwargs.get('subscription_details').get("upfront_amount")
|
||||
}
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue