Ejemplo n.º 1
0
 public IRpcMethodResult GetAllPaymentRequests()
 {
     try
     {
         var result = PaymentRequestComponent.GetAll();
         return(Ok(result));
     }
     catch (CommonException ce)
     {
         return(Error(ce.ErrorCode, ce.Message, ce));
     }
     catch (Exception ex)
     {
         return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
     }
 }
Ejemplo n.º 2
0
 public IRpcMethodResult CreateNewPaymentRequest(string address, string tag, long amount, string comment)
 {
     try
     {
         var result = PaymentRequestComponent.Add(address, tag, comment, amount);
         return(Ok(result));
     }
     catch (CommonException ce)
     {
         return(Error(ce.ErrorCode, ce.Message, ce));
     }
     catch (Exception ex)
     {
         return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
     }
 }
Ejemplo n.º 3
0
 public IRpcMethodResult DeletePaymentRequestsByIds(string[] ids)
 {
     try
     {
         PaymentRequestComponent.DeleteByIds(ids);
         return(Ok());
     }
     catch (CommonException ce)
     {
         return(Error(ce.ErrorCode, ce.Message, ce));
     }
     catch (Exception ex)
     {
         return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
     }
 }