Explorar el Código

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

pull/2/head
Saurabh hace 6 años
padre
commit
84420b55c9
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.py

+ 3
- 1
payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.py Ver fichero

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


Cargando…
Cancelar
Guardar