UserRegistry registry = (UserRegistry) getGovernanceRegistry();
return getCurrentInvoiceOfCustomer(registry);
}
public int addPayment(Payment payment, String amount) throws Exception {
BillingManager billingManager = Util.getBillingManager();
BillingEngine billingEngine =
billingManager.getBillingEngine(StratosConstants.MULTITENANCY_SCHEDULED_TASK_ID);
Cash cashAmount = new Cash(amount);
payment.setAmount(cashAmount);
if(payment.getInvoice()!=null){
payment.setSubscriptions(billingEngine.getInvoiceSubscriptions(payment.getInvoice().getId()));
}