Example #1
0
        private void HandleChargebackAmountNotification(ChargebackAmountNotification notification)
        {
            NotificationSerialNumber = notification.serialnumber;

            string providerName = GoogleCheckoutLog.GetProviderNameFromOrderNumber(notification.googleordernumber);

            if (providerName.Length > 0)
            {
                GCheckoutNotificationHandlerProvider provider
                    = GCheckoutNotificationManager.Providers[providerName];

                if (provider != null)
                {
                    provider.HandleChargebackAmountNotification(RequestXml, notification);

                    return;
                }
            }

            // if no provider found just log it
            SiteSettings siteSettings = CacheHelper.GetCurrentSiteSettings();

            GoogleCheckoutLog gLog = new GoogleCheckoutLog();

            gLog.SiteGuid         = siteSettings.SiteGuid;
            gLog.NotificationType = "ChargebackAmountNotification";
            gLog.RawResponse      = RequestXml;
            gLog.SerialNumber     = notification.serialnumber;
            gLog.OrderNumber      = notification.googleordernumber;
            gLog.GTimestamp       = notification.timestamp;
            gLog.LatestChargeback = notification.latestchargebackamount.Value;
            gLog.TotalChargeback  = notification.totalchargebackamount.Value;

            gLog.Save();
        }