Merge pull request #7771 from saurabh6790/razorpay_subscription_fix

fix: if start date exist only then pass it while creating subscription
This commit is contained in:
Saurabh 2019-06-25 15:40:32 +05:30 committed by GitHub
commit e29b6e8d53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,11 +132,13 @@ class RazorpaySettings(Document):
subscription_details = {
"plan_id": kwargs.get('subscription_details').get("plan_id"),
"start_at": cint(start_date),
"total_count": kwargs.get('subscription_details').get("billing_frequency"),
"customer_notify": kwargs.get('subscription_details').get("customer_notify")
}
if start_date:
subscription_details['start_at'] = cint(start_date)
if kwargs.get('addons'):
convert_rupee_to_paisa(**kwargs)
subscription_details.update({