public override RefundProcessPaymentResult RefundProcessPayment(RefundProcessPaymentEvaluationContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (context.Payment == null)
            {
                throw new ArgumentNullException("context.Payment");
            }

            var retVal = new RefundProcessPaymentResult();

            if (context.Payment.IsApproved && (context.Payment.PaymentStatus == PaymentStatus.Paid || context.Payment.PaymentStatus == PaymentStatus.Cancelled))
            {
                Configuration configuration = new Configuration(Country.Code.SE, Language.Code.SV, Currency.Code.SEK, Encoding.Sweden)
                {
                    Eid        = Convert.ToInt32(AppKey),
                    Secret     = AppSecret,
                    IsLiveMode = false
                };
                Api.Api api = new Api.Api(configuration);

                var result = api.CreditInvoice(context.Payment.OuterId);
            }

            return(retVal);
        }
		public override RefundProcessPaymentResult RefundProcessPayment(RefundProcessPaymentEvaluationContext context)
		{
			if (context == null)
				throw new ArgumentNullException("context");
			if (context.Payment == null)
				throw new ArgumentNullException("context.Payment");

			var retVal = new RefundProcessPaymentResult();

			if (context.Payment.IsApproved && (context.Payment.PaymentStatus == PaymentStatus.Paid || context.Payment.PaymentStatus == PaymentStatus.Cancelled))
			{
				Configuration configuration = new Configuration(Country.Code.SE, Language.Code.SV, Currency.Code.SEK, Encoding.Sweden)
				{
					Eid = Convert.ToInt32(AppKey),
					Secret = AppSecret,
					IsLiveMode = false
				};
				Api.Api api = new Api.Api(configuration);

				var result = api.CreditInvoice(context.Payment.OuterId);
			}

			return retVal;
		}
 public string CreditInvoice(string s)
 {
     return(_klarnaApi.CreditInvoice(s));
 }