public Retail() { HpsServicesConfig config = new HpsServicesConfig { SecretApiKey = "skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw" }; batchService = new HpsBatchService(config); creditService = new HpsFluentCreditService(config, true); debitService = new HpsFluentDebitService(config, true); ebtService = new HpsFluentEbtService(config, true); giftService = new HpsFluentGiftCardService(config, true); }
public void Batch_ShouldClose() { try { var batchSvc = new HpsBatchService(_certConfig); var response = batchSvc.CloseBatch(); Assert.IsNotNull(response); } catch (HpsGatewayException e) { if (e.Code != HpsExceptionCodes.NoOpenBatch && e.Code != HpsExceptionCodes.UnknownIssuerError) { Assert.Fail("Something failed other than 'no open batch'."); } } }