Browse Source

fix: if start date exist only then pass it while creating subscription

pull/2/head
Saurabh 6 years ago
parent
commit
84420b55c9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.py

+ 3
- 1
payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.py View File

@@ -132,11 +132,13 @@ class RazorpaySettings(Document):


subscription_details = { subscription_details = {
"plan_id": kwargs.get('subscription_details').get("plan_id"), "plan_id": kwargs.get('subscription_details').get("plan_id"),
"start_at": cint(start_date),
"total_count": kwargs.get('subscription_details').get("billing_frequency"), "total_count": kwargs.get('subscription_details').get("billing_frequency"),
"customer_notify": kwargs.get('subscription_details').get("customer_notify") "customer_notify": kwargs.get('subscription_details').get("customer_notify")
} }


if start_date:
subscription_details['start_at'] = cint(start_date)

if kwargs.get('addons'): if kwargs.get('addons'):
convert_rupee_to_paisa(**kwargs) convert_rupee_to_paisa(**kwargs)
subscription_details.update({ subscription_details.update({


Loading…
Cancel
Save