public PayPalAPIHelperTest()
        {
            _orderGroupCalculatorMock = new Mock <IOrderGroupCalculator>();
            _localizationServiceMock  = new Mock <LocalizationService>(new object[] { null });

            _subject = new PayPalAPIHelper(_orderGroupCalculatorMock.Object, _localizationServiceMock.Object, new PayPalCurrencies(new SiteContext()));
        }
 private static void HandleErrorSandbox(PayPalAPIHelper.PayPalSandboxWS.AbstractResponseType resp)
 {
     if (resp.Errors != null && resp.Errors.Length > 0)
     {
         string errMessage = "Exception(s) occured when calling PayPal. First exception: " + resp.Errors[0].LongMessage;
         // Optional : Write to Log the error
         throw new Exception(errMessage);
     }
 }