diff --git a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCapture.cs b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCapture.cs index a7d6c08..8bbecd3 100644 --- a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCapture.cs +++ b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCapture.cs @@ -256,5 +256,37 @@ public void SimpleCaptureWithPassengerTransportData()///12.26 var response = _cnp.Capture(capture); Assert.AreEqual("Approved", response.message); } + + [Test] + public void SimpleCaptureWithForeignRetailerIndicator()///12.31 + { + var capture = new capture + { + id = "1", + cnpTxnId = 123456000, + orderId = "defaultOrderId", + amount = 106, + lodgingInfo = new lodgingInfo + { + bookingID = "BID1234555", + passengerName = "Rohan Sharma", + propertyAddress = new propertyAddress + { + name = "Xpress", + city = "Pune", + region = "WES", + country = countryTypeEnum.IN + }, + travelPackageIndicator = travelPackageIndicatorEnum.AirlineReservation, + smokingPreference = "N", + numberOfRooms = 1, + tollFreePhoneNumber = "1234567890" + }, + foreignRetailerIndicator= foreignRetailerIndicatorEnum.F + + }; + var response = _cnp.Capture(capture); + Assert.AreEqual("Approved", response.message); + } } } diff --git a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCaptureGivenAuth.cs b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCaptureGivenAuth.cs index 917646d..989ba22 100644 --- a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCaptureGivenAuth.cs +++ b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestCaptureGivenAuth.cs @@ -496,5 +496,49 @@ public void SimpleCaptureGivenAuthWithPassengerTransportData()///12.26 var response = _cnp.CaptureGivenAuth(capturegivenauth); Assert.AreEqual("Approved", response.message); } + + [Test] + public void SimpleCaptureGivenAuthWithForeignRetailerIndicator()///12.31 + { + var capturegivenauth = new captureGivenAuth + { + id = "1", + amount = 1176, + orderId = "123777774", + crypto = false, + authInformation = new authInformation + { + authDate = new DateTime(2023, 4, 9), + authCode = "543216", + authAmount = 6532, + }, + orderSource = orderSourceType.ecommerce, + card = new cardType + { + type = methodOfPaymentTypeEnum.VI, + number = "4100000000000000", + expDate = "1210", + }, + lodgingInfo = new lodgingInfo + { + bookingID = "BID23455", + passengerName = "Pratik Jaiswal", + propertyAddress = new propertyAddress + { + name = "Godrej", + city = "Pune", + region = "WES", + country = countryTypeEnum.IN + }, + travelPackageIndicator = travelPackageIndicatorEnum.AirlineReservation, + smokingPreference = "N", + numberOfRooms = 1, + tollFreePhoneNumber = "1234567890" + }, + foreignRetailerIndicator = foreignRetailerIndicatorEnum.F + }; + var response = _cnp.CaptureGivenAuth(capturegivenauth); + Assert.AreEqual("Approved", response.message); + } } } diff --git a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestForceCapture.cs b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestForceCapture.cs index 1e1411e..5260acd 100644 --- a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestForceCapture.cs +++ b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestForceCapture.cs @@ -294,5 +294,45 @@ public void SimpleForceCaptureWithPassengerTransportData()///12.26 var response = _cnp.ForceCapture(forcecapture); Assert.AreEqual("Approved", response.message); } + + [Test] + public void SimpleForceCaptureWithForeignRetailerIndicator()///12.31 + { + var forcecapture = new forceCapture + { + id = "1", + amount = 177, + orderId = "1234455", + orderSource = orderSourceType.ecommerce, + processingType = processingType.accountFunding, + businessIndicator = businessIndicatorEnum.consumerBillPayment, + card = new cardType + { + type = methodOfPaymentTypeEnum.VI, + number = "4100000000000001", + expDate = "1210" + }, + merchantCategoryCode = "2222", + lodgingInfo = new lodgingInfo + { + bookingID = "BID1234556", + passengerName = "Sumit Patil", + propertyAddress = new propertyAddress + { + name = "Xpress", + city = "Pune", + region = "WES", + country = countryTypeEnum.IN + }, + travelPackageIndicator = travelPackageIndicatorEnum.AirlineReservation, + smokingPreference = "N", + numberOfRooms = 1, + tollFreePhoneNumber = "1234567777" + }, + foreignRetailerIndicator = foreignRetailerIndicatorEnum.F + }; + var response = _cnp.ForceCapture(forcecapture); + Assert.AreEqual("Approved", response.message); + } } } diff --git a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestSale.cs b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestSale.cs index a4ba965..1f86d27 100644 --- a/CnpSdkForNet/CnpSdkForNetTest/Functional/TestSale.cs +++ b/CnpSdkForNet/CnpSdkForNetTest/Functional/TestSale.cs @@ -918,5 +918,42 @@ public void SimpleSaleWithSellerInfo() //12.29 var responseObj = _cnp.Sale(saleObj); StringAssert.AreEqualIgnoringCase("Approved", responseObj.message); } + + [Test] + public void SimpleSaleWithForeignRetailerIndicator()///12.31() + { + var saleObj = new sale + { + id = "1", + amount = 7878, + cnpTxnId = 123456, + orderId = "5355354", + orderSource = orderSourceType.ecommerce, + sofort = new sofortType + { + preferredLanguage = countryTypeEnum.US + }, + lodgingInfo = new lodgingInfo + { + bookingID = "BID1234566", + passengerName = "Jitendra Verma", + propertyAddress = new propertyAddress + { + name = "Godrej", + city = "Pune", + region = "WES", + country = countryTypeEnum.IN + }, + travelPackageIndicator = travelPackageIndicatorEnum.AirlineReservation, + smokingPreference = "N", + numberOfRooms = 1, + tollFreePhoneNumber = "1234567890" + }, + foreignRetailerIndicator = foreignRetailerIndicatorEnum.F + }; + saleObj.lodgingInfo.lodgingCharges.Add(new lodgingCharge() { name = lodgingExtraChargeEnum.GIFTSHOP }); + var responseObj = _cnp.Sale(saleObj); + StringAssert.AreEqualIgnoringCase("Approved", responseObj.message); + } } }