Added condition that the status should be 'active' for new subscription
This commit is contained in:
		
					parent
					
						
							
								171a463261
							
						
					
				
			
			
				commit
				
					
						fcaa5e31dd
					
				
			
		
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -481,14 +481,13 @@ class OrderConfirmationView(DetailView):
 | 
				
			||||||
                                                                      [{"plan": stripe_plan.get(
 | 
					                                                                      [{"plan": stripe_plan.get(
 | 
				
			||||||
                                                                          'response_object').stripe_plan_id}])
 | 
					                                                                          'response_object').stripe_plan_id}])
 | 
				
			||||||
        response_object = subscription_result.get('response_object')
 | 
					        response_object = subscription_result.get('response_object')
 | 
				
			||||||
        if response_object is None:
 | 
					        if response_object is None or response_object.status is not 'active':
 | 
				
			||||||
            context = {}
 | 
					            context = {}
 | 
				
			||||||
            context.update({
 | 
					            context.update({
 | 
				
			||||||
                'paymentError': response_object.get('error')
 | 
					                'paymentError': response_object.get('error')
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
            return render(request, self.payment_template_name, context)
 | 
					            return render(request, self.payment_template_name, context)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Create OpenNebulaManager
 | 
					        # Create OpenNebulaManager
 | 
				
			||||||
        manager = OpenNebulaManager(email=settings.OPENNEBULA_USERNAME,
 | 
					        manager = OpenNebulaManager(email=settings.OPENNEBULA_USERNAME,
 | 
				
			||||||
                                    password=settings.OPENNEBULA_PASSWORD)
 | 
					                                    password=settings.OPENNEBULA_PASSWORD)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue