Пример #1
0
 public static void  CallBack(PaymentCallback callback, RenderContext context)
 {
     foreach (var item in PaymentContainer.CallBackWorkers)
     {
         item.Process(callback, context);
     }
 }
Пример #2
0
 public void Process(PaymentCallback callback, RenderContext context)
 {
     if (context.WebSite != null && context.WebSite.OrganizationId != default(Guid))
     {
         // TODO Process local payment.
         var sitedb = context.WebSite.SiteDb();
         sitedb.GetSiteRepository <SitePaymentCallBackRepository>().AddOrUpdate(callback);
         if (callback.IsPaid)
         {
             // TODO: do the payment ok action...
         }
         else if (callback.IsCancel)
         {
             // TODO: do the cancel action.
         }
     }
 }