From a362740cd615bd5c52ac46e1689e0cd8edf5e46f Mon Sep 17 00:00:00 2001 From: Surya Prakash Nayak Date: Tue, 24 Sep 2024 15:44:02 +0530 Subject: [PATCH 1/6] Merchant boarding Sample codes --- .../Data/MerchantBoardingConfiguration.java | 57 ++++ .../MerchantBoarding/CreateRegistration.java | 230 +++++++++++++ .../MerchantBoardingAmexDirect.java | 248 +++++++++++++++ .../MerchantBoardingBarclays.java | 255 +++++++++++++++ .../MerchantBoardingBinLookup.java | 135 ++++++++ .../MerchantBoarding/MerchantBoardingCUP.java | 220 +++++++++++++ .../MerchantBoardingEFTPOS.java | 174 ++++++++++ .../MerchantBoardingFDIGlobal.java | 214 +++++++++++++ .../MerchantBoarding/MerchantBoardingGPX.java | 299 +++++++++++++++++ .../MerchantBoardingSmartFDC.java | 232 ++++++++++++++ .../MerchantBoardingTSYS.java | 275 ++++++++++++++++ .../MerchantBoarding/MerchantBoardingVPC.java | 301 ++++++++++++++++++ src/main/resources/apitester00.p12 | Bin 0 -> 4956 bytes 13 files changed, 2640 insertions(+) create mode 100644 src/main/java/Data/MerchantBoardingConfiguration.java create mode 100644 src/main/java/samples/MerchantBoarding/CreateRegistration.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java create mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java create mode 100644 src/main/resources/apitester00.p12 diff --git a/src/main/java/Data/MerchantBoardingConfiguration.java b/src/main/java/Data/MerchantBoardingConfiguration.java new file mode 100644 index 0000000..6ff20bc --- /dev/null +++ b/src/main/java/Data/MerchantBoardingConfiguration.java @@ -0,0 +1,57 @@ +package Data; + +import java.util.Properties; + +public class MerchantBoardingConfiguration { + + public static Properties getMerchantBoardingDetails() { + Properties props = new Properties(); + + // HTTP_Signature = http_signature and JWT = jwt + props.setProperty("authenticationType", "jwt"); + props.setProperty("merchantID", "apitester00"); + props.setProperty("runEnvironment", "apitest.cybersource.com"); + props.setProperty("requestJsonPath", "src/main/resources/request.json"); + + // MetaKey Parameters + props.setProperty("portfolioID", ""); + props.setProperty("useMetaKey", "false"); + + // JWT Parameters + props.setProperty("keyAlias", "apitester00");//merchid + props.setProperty("keyPass", "Ap!C38tp12@");//pwd + props.setProperty("keyFileName", "apitester00");//filename + + // P12 key path. Enter the folder path where the .p12 file is located. + + props.setProperty("keysDirectory", "src/main/resources"); + // HTTP Parameters + props.setProperty("merchantKeyId", "");//blank + props.setProperty("merchantsecretKey", "");//blank + // Logging to be enabled or not. + props.setProperty("enableLog", "true"); + // Log directory Path + props.setProperty("logDirectory", "log"); + props.setProperty("logFilename", "cybs"); + + // Log file size in KB + props.setProperty("logMaximumSize", "5M"); + + // OAuth related properties. + props.setProperty("enableClientCert", "true"); + props.setProperty("clientCertDirectory", "src/main/resources"); + props.setProperty("clientCertFile", "apitester00"); + props.setProperty("clientCertPassword", "Ap!C38tp12@"); + props.setProperty("clientId", "apitester00"); + props.setProperty("clientSecret", "Ap!C38tp12@"); + + /* + PEM Key file path for decoding JWE Response Enter the folder path where the .pem file is located. + It is optional property, require adding only during JWE decryption. + */ + // props.setProperty("jwePEMFileDirectory", "src/main/resources/NetworkTokenCert.pem"); + + return props; + + } +} diff --git a/src/main/java/samples/MerchantBoarding/CreateRegistration.java b/src/main/java/samples/MerchantBoarding/CreateRegistration.java new file mode 100644 index 0000000..443b224 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/CreateRegistration.java @@ -0,0 +1,230 @@ +package samples.MerchantBoarding; + +import Api.CustomerApi; +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.*; + +public class CreateRegistration { + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsPayerAuthentication payerAuthentication=new PaymentsProductsPayerAuthentication(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation.enabled(true); + payerAuthentication.subscriptionInformation(subscriptionInformation); + + PaymentsProductsPayerAuthenticationConfigurationInformation configurationInformation=new PaymentsProductsPayerAuthenticationConfigurationInformation(); + PayerAuthConfig configurations=new PayerAuthConfig(); + PayerAuthConfigCardTypes cardTypes=new PayerAuthConfigCardTypes(); + PayerAuthConfigCardTypesVerifiedByVisa verifiedByVisa=new PayerAuthConfigCardTypesVerifiedByVisa(); + List currencies=new ArrayList<>(); + PayerAuthConfigCardTypesVerifiedByVisaCurrencies currency1=new PayerAuthConfigCardTypesVerifiedByVisaCurrencies(); + List currencyCodes=new ArrayList<>(); + currencyCodes.add("ALL"); + currency1.currencyCodes(currencyCodes); + currency1.acquirerId("469216"); + currency1.processorMerchantId("678855"); + + currencies.add(currency1); + verifiedByVisa.currencies(currencies); + cardTypes.verifiedByVisa(verifiedByVisa); + configurations.cardTypes(cardTypes); + configurationInformation.configurations(configurations); + payerAuthentication.configurationInformation(configurationInformation); + payments.payerAuthentication(payerAuthentication); + + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation2=new PaymentsProductsCardProcessingSubscriptionInformation(); + subscriptionInformation2.enabled(true); + Map features=new HashMap<>(); + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj.enabled(true); + features.put("cardNotPresent",obj); + subscriptionInformation2.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation2); + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation2=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations2=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("1234"); + CardProcessingConfigCommonMerchantDescriptorInformation merchantDescriptorInformation=new CardProcessingConfigCommonMerchantDescriptorInformation(); + + merchantDescriptorInformation.name("r4ef"); + merchantDescriptorInformation.city("Bellevue"); + merchantDescriptorInformation.country("US"); + merchantDescriptorInformation.phone("4255547845"); + merchantDescriptorInformation.state("WA"); + merchantDescriptorInformation.street("StreetName"); + merchantDescriptorInformation.zip("98007"); + common.merchantDescriptorInformation(merchantDescriptorInformation); + + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj2=new CardProcessingConfigCommonProcessors(); + obj2.merchantId("123456789101"); + obj2.terminalId("1231"); + obj2.industryCode(CardProcessingConfigCommonProcessors.IndustryCodeEnum.D); + obj2.vitalNumber("71234567"); + obj2.merchantBinNumber("123456"); + obj2.merchantLocationNumber("00001"); + obj2.storeID("1234"); + obj2.settlementCurrency("USD"); + processors.put("tsys",obj2); + common.processors(processors); + configurations2.common(common); + + CardProcessingConfigFeatures features2=new CardProcessingConfigFeatures(); + CardProcessingConfigFeaturesCardNotPresent cardNotPresent=new CardProcessingConfigFeaturesCardNotPresent(); + + cardNotPresent.visaStraightThroughProcessingOnly(true); + features2.cardNotPresent(cardNotPresent); + configurations2.features(features2); + configurationInformation2.configurations(configurations2); + cardProcessing.configurationInformation(configurationInformation2); + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation3=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation3.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation3); + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation4=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation4.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation4); + payments.customerInvoicing(customerInvoicing); + + PaymentsProductsPayouts payouts=new PaymentsProductsPayouts(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation5.enabled(true); + payouts.subscriptionInformation(subscriptionInformation5); + payments.payouts(payouts); + + selectedProducts.payments(payments); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation6=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation6.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation6); + commerceSolutions.tokenManagement(tokenManagement); + selectedProducts.commerceSolutions(commerceSolutions); + + RiskProducts risk=new RiskProducts(); + RiskProductsFraudManagementEssentials fraudManagementEssentials=new RiskProductsFraudManagementEssentials(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation7=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation7.enabled(true); + fraudManagementEssentials.subscriptionInformation(subscriptionInformation7); + + RiskProductsFraudManagementEssentialsConfigurationInformation configurationInformation5=new RiskProductsFraudManagementEssentialsConfigurationInformation(); + + UUID templateId = UUID.fromString("E4EDB280-9DAC-4698-9EB9-9434D40FF60C"); + configurationInformation5.templateId(templateId); + fraudManagementEssentials.configurationInformation(configurationInformation5); + risk.fraudManagementEssentials(fraudManagementEssentials); + + selectedProducts.risk(risk); + + productInformation.selectedProducts(selectedProducts); + + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java new file mode 100644 index 0000000..307e254 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java @@ -0,0 +1,248 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.*; + +public class MerchantBoardingAmexDirect { + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("1799"); + CardProcessingConfigCommonMerchantDescriptorInformation merchantDescriptorInformation=new CardProcessingConfigCommonMerchantDescriptorInformation(); + merchantDescriptorInformation.city("Cupertino"); + merchantDescriptorInformation.country("USA"); + merchantDescriptorInformation.name("Mer name"); + merchantDescriptorInformation.phone("8885554444"); + merchantDescriptorInformation.zip("94043"); + merchantDescriptorInformation.state("CA"); + merchantDescriptorInformation.street("mer street"); + merchantDescriptorInformation.url("www.test.com"); + + common.merchantDescriptorInformation(merchantDescriptorInformation); + + common.subMerchantId("123457"); + common.subMerchantBusinessName("bus name"); + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj2=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + obj2.acquirer(acquirer); + Map currencies=new HashMap<>(); + CardProcessingConfigCommonCurrencies1 obj3=new CardProcessingConfigCommonCurrencies1(); + obj3.enabled(true); + obj3.enabledCardPresent(false); + obj3.enabledCardPresent(true); + obj3.terminalId(""); + obj3.serviceEnablementNumber("1234567890"); + currencies.put("AED",obj3); + currencies.put("FJD",obj3); + currencies.put("USD",obj3); + + + obj2.currencies(currencies); + + Map paymentTypes=new HashMap<>(); + CardProcessingConfigCommonPaymentTypes obj4=new CardProcessingConfigCommonPaymentTypes(); + obj4.enabled(true); + paymentTypes.put("AMERICAN_EXPRESS",obj4); + + obj2.paymentTypes(paymentTypes); + obj2.allowMultipleBills(false); + obj2.avsFormat("basic"); + obj2.batchGroup("amexdirect_vme_default"); + obj2.enableAutoAuthReversalAfterVoid(false); + obj2.enhancedData("disabled"); + obj2.enableLevel2(false); + obj2.amexTransactionAdviceAddendum1("amex123"); + processors.put("acquirer",obj2); + + common.processors(processors); + configurations.common(common); + + CardProcessingConfigFeatures features2=new CardProcessingConfigFeatures(); + CardProcessingConfigFeaturesCardNotPresent cardNotPresent=new CardProcessingConfigFeaturesCardNotPresent(); + + Map processors3=new HashMap<>(); + CardProcessingConfigFeaturesCardNotPresentProcessors obj5=new CardProcessingConfigFeaturesCardNotPresentProcessors(); + obj5.relaxAddressVerificationSystem(true); + obj5.relaxAddressVerificationSystemAllowExpiredCard(true); + obj5.relaxAddressVerificationSystemAllowZipWithoutCountry(false); + processors3.put("amexdirect",obj5); + + cardNotPresent.processors(processors3); + features2.cardNotPresent(cardNotPresent); + configurations.features(features2); + configurationInformation.configurations(configurations); + UUID templateId = UUID.fromString("2B80A3C7-5A39-4CC3-9882-AC4A828D3646"); + configurationInformation.templateId(templateId); + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation2=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation2.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation2); + + PaymentsProductsVirtualTerminalConfigurationInformation configurationInformation3=new PaymentsProductsVirtualTerminalConfigurationInformation(); + + UUID templateId2 = UUID.fromString("9FA1BB94-5119-48D3-B2E5-A81FD3C657B5"); + configurationInformation3.templateId(templateId2); + virtualTerminal.configurationInformation(configurationInformation3); + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation6=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation6.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation6); + payments.customerInvoicing(customerInvoicing); + selectedProducts.payments(payments); + + RiskProducts risk=new RiskProducts(); + selectedProducts.risk(risk); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation7=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation7.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation7); + CommerceSolutionsProductsTokenManagementConfigurationInformation configurationInformation4=new CommerceSolutionsProductsTokenManagementConfigurationInformation(); + + UUID templateId3 = UUID.fromString("D62BEE20-DCFD-4AA2-8723-BA3725958ABA"); + configurationInformation4.templateId(templateId3); + tokenManagement.configurationInformation(configurationInformation4); + commerceSolutions.tokenManagement(tokenManagement); + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation8=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation8.enabled(true); + transactionSearch.subscriptionInformation(subscriptionInformation8); + + valueAddedServices.transactionSearch(transactionSearch); + PaymentsProductsTax reporting=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation9=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation9.enabled(true); + reporting.subscriptionInformation(subscriptionInformation9); + valueAddedServices.reporting(reporting); + + selectedProducts.valueAddedServices(valueAddedServices); + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java new file mode 100644 index 0000000..accb5e1 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java @@ -0,0 +1,255 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.*; + +public class MerchantBoardingBarclays { + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + subscriptionInformation.enabled(true); + + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + + common.merchantCategoryCode("5999"); + common.defaultAuthTypeCode(CardProcessingConfigCommon.DefaultAuthTypeCodeEnum.FINAL); + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj2=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + obj2.acquirer(acquirer); + Map currencies=new HashMap<>(); + CardProcessingConfigCommonCurrencies1 obj3=new CardProcessingConfigCommonCurrencies1(); + obj3.enabled(true); + obj3.enabledCardPresent(false); + obj3.enabledCardNotPresent(true); + obj3.merchantId("1234"); + obj3.serviceEnablementNumber(""); + List terminalIds=new ArrayList<>(); + + terminalIds.add("12351245"); + obj3.terminalIds(terminalIds); + + + currencies.put("AED",obj3); + currencies.put("USD",obj3); + + obj2.currencies(currencies); + + Map paymentTypes=new HashMap<>(); + + CardProcessingConfigCommonPaymentTypes obj4=new CardProcessingConfigCommonPaymentTypes(); + obj4.enabled(true); + paymentTypes.put("MASTERCARD",obj4); + paymentTypes.put("VISA",obj4); + + obj2.paymentTypes(paymentTypes); + + obj2.batchGroup("barclays2_16"); + obj2.quasiCash(false); + obj2.enhancedData("disabled"); + obj2.merchantId("124555"); + obj2.enableMultiCurrencyProcessing("false"); + + processors.put("barclays2",obj2); + + common.processors(processors); + configurations.common(common); + CardProcessingConfigFeatures features3=new CardProcessingConfigFeatures(); + + CardProcessingConfigFeaturesCardNotPresent cardNotPresent=new CardProcessingConfigFeaturesCardNotPresent(); + + Map processors4=new HashMap<>(); + CardProcessingConfigFeaturesCardNotPresentProcessors obj6=new CardProcessingConfigFeaturesCardNotPresentProcessors(); + + CardProcessingConfigFeaturesCardNotPresentPayouts payouts=new CardProcessingConfigFeaturesCardNotPresentPayouts(); + + payouts.merchantId("1233"); + payouts.terminalId("1244"); + obj6.payouts(payouts); + processors4.put("barclays2",obj6); + cardNotPresent.processors(processors4); + features3.cardNotPresent(cardNotPresent); + + configurations.features(features3); + + configurationInformation.configurations(configurations); + + UUID templateId = UUID.fromString("0A413572-1995-483C-9F48-FCBE4D0B2E86"); + configurationInformation.templateId(templateId); + cardProcessing.configurationInformation(configurationInformation); + + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation2=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation2.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation2); + + PaymentsProductsVirtualTerminalConfigurationInformation configurationInformation2=new PaymentsProductsVirtualTerminalConfigurationInformation(); + + UUID templateId3 = UUID.fromString("E4EDB280-9DAC-4698-9EB9-9434D40FF60C"); + configurationInformation2.templateId(templateId3); + virtualTerminal.configurationInformation(configurationInformation2); + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation3=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation3.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation3); + + payments.customerInvoicing(customerInvoicing); + + selectedProducts.payments(payments); + + RiskProducts risk2=new RiskProducts(); + selectedProducts.risk(risk2); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation5.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation5); + + CommerceSolutionsProductsTokenManagementConfigurationInformation configurationInformation5=new CommerceSolutionsProductsTokenManagementConfigurationInformation(); + + UUID templateId4 = UUID.fromString("D62BEE20-DCFD-4AA2-8723-BA3725958ABA"); + configurationInformation5.templateId(templateId4); + tokenManagement.configurationInformation(configurationInformation5); + commerceSolutions.tokenManagement(tokenManagement); + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + + PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation6=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation6.enabled(true); + transactionSearch.subscriptionInformation(subscriptionInformation6); + valueAddedServices.transactionSearch(transactionSearch); + + PaymentsProductsTax reporting=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation7=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation7.enabled(true); + reporting.subscriptionInformation(subscriptionInformation7); + valueAddedServices.reporting(reporting); + selectedProducts.valueAddedServices(valueAddedServices); + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java new file mode 100644 index 0000000..60d2e57 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java @@ -0,0 +1,135 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class MerchantBoardingBinLookup { + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + selectedProducts.payments(payments); + + RiskProducts risk=new RiskProducts(); + selectedProducts.risk(risk); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + CommerceSolutionsProductsBinLookup binLookup=new CommerceSolutionsProductsBinLookup(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation.enabled(true); + binLookup.subscriptionInformation(subscriptionInformation); + CommerceSolutionsProductsBinLookupConfigurationInformation configurationInformation=new CommerceSolutionsProductsBinLookupConfigurationInformation(); + + + CommerceSolutionsProductsBinLookupConfigurationInformationConfigurations configurations=new CommerceSolutionsProductsBinLookupConfigurationInformationConfigurations(); + + configurations.isPayoutOptionsEnabled(false); + configurations.isAccountPrefixEnabled(true); + + configurationInformation.configurations(configurations); + binLookup.configurationInformation(configurationInformation); + + commerceSolutions.binLookup(binLookup); + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + selectedProducts.valueAddedServices(valueAddedServices); + + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java new file mode 100644 index 0000000..f199de6 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java @@ -0,0 +1,220 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.*; + +public class MerchantBoardingCUP { + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("1799"); + Map processors=new HashMap<>(); + + CardProcessingConfigCommonProcessors obj2=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + acquirer.countryCode("344_hongkong"); + acquirer.institutionId("22344"); + obj2.acquirer(acquirer); + + Map currencies=new HashMap<>(); + + CardProcessingConfigCommonCurrencies1 obj3=new CardProcessingConfigCommonCurrencies1(); + obj3.enabled(true); + obj3.enabledCardPresent(false); + obj3.enabledCardNotPresent(true); + obj3.merchantId("112233"); + obj3.terminalId("11224455"); + obj3.serviceEnablementNumber(""); + currencies.put("HKD",obj3); + currencies.put("AUD",obj3); + currencies.put("USD",obj3); + + obj2.currencies(currencies); + + Map paymentTypes=new HashMap<>(); + + CardProcessingConfigCommonPaymentTypes obj4=new CardProcessingConfigCommonPaymentTypes(); + obj4.enabled(true); + paymentTypes.put("CUP",obj4); + obj2.paymentTypes(paymentTypes); + + processors.put("CUP",obj2); + common.processors(processors); + configurations.common(common); + configurationInformation.configurations(configurations); + + UUID templateId = UUID.fromString("1D8BC41A-F04E-4133-87C8-D89D1806106F"); + configurationInformation.templateId(templateId); + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation2=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation2.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation2); + + PaymentsProductsVirtualTerminalConfigurationInformation configurationInformation2=new PaymentsProductsVirtualTerminalConfigurationInformation(); + + UUID templateId2 = UUID.fromString("9FA1BB94-5119-48D3-B2E5-A81FD3C657B5"); + configurationInformation2.templateId(templateId2); + + virtualTerminal.configurationInformation(configurationInformation2); + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation3=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation3.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation3); + payments.customerInvoicing(customerInvoicing); + selectedProducts.payments(payments); + + RiskProducts risk=new RiskProducts(); + selectedProducts.risk(risk); + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation4=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation4.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation4); + + CommerceSolutionsProductsTokenManagementConfigurationInformation configurationInformation3=new CommerceSolutionsProductsTokenManagementConfigurationInformation(); + + UUID templateId3 = UUID.fromString("9FA1BB94-5119-48D3-B2E5-A81FD3C657B5"); + configurationInformation3.templateId(templateId3); + tokenManagement.configurationInformation(configurationInformation3); + commerceSolutions.tokenManagement(tokenManagement); + + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + + + PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation5.enabled(true); + transactionSearch.subscriptionInformation(subscriptionInformation5); + valueAddedServices.transactionSearch(transactionSearch); + + PaymentsProductsTax reporting=new PaymentsProductsTax(); + reporting.subscriptionInformation(subscriptionInformation5); + valueAddedServices.reporting(reporting); + selectedProducts.valueAddedServices(valueAddedServices); + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java new file mode 100644 index 0000000..0ceebd4 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java @@ -0,0 +1,174 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class MerchantBoardingEFTPOS { + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + obj1.enabled(false); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("5999"); + common.preferCobadgedSecondaryBrand(true); + + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + acquirer.countryCode("344_hongkong"); + acquirer.institutionId("22344"); + + obj5.acquirer(acquirer); + + Map currencies=new HashMap<>(); + + + CardProcessingConfigCommonCurrencies1 obj6=new CardProcessingConfigCommonCurrencies1(); + obj6.enabled(true); + obj6.merchantId("12345612344"); + obj6.terminalId("12121212"); + currencies.put("AUD",obj6); + obj5.currencies(currencies); + + Map paymentTypes=new HashMap<>(); + CardProcessingConfigCommonPaymentTypes obj7=new CardProcessingConfigCommonPaymentTypes(); + obj7.enabled(true); + paymentTypes.put("EFTPOS",obj7); + + obj5.paymentTypes(paymentTypes); + + obj5.enableCVVResponseIndicator(true); + obj5.enableLeastCostRouting(true); + obj5.merchantTier("000"); + + processors.put("EFTPOS",obj5); + + common.processors(processors); + configurations.common(common); + + CardProcessingConfigFeatures features2=new CardProcessingConfigFeatures(); + + configurations.features(features2); + configurationInformation.configurations(configurations); + UUID templateId = UUID.fromString("1F9B7F6E-F0DB-44C8-BF8E-5013E34C0F87"); + configurationInformation.templateId(templateId); + + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + selectedProducts.payments(payments); + + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java new file mode 100644 index 0000000..f9fe677 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java @@ -0,0 +1,214 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class MerchantBoardingFDIGlobal { + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("0742"); + common.defaultAuthTypeCode(CardProcessingConfigCommon.DefaultAuthTypeCodeEnum.PRE); + common.processLevel3Data("ignored"); + common.masterCardAssignedId("123456789"); + common.enablePartialAuth(true); + + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + obj5.acquirer(acquirer); + + Map currencies=new HashMap<>(); + + + CardProcessingConfigCommonCurrencies1 obj6=new CardProcessingConfigCommonCurrencies1(); + obj6.enabled(true); + obj6.enabledCardPresent(false); + obj6.enabledCardNotPresent(true); + obj6.merchantId("123456789mer"); + obj6.terminalId("12345ter"); + obj6.serviceEnablementNumber(""); + currencies.put("CHF",obj6); + currencies.put("HRK",obj6); + currencies.put("ERN",obj6); + currencies.put("USD",obj6); + + obj5.currencies(currencies); + + Map paymentTypes=new HashMap<>(); + CardProcessingConfigCommonPaymentTypes obj7=new CardProcessingConfigCommonPaymentTypes(); + obj7.enabled(true); + paymentTypes.put("MASTERCARD",obj7); + paymentTypes.put("DISCOVER",obj7); + paymentTypes.put("JCB",obj7); + paymentTypes.put("VISA",obj7); + paymentTypes.put("AMERICAN_EXPRESS",obj7); + paymentTypes.put("DINERS_CLUB",obj7); + paymentTypes.put("CUP",obj7); + Map currencies2=new HashMap<>(); + CardProcessingConfigCommonCurrencies ob1=new CardProcessingConfigCommonCurrencies(); + ob1.enabled(true); + ob1.terminalId("pint123"); + ob1.merchantId("pinm123"); + ob1.serviceEnablementNumber(null); + + currencies2.put("USD",ob1); + obj7.currencies(currencies2); + paymentTypes.put("PIN_DEBIT",obj7); + + obj5.paymentTypes(paymentTypes); + obj5.batchGroup("fdiglobal_vme_default"); + obj5.enhancedData("disabled"); + obj5.enablePosNetworkSwitching(true); + obj5.enableTransactionReferenceNumber(true); + + processors.put("fdiglobal",obj5); + + common.processors(processors); + configurations.common(common); + + CardProcessingConfigFeatures features2=new CardProcessingConfigFeatures(); + + CardProcessingConfigFeaturesCardNotPresent cardNotPresent=new CardProcessingConfigFeaturesCardNotPresent(); + + Map processors3=new HashMap<>(); + CardProcessingConfigFeaturesCardNotPresentProcessors obj9=new CardProcessingConfigFeaturesCardNotPresentProcessors(); + + obj9.relaxAddressVerificationSystem(true); + obj9.relaxAddressVerificationSystemAllowExpiredCard(true); + obj9.relaxAddressVerificationSystemAllowZipWithoutCountry(true); + + processors3.put("fdiglobal",obj9); + cardNotPresent.processors(processors3); + + cardNotPresent.visaStraightThroughProcessingOnly(true); + cardNotPresent.amexTransactionAdviceAddendum1("amex12345"); + cardNotPresent.ignoreAddressVerificationSystem(true); + features2.cardNotPresent(cardNotPresent); + + configurations.features(features2); + configurationInformation.configurations(configurations); + UUID templateId = UUID.fromString("685A1FC9-3CEC-454C-9D8A-19205529CE45"); + configurationInformation.templateId(templateId); + + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + selectedProducts.payments(payments); + + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java new file mode 100644 index 0000000..286b40c --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java @@ -0,0 +1,299 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class MerchantBoardingGPX { + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("1799"); + common.defaultAuthTypeCode(CardProcessingConfigCommon.DefaultAuthTypeCodeEnum.FINAL); + common.foodAndConsumerServiceId("1456"); + common.masterCardAssignedId("4567"); + common.sicCode("1345"); + common.enablePartialAuth(false); + common.allowCapturesGreaterThanAuthorizations(false); + common.enableDuplicateMerchantReferenceNumberBlocking(false); + common.creditCardRefundLimitPercent("2"); + common.businessCenterCreditCardRefundLimitPercent("3"); + + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + acquirer.countryCode("840_usa"); + acquirer.fileDestinationBin("123456"); + acquirer.interbankCardAssociationId("1256"); + acquirer.institutionId("113366"); + acquirer.discoverInstitutionId("1567"); + + obj5.acquirer(acquirer); + + Map currencies=new HashMap<>(); + + + CardProcessingConfigCommonCurrencies1 obj6=new CardProcessingConfigCommonCurrencies1(); + obj6.enabled(true); + obj6.enabledCardPresent(false); + obj6.enabledCardNotPresent(true); + obj6.terminalId(""); + obj6.serviceEnablementNumber(""); + + currencies.put("AED",obj6); + + obj5.currencies(currencies); + + Map paymentTypes=new HashMap<>(); + CardProcessingConfigCommonPaymentTypes obj7=new CardProcessingConfigCommonPaymentTypes(); + obj7.enabled(true); + + paymentTypes.put("MASTERCARD",obj7); + paymentTypes.put("DISCOVER",obj7); + paymentTypes.put("JCB",obj7); + paymentTypes.put("VISA",obj7); + paymentTypes.put("DINERS_CLUB",obj7); + paymentTypes.put("PIN_DEBIT",obj7); + + obj5.paymentTypes(paymentTypes); + + obj5.allowMultipleBills(true); + obj5.batchGroup("gpx"); + obj5.businessApplicationId("AA"); + obj5.enhancedData("disabled"); + obj5.fireSafetyIndicator(false); + obj5.abaNumber("1122445566778"); + obj5.merchantVerificationValue("234"); + obj5.quasiCash(false); + obj5.merchantId("112233"); + obj5.terminalId("112244"); + + + processors.put("gpx",obj5); + + common.processors(processors); + + configurations.common(common); + + CardProcessingConfigFeatures features2=new CardProcessingConfigFeatures(); + + CardProcessingConfigFeaturesCardNotPresent cardNotPresent=new CardProcessingConfigFeaturesCardNotPresent(); + + Map processors3=new HashMap<>(); + CardProcessingConfigFeaturesCardNotPresentProcessors obj9=new CardProcessingConfigFeaturesCardNotPresentProcessors(); + + obj9.enableEmsTransactionRiskScore(true); + obj9.relaxAddressVerificationSystem(true); + obj9.relaxAddressVerificationSystemAllowExpiredCard(true); + obj9.relaxAddressVerificationSystemAllowZipWithoutCountry(true); + + processors3.put("gpx",obj9); + cardNotPresent.processors(processors3); + + cardNotPresent.visaStraightThroughProcessingOnly(false); + cardNotPresent.ignoreAddressVerificationSystem(false); + + features2.cardNotPresent(cardNotPresent); + + CardProcessingConfigFeaturesCardPresent cardPresent=new CardProcessingConfigFeaturesCardPresent(); + + Map processors2=new HashMap<>(); + CardProcessingConfigFeaturesCardPresentProcessors obj4=new CardProcessingConfigFeaturesCardPresentProcessors(); + + obj4.financialInstitutionId("1347"); + obj4.pinDebitNetworkOrder("23456"); + obj4.pinDebitReimbursementCode("43567"); + obj4.defaultPointOfSaleTerminalId("5432"); + + processors2.put("gpx",obj4); + + cardPresent.processors(processors2); + + cardPresent.enableTerminalIdLookup(false); + features2.cardPresent(cardPresent); + + configurations.features(features2); + configurationInformation.configurations(configurations); + UUID templateId = UUID.fromString("D2A7C000-5FCA-493A-AD21-469744A19EEA"); + configurationInformation.templateId(templateId); + + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation5.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation5); + + PaymentsProductsVirtualTerminalConfigurationInformation configurationInformation5=new PaymentsProductsVirtualTerminalConfigurationInformation(); + UUID templateId2 = UUID.fromString("9FA1BB94-5119-48D3-B2E5-A81FD3C657B5"); + configurationInformation5.templateId(templateId2); + virtualTerminal.configurationInformation(configurationInformation5); + + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation6=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation6.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation6); + payments.customerInvoicing(customerInvoicing); + + selectedProducts.payments(payments); + + RiskProducts risk=new RiskProducts(); + + selectedProducts.risk(risk); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation7=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation7.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation7); + + CommerceSolutionsProductsTokenManagementConfigurationInformation configurationInformation7=new CommerceSolutionsProductsTokenManagementConfigurationInformation(); + + UUID templateId3 = UUID.fromString("D62BEE20-DCFD-4AA2-8723-BA3725958ABA"); + configurationInformation7.templateId(templateId3); + tokenManagement.configurationInformation(configurationInformation7); + + commerceSolutions.tokenManagement(tokenManagement); + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + + PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation9=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation9.enabled(true); + transactionSearch.subscriptionInformation(subscriptionInformation9); + valueAddedServices.transactionSearch(transactionSearch); + + PaymentsProductsTax reporting=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation3=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation3.enabled(true); + reporting.subscriptionInformation(subscriptionInformation3); + valueAddedServices.reporting(reporting); + + selectedProducts.valueAddedServices(valueAddedServices); + + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java new file mode 100644 index 0000000..9d8c707 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java @@ -0,0 +1,232 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class MerchantBoardingSmartFDC { + + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("1799"); + common.defaultAuthTypeCode(CardProcessingConfigCommon.DefaultAuthTypeCodeEnum.FINAL); + common.enablePartialAuth(true); + + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + obj5.acquirer(acquirer); + + + Map paymentTypes=new HashMap<>(); + CardProcessingConfigCommonPaymentTypes obj7=new CardProcessingConfigCommonPaymentTypes(); + obj7.enabled(true); + + paymentTypes.put("MASTERCARD",obj7); + paymentTypes.put("DISCOVER",obj7); + paymentTypes.put("JCB",obj7); + paymentTypes.put("VISA",obj7); + paymentTypes.put("DINERS_CLUB",obj7); + paymentTypes.put("AMERICAN_EXPRESS",obj7); + + obj5.paymentTypes(paymentTypes); + + + obj5.batchGroup("smartfdc_00"); + obj5.merchantId("00001234567"); + obj5.terminalId("00007654321"); + + + processors.put("smartfdc",obj5); + + common.processors(processors); + + configurations.common(common); + + + configurationInformation.configurations(configurations); + + UUID templateId = UUID.fromString("3173DA78-A71E-405B-B79C-928C1A9C6AB2"); + configurationInformation.templateId(templateId); + + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation5.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation5); + + PaymentsProductsVirtualTerminalConfigurationInformation configurationInformation5=new PaymentsProductsVirtualTerminalConfigurationInformation(); + UUID templateId2 = UUID.fromString("9FA1BB94-5119-48D3-B2E5-A81FD3C657B5"); + configurationInformation5.templateId(templateId2); + virtualTerminal.configurationInformation(configurationInformation5); + + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation6=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation6.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation6); + payments.customerInvoicing(customerInvoicing); + + selectedProducts.payments(payments); + + RiskProducts risk=new RiskProducts(); + + selectedProducts.risk(risk); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation7=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation7.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation7); + + CommerceSolutionsProductsTokenManagementConfigurationInformation configurationInformation7=new CommerceSolutionsProductsTokenManagementConfigurationInformation(); + + UUID templateId3 = UUID.fromString("D62BEE20-DCFD-4AA2-8723-BA3725958ABA"); + configurationInformation7.templateId(templateId3); + tokenManagement.configurationInformation(configurationInformation7); + + commerceSolutions.tokenManagement(tokenManagement); + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + + PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation9=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation9.enabled(true); + transactionSearch.subscriptionInformation(subscriptionInformation9); + valueAddedServices.transactionSearch(transactionSearch); + + PaymentsProductsTax reporting=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation3=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation3.enabled(true); + reporting.subscriptionInformation(subscriptionInformation3); + valueAddedServices.reporting(reporting); + + selectedProducts.valueAddedServices(valueAddedServices); + + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java new file mode 100644 index 0000000..ea7ace2 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java @@ -0,0 +1,275 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class MerchantBoardingTSYS { + + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("5999"); + common.processLevel3Data("ignored"); + common.defaultAuthTypeCode(CardProcessingConfigCommon.DefaultAuthTypeCodeEnum.FINAL); + common.enablePartialAuth(false); + common.amexVendorCode("2233"); + + CardProcessingConfigCommonMerchantDescriptorInformation merchantDescriptorInformation=new CardProcessingConfigCommonMerchantDescriptorInformation(); + + merchantDescriptorInformation.city("cpertino"); + merchantDescriptorInformation.country("USA"); + merchantDescriptorInformation.name("kumar"); + merchantDescriptorInformation.state("CA"); + merchantDescriptorInformation.phone("888555333"); + merchantDescriptorInformation.zip("94043"); + merchantDescriptorInformation.street("steet1"); + + common.merchantDescriptorInformation(merchantDescriptorInformation); + + + + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + obj5.acquirer(acquirer); + + Map currencies=new HashMap<>(); + + + CardProcessingConfigCommonCurrencies1 obj6=new CardProcessingConfigCommonCurrencies1(); + obj6.enabled(true); + obj6.enabledCardPresent(true); + obj6.enabledCardNotPresent(true); + obj6.terminalId("1234"); + obj6.serviceEnablementNumber(""); + + currencies.put("CAD",obj6); + + obj5.currencies(currencies); + + Map paymentTypes=new HashMap<>(); + CardProcessingConfigCommonPaymentTypes obj7=new CardProcessingConfigCommonPaymentTypes(); + obj7.enabled(true); + + paymentTypes.put("MASTERCARD",obj7); + paymentTypes.put("VISA",obj7); + + obj5.paymentTypes(paymentTypes); + + obj5.bankNumber("234576"); + obj5.chainNumber("223344"); + obj5.batchGroup("vital_1130"); + obj5.enhancedData("disabled"); + obj5.industryCode(CardProcessingConfigCommonProcessors.IndustryCodeEnum.D); + obj5.merchantBinNumber("765576"); + obj5.merchantId("834215123456"); + obj5.merchantLocationNumber("00001"); + obj5.storeID("2563"); + obj5.vitalNumber("71234567"); + obj5.quasiCash(false); + obj5.sendAmexLevel2Data(null); + obj5.softDescriptorType("1 - trans_ref_no"); + obj5.travelAgencyCode("2356"); + obj5.travelAgencyName("Agent"); + + processors.put("tsys",obj5); + + common.processors(processors); + + configurations.common(common); + + CardProcessingConfigFeatures features2=new CardProcessingConfigFeatures(); + + CardProcessingConfigFeaturesCardNotPresent cardNotPresent=new CardProcessingConfigFeaturesCardNotPresent(); + + cardNotPresent.visaStraightThroughProcessingOnly(false); + cardNotPresent.amexTransactionAdviceAddendum1(null); + + features2.cardNotPresent(cardNotPresent); + + + configurations.features(features2); + configurationInformation.configurations(configurations); + UUID templateId = UUID.fromString("818048AD-2860-4D2D-BC39-2447654628A1"); + configurationInformation.templateId(templateId); + + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation5.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation5); + + PaymentsProductsVirtualTerminalConfigurationInformation configurationInformation5=new PaymentsProductsVirtualTerminalConfigurationInformation(); + UUID templateId2 = UUID.fromString("9FA1BB94-5119-48D3-B2E5-A81FD3C657B5"); + configurationInformation5.templateId(templateId2); + virtualTerminal.configurationInformation(configurationInformation5); + + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation6=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation6.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation6); + payments.customerInvoicing(customerInvoicing); + + selectedProducts.payments(payments); + + RiskProducts risk=new RiskProducts(); + + selectedProducts.risk(risk); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation7=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation7.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation7); + + CommerceSolutionsProductsTokenManagementConfigurationInformation configurationInformation7=new CommerceSolutionsProductsTokenManagementConfigurationInformation(); + + UUID templateId3 = UUID.fromString("D62BEE20-DCFD-4AA2-8723-BA3725958ABA"); + configurationInformation7.templateId(templateId3); + tokenManagement.configurationInformation(configurationInformation7); + + commerceSolutions.tokenManagement(tokenManagement); + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + + PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation9=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation9.enabled(true); + transactionSearch.subscriptionInformation(subscriptionInformation9); + valueAddedServices.transactionSearch(transactionSearch); + + PaymentsProductsTax reporting=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation3=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation3.enabled(true); + reporting.subscriptionInformation(subscriptionInformation3); + valueAddedServices.reporting(reporting); + + selectedProducts.valueAddedServices(valueAddedServices); + + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java new file mode 100644 index 0000000..2bf6e69 --- /dev/null +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java @@ -0,0 +1,301 @@ +package samples.MerchantBoarding; + +import Api.MerchantBoardingApi; +import Data.MerchantBoardingConfiguration; +import Invokers.ApiClient; +import Invokers.ApiException; +import Model.*; +import com.cybersource.authsdk.core.MerchantConfig; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; + +public class MerchantBoardingVPC { + + private static String responseCode = null; + private static String status = null; + private static Properties merchantProp; + + public static void WriteLogAudit(int status) { + String filename = MethodHandles.lookup().lookupClass().getSimpleName(); + System.out.println("[Sample Code Testing] [" + filename + "] " + status); + } + + public static void main(String args[]) throws Exception { + // Accept required parameters from args[] and pass to run. + run(); + + } + + + public static InlineResponse2012 run() { + System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); + + Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); + organizationInformation.parentOrganizationId("apitester00"); + organizationInformation.type(Boardingv1registrationsOrganizationInformation.TypeEnum.MERCHANT); + organizationInformation.configurable(true); + + Boardingv1registrationsOrganizationInformationBusinessInformation businessInformation=new Boardingv1registrationsOrganizationInformationBusinessInformation(); + businessInformation.name("StuartWickedFastEatz"); + Boardingv1registrationsOrganizationInformationBusinessInformationAddress address=new Boardingv1registrationsOrganizationInformationBusinessInformationAddress(); + address.country("US"); + address.address1("123456 SandMarket"); + address.locality("ORMOND BEACH"); + address.administrativeArea("FL"); + address.postalCode("32176"); + businessInformation.address(address); + businessInformation.websiteUrl("https://www.StuartWickedEats.com"); + businessInformation.phoneNumber("6574567813"); + + Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact businessContact=new Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact(); + businessContact.firstName("Stuart"); + businessContact.lastName("Stuart"); + businessContact.phoneNumber("6574567813"); + businessContact.email("svc_email_bt@corpdev.visa.com"); + businessInformation.businessContact(businessContact); + businessInformation.merchantCategoryCode("5999"); + organizationInformation.businessInformation(businessInformation); + + reqObj.organizationInformation(organizationInformation); + + + Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); + Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); + + PaymentsProducts payments=new PaymentsProducts(); + PaymentsProductsCardProcessing cardProcessing=new PaymentsProductsCardProcessing(); + PaymentsProductsCardProcessingSubscriptionInformation subscriptionInformation=new PaymentsProductsCardProcessingSubscriptionInformation(); + + subscriptionInformation.enabled(true); + Map features=new HashMap<>(); + + PaymentsProductsCardProcessingSubscriptionInformationFeatures obj1=new PaymentsProductsCardProcessingSubscriptionInformationFeatures(); + obj1.enabled(true); + features.put("cardNotPresent",obj1); + features.put("cardPresent",obj1); + subscriptionInformation.features(features); + cardProcessing.subscriptionInformation(subscriptionInformation); + + + PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); + + CardProcessingConfig configurations=new CardProcessingConfig(); + CardProcessingConfigCommon common=new CardProcessingConfigCommon(); + common.merchantCategoryCode("1799"); + common.defaultAuthTypeCode(CardProcessingConfigCommon.DefaultAuthTypeCodeEnum.FINAL); + common.masterCardAssignedId(null); + common.sicCode(null); + common.enablePartialAuth(false); + + common.enableInterchangeOptimization(false); + common.enableSplitShipment(false); + common.visaDelegatedAuthenticationId("123457"); + + //TBC + common.domesticMerchantId("123458"); + // + common.creditCardRefundLimitPercent("2"); + common.businessCenterCreditCardRefundLimitPercent("3"); + common.allowCapturesGreaterThanAuthorizations(false); + common.enableDuplicateMerchantReferenceNumberBlocking(false); + + + Map processors=new HashMap<>(); + CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); + CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); + + acquirer.countryCode("840_usa"); + acquirer.fileDestinationBin("444500"); + acquirer.interbankCardAssociationId("3684"); + acquirer.institutionId("444571"); + acquirer.discoverInstitutionId(null); + + + obj5.acquirer(acquirer); + + + Map paymentTypes=new HashMap<>(); + CardProcessingConfigCommonPaymentTypes obj7=new CardProcessingConfigCommonPaymentTypes(); + obj7.enabled(true); + + Map currencies=new HashMap<>(); + CardProcessingConfigCommonCurrencies obj2=new CardProcessingConfigCommonCurrencies(); + obj2.enabled(true); + obj2.enabledCardPresent(false); + obj2.enabledCardNotPresent(true); + obj2.terminalId("113366"); + obj2.merchantId("113355"); + obj2.serviceEnablementNumber(null); + + currencies.put("CAD",obj2); + currencies.put("USD",obj2); + + + obj7.currencies(currencies); + + paymentTypes.put("VISA",obj7); + + obj5.paymentTypes(paymentTypes); + + obj5.acquirerMerchantId("123456"); + obj5.allowMultipleBills(false); + obj5.batchGroup("vdcvantiv_est_00"); + obj5.businessApplicationId("AA"); + obj5.enableAutoAuthReversalAfterVoid(true); + obj5.enableExpresspayPanTranslation(null); + obj5.merchantVerificationValue("123456"); + obj5.quasiCash(false); + obj5.enableTransactionReferenceNumber(true); + + processors.put("VPC",obj5); + + common.processors(processors); + + configurations.common(common); + + CardProcessingConfigFeatures features2=new CardProcessingConfigFeatures(); + + CardProcessingConfigFeaturesCardNotPresent cardNotPresent=new CardProcessingConfigFeaturesCardNotPresent(); + + Map processors3=new HashMap<>(); + CardProcessingConfigFeaturesCardNotPresentProcessors obj9=new CardProcessingConfigFeaturesCardNotPresentProcessors(); + + obj9.enableEmsTransactionRiskScore(null); + obj9.relaxAddressVerificationSystem(true); + obj9.relaxAddressVerificationSystemAllowExpiredCard(true); + obj9.relaxAddressVerificationSystemAllowZipWithoutCountry(true); + + processors3.put("VPC",obj9); + cardNotPresent.processors(processors3); + + cardNotPresent.visaStraightThroughProcessingOnly(false); + cardNotPresent.ignoreAddressVerificationSystem(true); + + features2.cardNotPresent(cardNotPresent); + + CardProcessingConfigFeaturesCardPresent cardPresent=new CardProcessingConfigFeaturesCardPresent(); + + Map processors2=new HashMap<>(); + CardProcessingConfigFeaturesCardPresentProcessors obj4=new CardProcessingConfigFeaturesCardPresentProcessors(); + + + obj4.defaultPointOfSaleTerminalId("223355"); + obj4.defaultPointOfSaleTerminalId("223344"); + + processors2.put("VPC",obj4); + + cardPresent.processors(processors2); + + cardPresent.enableTerminalIdLookup(false); + features2.cardPresent(cardPresent); + + configurations.features(features2); + configurationInformation.configurations(configurations); + + UUID templateId = UUID.fromString("D671CE88-2F09-469C-A1B4-52C47812F792"); + configurationInformation.templateId(templateId); + + cardProcessing.configurationInformation(configurationInformation); + payments.cardProcessing(cardProcessing); + + PaymentsProductsVirtualTerminal virtualTerminal=new PaymentsProductsVirtualTerminal(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation5.enabled(true); + virtualTerminal.subscriptionInformation(subscriptionInformation5); + + PaymentsProductsVirtualTerminalConfigurationInformation configurationInformation5=new PaymentsProductsVirtualTerminalConfigurationInformation(); + UUID templateId2 = UUID.fromString("9FA1BB94-5119-48D3-B2E5-A81FD3C657B5"); + configurationInformation5.templateId(templateId2); + virtualTerminal.configurationInformation(configurationInformation5); + + payments.virtualTerminal(virtualTerminal); + + PaymentsProductsTax customerInvoicing=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation6=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + + subscriptionInformation6.enabled(true); + customerInvoicing.subscriptionInformation(subscriptionInformation6); + payments.customerInvoicing(customerInvoicing); + + selectedProducts.payments(payments); + + RiskProducts risk=new RiskProducts(); + + selectedProducts.risk(risk); + + CommerceSolutionsProducts commerceSolutions=new CommerceSolutionsProducts(); + + CommerceSolutionsProductsTokenManagement tokenManagement=new CommerceSolutionsProductsTokenManagement(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation7=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation7.enabled(true); + tokenManagement.subscriptionInformation(subscriptionInformation7); + + CommerceSolutionsProductsTokenManagementConfigurationInformation configurationInformation7=new CommerceSolutionsProductsTokenManagementConfigurationInformation(); + + UUID templateId3 = UUID.fromString("D62BEE20-DCFD-4AA2-8723-BA3725958ABA"); + configurationInformation7.templateId(templateId3); + tokenManagement.configurationInformation(configurationInformation7); + + commerceSolutions.tokenManagement(tokenManagement); + selectedProducts.commerceSolutions(commerceSolutions); + + ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); + + PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); + + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation9=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation9.enabled(true); + transactionSearch.subscriptionInformation(subscriptionInformation9); + valueAddedServices.transactionSearch(transactionSearch); + + PaymentsProductsTax reporting=new PaymentsProductsTax(); + PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation3=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); + subscriptionInformation3.enabled(true); + reporting.subscriptionInformation(subscriptionInformation3); + valueAddedServices.reporting(reporting); + + selectedProducts.valueAddedServices(valueAddedServices); + + productInformation.selectedProducts(selectedProducts); + reqObj.productInformation(productInformation); + + System.out.println("Req obj created..........."); + + + InlineResponse2012 result=null; + + try { + merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + ApiClient apiClient = new ApiClient(); + MerchantConfig merchantConfig = new MerchantConfig(merchantProp); + apiClient.merchantConfig = merchantConfig; + + MerchantBoardingApi apiInstance = new MerchantBoardingApi(apiClient); + result = apiInstance.postRegistration(reqObj, null); + + responseCode = apiClient.responseCode; + status = apiClient.status; + System.out.println("ResponseCode :" + responseCode); + System.out.println("ResponseMessage :" + status); + System.out.println(result); + WriteLogAudit(Integer.parseInt(responseCode)); + } catch (ApiException e) { + e.printStackTrace(); + WriteLogAudit(e.getCode()); + System.out.println("Msg.."+e.getMessage()+" Respbody.."+e.getResponseBody()+" cause.."+e.getCause()); + } catch (Exception e) { + e.printStackTrace(); + } + + + + return result; + } +} diff --git a/src/main/resources/apitester00.p12 b/src/main/resources/apitester00.p12 new file mode 100644 index 0000000000000000000000000000000000000000..69db0e91a834f00e36037de50ed4b4fb2cf09ccc GIT binary patch literal 4956 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 literal 0 HcmV?d00001 From 72d4271ad98f8a3b9677b4f77f7ac0c16f7c8da4 Mon Sep 17 00:00:00 2001 From: Surya Prakash Nayak Date: Wed, 25 Sep 2024 13:17:03 +0530 Subject: [PATCH 2/6] Added/Removed comments as per PR review.p12 file deleted --- src/main/java/Data/Configuration.java | 10 +++++----- .../java/Data/MerchantBoardingConfiguration.java | 2 +- .../MerchantBoarding/CreateRegistration.java | 7 +++---- .../MerchantBoardingAmexDirect.java | 11 ++++------- .../MerchantBoardingBarclays.java | 9 ++++----- .../MerchantBoardingBinLookup.java | 8 +++----- .../MerchantBoarding/MerchantBoardingCUP.java | 8 +++----- .../MerchantBoarding/MerchantBoardingEFTPOS.java | 8 +++----- .../MerchantBoardingFDIGlobal.java | 9 +++------ .../MerchantBoarding/MerchantBoardingGPX.java | 9 +++------ .../MerchantBoardingSmartFDC.java | 12 +++--------- .../MerchantBoarding/MerchantBoardingTSYS.java | 10 +++------- .../MerchantBoarding/MerchantBoardingVPC.java | 7 +++---- src/main/resources/apitester00.p12 | Bin 4956 -> 0 bytes 14 files changed, 41 insertions(+), 69 deletions(-) delete mode 100644 src/main/resources/apitester00.p12 diff --git a/src/main/java/Data/Configuration.java b/src/main/java/Data/Configuration.java index f7b6dc9..f2e9d9e 100644 --- a/src/main/java/Data/Configuration.java +++ b/src/main/java/Data/Configuration.java @@ -17,16 +17,16 @@ public static Properties getMerchantDetails() { props.setProperty("useMetaKey", "false"); // JWT Parameters - props.setProperty("keyAlias", "testrest"); - props.setProperty("keyPass", "testrest"); - props.setProperty("keyFileName", "testrest"); + props.setProperty("keyAlias", "testrest");//merchid + props.setProperty("keyPass", "testrest");//pwd + props.setProperty("keyFileName", "testrest");//filename // P12 key path. Enter the folder path where the .p12 file is located. props.setProperty("keysDirectory", "src/main/resources"); // HTTP Parameters - props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda"); - props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="); + props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda");//blank + props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE=");//blank // Logging to be enabled or not. props.setProperty("enableLog", "true"); // Log directory Path diff --git a/src/main/java/Data/MerchantBoardingConfiguration.java b/src/main/java/Data/MerchantBoardingConfiguration.java index 6ff20bc..d2b4a2b 100644 --- a/src/main/java/Data/MerchantBoardingConfiguration.java +++ b/src/main/java/Data/MerchantBoardingConfiguration.java @@ -4,7 +4,7 @@ public class MerchantBoardingConfiguration { - public static Properties getMerchantBoardingDetails() { + public static Properties getMerchantConfigForBoardingAPI() { Properties props = new Properties(); // HTTP_Signature = http_signature and JWT = jwt diff --git a/src/main/java/samples/MerchantBoarding/CreateRegistration.java b/src/main/java/samples/MerchantBoarding/CreateRegistration.java index 443b224..55306ba 100644 --- a/src/main/java/samples/MerchantBoarding/CreateRegistration.java +++ b/src/main/java/samples/MerchantBoarding/CreateRegistration.java @@ -30,7 +30,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -195,13 +195,12 @@ public static InlineResponse2012 run() { reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java index 307e254..412c77f 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java @@ -30,7 +30,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -115,7 +115,6 @@ public static InlineResponse2012 run() { currencies.put("FJD",obj3); currencies.put("USD",obj3); - obj2.currencies(currencies); Map paymentTypes=new HashMap<>(); @@ -210,16 +209,14 @@ public static InlineResponse2012 run() { valueAddedServices.reporting(reporting); selectedProducts.valueAddedServices(valueAddedServices); - productInformation.selectedProducts(selectedProducts); + productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java index accb5e1..85248fd 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java @@ -30,7 +30,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -217,16 +217,15 @@ public static InlineResponse2012 run() { reporting.subscriptionInformation(subscriptionInformation7); valueAddedServices.reporting(reporting); selectedProducts.valueAddedServices(valueAddedServices); - productInformation.selectedProducts(selectedProducts); + productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java index 60d2e57..6ba1f86 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java @@ -33,7 +33,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -82,7 +82,6 @@ public static InlineResponse2012 run() { binLookup.subscriptionInformation(subscriptionInformation); CommerceSolutionsProductsBinLookupConfigurationInformation configurationInformation=new CommerceSolutionsProductsBinLookupConfigurationInformation(); - CommerceSolutionsProductsBinLookupConfigurationInformationConfigurations configurations=new CommerceSolutionsProductsBinLookupConfigurationInformationConfigurations(); configurations.isPayoutOptionsEnabled(false); @@ -100,13 +99,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java index f199de6..ca6ca8b 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java @@ -29,7 +29,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -171,7 +171,6 @@ public static InlineResponse2012 run() { ValueAddedServicesProducts valueAddedServices=new ValueAddedServicesProducts(); - PaymentsProductsTax transactionSearch=new PaymentsProductsTax(); PaymentsProductsPayerAuthenticationSubscriptionInformation subscriptionInformation5=new PaymentsProductsPayerAuthenticationSubscriptionInformation(); subscriptionInformation5.enabled(true); @@ -185,13 +184,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java index 0ceebd4..495e10b 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java @@ -33,7 +33,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -64,7 +64,6 @@ public static InlineResponse2012 run() { reqObj.organizationInformation(organizationInformation); - Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); @@ -139,13 +138,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java index f9fe677..944a4cc 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java @@ -33,7 +33,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -64,7 +64,6 @@ public static InlineResponse2012 run() { reqObj.organizationInformation(organizationInformation); - Boardingv1registrationsProductInformation productInformation=new Boardingv1registrationsProductInformation(); Boardingv1registrationsProductInformationSelectedProducts selectedProducts=new Boardingv1registrationsProductInformationSelectedProducts(); @@ -92,7 +91,6 @@ public static InlineResponse2012 run() { common.masterCardAssignedId("123456789"); common.enablePartialAuth(true); - Map processors=new HashMap<>(); CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); @@ -179,13 +177,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java index 286b40c..fe9510f 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java @@ -33,7 +33,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -113,7 +113,6 @@ public static InlineResponse2012 run() { Map currencies=new HashMap<>(); - CardProcessingConfigCommonCurrencies1 obj6=new CardProcessingConfigCommonCurrencies1(); obj6.enabled(true); obj6.enabledCardPresent(false); @@ -149,7 +148,6 @@ public static InlineResponse2012 run() { obj5.merchantId("112233"); obj5.terminalId("112244"); - processors.put("gpx",obj5); common.processors(processors); @@ -264,13 +262,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java index 9d8c707..ef544fd 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java @@ -34,7 +34,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -83,7 +83,6 @@ public static InlineResponse2012 run() { subscriptionInformation.features(features); cardProcessing.subscriptionInformation(subscriptionInformation); - PaymentsProductsCardProcessingConfigurationInformation configurationInformation=new PaymentsProductsCardProcessingConfigurationInformation(); CardProcessingConfig configurations=new CardProcessingConfig(); @@ -92,14 +91,12 @@ public static InlineResponse2012 run() { common.defaultAuthTypeCode(CardProcessingConfigCommon.DefaultAuthTypeCodeEnum.FINAL); common.enablePartialAuth(true); - Map processors=new HashMap<>(); CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); obj5.acquirer(acquirer); - Map paymentTypes=new HashMap<>(); CardProcessingConfigCommonPaymentTypes obj7=new CardProcessingConfigCommonPaymentTypes(); obj7.enabled(true); @@ -113,12 +110,10 @@ public static InlineResponse2012 run() { obj5.paymentTypes(paymentTypes); - obj5.batchGroup("smartfdc_00"); obj5.merchantId("00001234567"); obj5.terminalId("00007654321"); - processors.put("smartfdc",obj5); common.processors(processors); @@ -197,13 +192,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java index ea7ace2..7e40d28 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java @@ -33,7 +33,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -105,9 +105,6 @@ public static InlineResponse2012 run() { common.merchantDescriptorInformation(merchantDescriptorInformation); - - - Map processors=new HashMap<>(); CardProcessingConfigCommonProcessors obj5=new CardProcessingConfigCommonProcessors(); CardProcessingConfigCommonAcquirer acquirer=new CardProcessingConfigCommonAcquirer(); @@ -240,13 +237,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java b/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java index 2bf6e69..7e596bb 100644 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java +++ b/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java @@ -32,7 +32,7 @@ public static void main(String args[]) throws Exception { public static InlineResponse2012 run() { - System.out.println("Inside Merchant boarding..........."); + PostRegistrationBody reqObj=new PostRegistrationBody(); Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); @@ -266,13 +266,12 @@ public static InlineResponse2012 run() { productInformation.selectedProducts(selectedProducts); reqObj.productInformation(productInformation); - System.out.println("Req obj created..........."); - InlineResponse2012 result=null; try { - merchantProp = MerchantBoardingConfiguration.getMerchantBoardingDetails(); + //Boarding API support only JWT Auth Type + merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); ApiClient apiClient = new ApiClient(); MerchantConfig merchantConfig = new MerchantConfig(merchantProp); apiClient.merchantConfig = merchantConfig; diff --git a/src/main/resources/apitester00.p12 b/src/main/resources/apitester00.p12 deleted file mode 100644 index 69db0e91a834f00e36037de50ed4b4fb2cf09ccc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4956 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 From d9a2790c5745fd364042655c542aae7402ca2cda Mon Sep 17 00:00:00 2001 From: Surya Prakash Nayak Date: Thu, 26 Sep 2024 14:10:02 +0530 Subject: [PATCH 3/6] Config file for Merchant Boarding API modified --- src/main/java/Data/MerchantBoardingConfiguration.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/Data/MerchantBoardingConfiguration.java b/src/main/java/Data/MerchantBoardingConfiguration.java index d2b4a2b..1d6237d 100644 --- a/src/main/java/Data/MerchantBoardingConfiguration.java +++ b/src/main/java/Data/MerchantBoardingConfiguration.java @@ -9,7 +9,7 @@ public static Properties getMerchantConfigForBoardingAPI() { // HTTP_Signature = http_signature and JWT = jwt props.setProperty("authenticationType", "jwt"); - props.setProperty("merchantID", "apitester00"); + props.setProperty("merchantID", ""); props.setProperty("runEnvironment", "apitest.cybersource.com"); props.setProperty("requestJsonPath", "src/main/resources/request.json"); @@ -18,13 +18,13 @@ public static Properties getMerchantConfigForBoardingAPI() { props.setProperty("useMetaKey", "false"); // JWT Parameters - props.setProperty("keyAlias", "apitester00");//merchid - props.setProperty("keyPass", "Ap!C38tp12@");//pwd - props.setProperty("keyFileName", "apitester00");//filename + props.setProperty("keyAlias", ""); + props.setProperty("keyPass", ""); + props.setProperty("keyFileName", ""); // P12 key path. Enter the folder path where the .p12 file is located. + props.setProperty("keysDirectory", ""); - props.setProperty("keysDirectory", "src/main/resources"); // HTTP Parameters props.setProperty("merchantKeyId", "");//blank props.setProperty("merchantsecretKey", "");//blank From 99eecc8dbb50bb8f62a1fbefdeecf10f25a47ea3 Mon Sep 17 00:00:00 2001 From: Surya Prakash Nayak Date: Thu, 26 Sep 2024 14:13:23 +0530 Subject: [PATCH 4/6] Config file for Merchant Boarding API modified- Irrelevant comments removed --- src/main/java/Data/MerchantBoardingConfiguration.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/Data/MerchantBoardingConfiguration.java b/src/main/java/Data/MerchantBoardingConfiguration.java index 1d6237d..67ebd10 100644 --- a/src/main/java/Data/MerchantBoardingConfiguration.java +++ b/src/main/java/Data/MerchantBoardingConfiguration.java @@ -26,8 +26,8 @@ public static Properties getMerchantConfigForBoardingAPI() { props.setProperty("keysDirectory", ""); // HTTP Parameters - props.setProperty("merchantKeyId", "");//blank - props.setProperty("merchantsecretKey", "");//blank + props.setProperty("merchantKeyId", ""); + props.setProperty("merchantsecretKey", ""); // Logging to be enabled or not. props.setProperty("enableLog", "true"); // Log directory Path @@ -44,12 +44,7 @@ public static Properties getMerchantConfigForBoardingAPI() { props.setProperty("clientCertPassword", "Ap!C38tp12@"); props.setProperty("clientId", "apitester00"); props.setProperty("clientSecret", "Ap!C38tp12@"); - - /* - PEM Key file path for decoding JWE Response Enter the folder path where the .pem file is located. - It is optional property, require adding only during JWE decryption. - */ - // props.setProperty("jwePEMFileDirectory", "src/main/resources/NetworkTokenCert.pem"); + return props; From cc1c95db4b953c72e9f9ca0c2c135f1bfe775aa3 Mon Sep 17 00:00:00 2001 From: Surya Prakash Nayak Date: Thu, 26 Sep 2024 14:22:32 +0530 Subject: [PATCH 5/6] Config file for Merchant Boarding API modified- OAUTH related configurations are removed --- .../Data/MerchantBoardingConfiguration.java | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/main/java/Data/MerchantBoardingConfiguration.java b/src/main/java/Data/MerchantBoardingConfiguration.java index 67ebd10..443b34a 100644 --- a/src/main/java/Data/MerchantBoardingConfiguration.java +++ b/src/main/java/Data/MerchantBoardingConfiguration.java @@ -7,44 +7,30 @@ public class MerchantBoardingConfiguration { public static Properties getMerchantConfigForBoardingAPI() { Properties props = new Properties(); - // HTTP_Signature = http_signature and JWT = jwt props.setProperty("authenticationType", "jwt"); props.setProperty("merchantID", ""); props.setProperty("runEnvironment", "apitest.cybersource.com"); props.setProperty("requestJsonPath", "src/main/resources/request.json"); - // MetaKey Parameters + props.setProperty("portfolioID", ""); props.setProperty("useMetaKey", "false"); - // JWT Parameters + props.setProperty("keyAlias", ""); props.setProperty("keyPass", ""); props.setProperty("keyFileName", ""); + props.setProperty("keysDirectory", "src/main/resources"); - // P12 key path. Enter the folder path where the .p12 file is located. - props.setProperty("keysDirectory", ""); - // HTTP Parameters props.setProperty("merchantKeyId", ""); props.setProperty("merchantsecretKey", ""); - // Logging to be enabled or not. + props.setProperty("enableLog", "true"); - // Log directory Path props.setProperty("logDirectory", "log"); props.setProperty("logFilename", "cybs"); - - // Log file size in KB props.setProperty("logMaximumSize", "5M"); - // OAuth related properties. - props.setProperty("enableClientCert", "true"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", "apitester00"); - props.setProperty("clientCertPassword", "Ap!C38tp12@"); - props.setProperty("clientId", "apitester00"); - props.setProperty("clientSecret", "Ap!C38tp12@"); - return props; From 64a6bb6f0c261fd13e23fb01a2d804b8e1201d1c Mon Sep 17 00:00:00 2001 From: Surya Prakash Nayak Date: Thu, 26 Sep 2024 14:34:36 +0530 Subject: [PATCH 6/6] Config file for Merchant Boarding API modified- Unnecessary comments removed from Configuration.java file --- src/main/java/Data/Configuration.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/Data/Configuration.java b/src/main/java/Data/Configuration.java index f2e9d9e..f7b6dc9 100644 --- a/src/main/java/Data/Configuration.java +++ b/src/main/java/Data/Configuration.java @@ -17,16 +17,16 @@ public static Properties getMerchantDetails() { props.setProperty("useMetaKey", "false"); // JWT Parameters - props.setProperty("keyAlias", "testrest");//merchid - props.setProperty("keyPass", "testrest");//pwd - props.setProperty("keyFileName", "testrest");//filename + props.setProperty("keyAlias", "testrest"); + props.setProperty("keyPass", "testrest"); + props.setProperty("keyFileName", "testrest"); // P12 key path. Enter the folder path where the .p12 file is located. props.setProperty("keysDirectory", "src/main/resources"); // HTTP Parameters - props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda");//blank - props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE=");//blank + props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda"); + props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="); // Logging to be enabled or not. props.setProperty("enableLog", "true"); // Log directory Path