Esempio n. 1
0
 public TwoCheckoutResponse Stop(SaleStopServiceOptions options)
 {
     String Result = null;
     if (options.sale_id != null)
     {
         Result = TwoCheckoutUtil.Request("api/sales/detail_sale", "GET", "admin", options);
         Dictionary<string, string> Active = TwoCheckoutUtil.Active(Result);
         if (Active.ContainsKey("lineitem_id0"))
         {
             Result = TwoCheckoutUtil.StopActiveLineitems(Active);
         }
         else
         {
             Result = "{ 'response_code': 'NOTICE', 'response_message': " + "'No active recurring lineitems.'" + " }";
         }
     }
     else
     {
         Result = TwoCheckoutUtil.Request("api/sales/stop_lineitem_recurring", "POST", "admin", options);
     }
     return TwoCheckoutUtil.MapToObject<TwoCheckoutResponse>(Result);
 }