From 77d48d03f7a794299ca744d3681e52c51da5506c Mon Sep 17 00:00:00 2001 From: "Bansal, Gaurav" Date: Fri, 24 Oct 2025 18:53:32 +0530 Subject: [PATCH 01/10] cleaning repo --- .gitignore | 2 + .travis.yml | 18 - README.md | 223 -------- .../csharp_expected_results.json | 209 ------- .../java_expected_results.json | 210 ------- .../json_expected_results.json | 528 ------------------ .../node_expected_results.json | 199 ------- .../ExpectedResults/php_expected_results.json | 185 ------ .../python_expected_results.json | 211 ------- .../ruby_expected_results.json | 211 ------- Validation/json_to_prettified_html.py | 171 ------ Validation/response_code_validator.py | 96 ---- Validation/sample_code_log_processor.py | 67 --- license.txt | 57 -- pom.xml | 99 ---- src/main/java/Data/Configuration.java | 141 ----- .../ConfigurationWithIntermediateHost.java | 94 ---- src/main/java/Data/ConfigurationWithMLE.java | 189 ------- .../Data/MerchantBoardingConfiguration.java | 38 -- .../AmexRegistrationCustomerTokenBatch.java | 78 --- ...trationInstrumentIdentifierTokenBatch.java | 82 --- .../samples/AccountUpdater/ListBatches.java | 52 -- ...neOffVisaMasterCardCustomerTokenBatch.java | 78 --- ...terCardInstrumentIdentifierTokenBatch.java | 82 --- .../AccountUpdater/RetrieveBatchReport.java | 54 -- .../AccountUpdater/RetrieveBatchStatus.java | 55 -- .../StandaloneAuraCardCsvUploadApp.java | 222 -------- .../BatchUploadMTLSwithJKS.java | 60 -- .../BatchUploadMTLSwithKeys.java | 124 ---- .../BatchUploadMTLSwithP12.java | 59 -- .../samples/BinLookup/BINLookupWithCard.java | 76 --- .../BINLookupWithHealthcareCard.java | 72 --- .../BinLookup/BINLookupWithNetworkToken.java | 72 --- .../BinLookup/BINLookupWithTMSCustomerID.java | 72 --- .../BINLookupWithTMSInstrumentIdentifier.java | 73 --- .../BINLookupWithTMSJWTTransientToken.java | 70 --- .../BINLookupWithTMSJtiTransientToken.java | 70 --- .../BINLookupWithTMSPaymentInstrument.java | 73 --- .../GenerateCaptureContextAcceptCard.java | 70 --- .../GenerateCaptureContextAcceptCheck.java | 52 -- .../Payments/Payments/MultiThread.java | 141 ----- ...uthorizationInternetWithCustomHeaders.java | 97 ---- .../InvoiceSettings/GetInvoiceSettings.java | 60 -- .../UpdateInvoiceSettings.java | 78 --- .../Invoicing/Invoices/CancelInvoice.java | 57 -- .../CreateAndSendInvoiceImmediately.java | 110 ---- .../Invoices/CreateDraftInvoice.java | 110 ---- ...voiceAndAssignItSpecificInvoiceNumber.java | 111 ---- .../CreateInvoiceWithoutSendingIt.java | 111 ---- .../Invoicing/Invoices/GetInvoiceDetails.java | 61 -- .../Invoicing/Invoices/GetListOfInvoices.java | 59 -- .../Invoicing/Invoices/SendInvoice.java | 56 -- .../Invoicing/Invoices/UpdateInvoice.java | 104 ---- .../samples/MLEFeature/PaymentsWithMLE.java | 107 ---- .../PaymentsWithMLEControlFromMAPConfig.java | 107 ---- ...ymentsWithMLEControlFromMapConfigOnly.java | 107 ---- .../MerchantBoarding/CreateRegistration.java | 229 -------- .../MerchantBoardingAmexDirect.java | 245 -------- .../MerchantBoardingBarclays.java | 254 --------- .../MerchantBoardingBinLookup.java | 133 ----- .../MerchantBoarding/MerchantBoardingCUP.java | 218 -------- .../MerchantBoardingEFTPOS.java | 172 ------ .../MerchantBoardingFDIGlobal.java | 211 ------- .../MerchantBoarding/MerchantBoardingGPX.java | 296 ---------- .../MerchantBoardingSmartFDC.java | 226 -------- .../MerchantBoardingTSYS.java | 271 --------- .../MerchantBoarding/MerchantBoardingVPC.java | 296 ---------- .../AuthenticationWithNORedirect.java | 103 ---- .../AuthenticationWithNewAccount.java | 116 ---- ...ollWithCustomerIdAsPaymentInformation.java | 95 ---- .../EnrollWithPendingAuthentication.java | 106 ---- .../EnrollWithTransientToken.java | 92 --- .../EnrollWithTravelInformation.java | 139 ----- .../PendingAuthenticationWithUnknownPath.java | 98 ---- .../SetupCompletionWithCardNumber.java | 81 --- ...SetupCompletionWithFlexTransientToken.java | 71 --- ...nWithFluidDataValueAndPaymentSolution.java | 78 --- ...SetupCompletionWithSecureStorageToken.java | 74 --- .../SetupCompletionWithTMSToken.java | 74 --- .../SetupCompletionWithTokenizedCard.java | 78 --- .../ValidateAuthenticationResults.java | 93 --- ...fAuthorizationThatUsedSwipedTrackData.java | 82 --- .../Payments/Capture/CapturePayment.java | 78 --- .../Capture/CapturePaymentServiceFee.java | 88 --- .../RestaurantCaptureWithGratuity.java | 87 --- .../java/samples/Payments/Credit/Credit.java | 97 ---- ...nPCIP2PEForCardPresentEnabledAcquirer.java | 110 ---- ...BluefinPCIP2PEWithVisaPlatformConnect.java | 110 ---- ...ntInstrumentAndShippingAddressTokenId.java | 90 --- .../Credit/CreditWithCustomerTokenId.java | 82 --- ...CreditWithInstrumentIdentifierTokenId.java | 100 ---- ...erchandiseReturnCreditVoucherFromSNAP.java | 113 ---- .../ElectronicCheckStandAloneCredits.java | 104 ---- ...ontactlessReadWithVisaPlatformConnect.java | 100 ---- ...wipedTrackDataWithVisaPlatformConnect.java | 92 --- .../Payments/Credit/ServiceFeesCredit.java | 97 ---- ...ericanExpressDirectEMVWithContactRead.java | 115 ---- ...uthorizationCaptureForTimeoutVoidFlow.java | 110 ---- ...zationForIncrementalAuthorizationFlow.java | 200 ------- .../AuthorizationForTimeoutReversalFlow.java | 114 ---- ...ipDecisionManagerForSingleTransaction.java | 105 ---- ...nPCIP2PEForCardPresentEnabledAcquirer.java | 112 ---- ...BluefinPCIP2PEWithVisaPlatformConnect.java | 118 ---- .../AuthorizationUsingSwipedTrackData.java | 96 ---- .../AuthorizationWithCaptureSale.java | 100 ---- ...ntInstrumentAndShippingAddressTokenId.java | 90 --- ...uthorizationWithCustomerTokenCreation.java | 123 ---- ...tInstrumentAndShippingAddressCreation.java | 137 ----- .../AuthorizationWithCustomerTokenId.java | 82 --- .../AuthorizationWithDMAcceptPAEnroll.java | 106 ---- .../AuthorizationWithDMRejectPAEnroll.java | 106 ---- .../AuthorizationWithDMReviewPAEnroll.java | 106 ---- .../AuthorizationWithDecisionManager.java | 96 ---- ...onWithDecisionManagerBuyerInformation.java | 110 ---- ...izationWithDecisionManagerCustomSetup.java | 105 ---- ...nWithDecisionManagerDeviceInformation.java | 103 ---- ...sionManagerMerchantDefinedInformation.java | 110 ---- ...ithDecisionManagerShippingInformation.java | 107 ---- ...nWithDecisionManagerTravelInformation.java | 99 ---- ...WithInstrumentIdentifierTokenCreation.java | 122 ---- ...zationWithInstrumentIdentifierTokenId.java | 105 ---- .../AuthorizationWithLegacyToken.java | 94 ---- ...ationWithPAEnrollAuthenticationNeeded.java | 111 ---- .../AuthorizationWithPayerAuthValidation.java | 105 ---- ...tionWithTMSTokenBypassingNetworkToken.java | 86 --- ...CITInitiatingInstalmentSubscriptionUK.java | 120 ---- .../CITInitiatingRecurringSubscription.java | 120 ---- .../Payments/CITPlacingCredentialOnFile.java | 115 ---- .../Payments/DigitalPaymentGooglePay.java | 108 ---- .../Payments/DigitalPaymentsApplePay.java | 108 ---- ...romSNAPAccountWithVisaPlatformConnect.java | 110 ---- ...seFromCashBenefitsAccountWithCashback.java | 111 ---- ...romSNAPAccountWithVisaPlatformConnect.java | 106 ---- .../Payments/ElectronicCheckDebits.java | 102 ---- .../ElectronicCheckDebitsWithLegacyToken.java | 97 ---- .../Payments/IncrementalAuthorization.java | 94 ---- .../Payments/Payments/LevelIIData.java | 102 ---- .../Payments/Payments/LevelIIIData.java | 125 ----- ...TIndustryPracticeDelayedCharge3RIVisa.java | 123 ---- .../MITIndustryPracticeResubmission.java | 118 ---- .../Payments/Payments/MITInstalment.java | 117 ---- .../Payments/Payments/MITRecurring.java | 117 ---- .../MITUnscheduledCredentialOnFile.java | 117 ---- .../Payments/PartialAuthorization.java | 107 ---- .../Payments/PaymentNetworkTokenization.java | 112 ---- .../Payments/PaymentWithFlexToken.java | 93 --- ...tWithFlexTokenCreatePermanentTMSToken.java | 117 ---- ...ontactlessReadWithVisaPlatformConnect.java | 92 --- ...wipedTrackDataWithVisaPlatformConnect.java | 90 --- .../Payments/RestaurantAuthorization.java | 96 ---- ...tReadOneForCardPresentEnabledAcquirer.java | 92 --- ...tReadTwoForCardPresentEnabledAcquirer.java | 115 ---- ...ithContactReadWithVisaPlatformConnect.java | 99 ---- ...SaleUsingEMVTechnologyWithContactless.java | 92 --- ...lessReadForCardPresentEnabledAcquirer.java | 115 ---- ...ontactlessReadWithVisaPlatformConnect.java | 99 ---- ...eyedDataForCardPresentEnabledAcquirer.java | 95 ---- .../SaleUsingKeyedDataWithBalanceInquiry.java | 105 ---- ...UsingKeyedDataWithVisaPlatformConnect.java | 101 ---- ...rackDataForCardPresentEnabledAcquirer.java | 86 --- ...wipedTrackDataWithVisaPlatformConnect.java | 92 --- .../ServiceFeesWithCreditCardTransaction.java | 116 ---- .../Payments/SimpleAuthorizationInternet.java | 105 ---- .../samples/Payments/Payments/Swiped.java | 86 --- .../Payments/ZeroDollarAuthorization.java | 106 ---- .../Refund/ElectronicCheckFollowonRefund.java | 87 --- .../Payments/Refund/RefundCapture.java | 78 --- .../Payments/Refund/RefundPayment.java | 79 --- .../ProcessAuthorizationReversal.java | 78 --- .../ServiceFeesAuthorizationReversal.java | 78 --- .../Payments/Reversal/TimeoutReversal.java | 78 --- .../EBTReversalOfPurchaseFromSNAPAccount.java | 88 --- .../Void/PinDebitPurchaseReversalVoid.java | 82 --- .../samples/Payments/Void/TimeoutVoid.java | 71 --- .../samples/Payments/Void/VoidCapture.java | 70 --- .../samples/Payments/Void/VoidCredit.java | 70 --- .../samples/Payments/Void/VoidPayment.java | 70 --- .../samples/Payments/Void/VoidRefund.java | 70 --- .../samples/Payouts/PayoutCardNotToken.java | 126 ----- .../java/samples/Payouts/PayoutToken.java | 124 ---- .../Plans/ActivatePlan.java | 55 -- .../Plans/CreatePlan.java | 91 --- .../Plans/DeactivatePlan.java | 55 -- .../Plans/DeletePlan.java | 62 -- .../Plans/GetListOfPlans.java | 59 -- .../Plans/GetPlan.java | 63 --- .../Plans/GetPlanCode.java | 53 -- .../Plans/UpdatePlan.java | 86 --- .../Subscriptions/ActivateSubscription.java | 52 -- .../Subscriptions/CancelSubscription.java | 52 -- .../Subscriptions/CreateSubscription.java | 98 ---- .../Subscriptions/GetListOfSubscriptions.java | 56 -- .../Subscriptions/GetSubscription.java | 61 -- .../Subscriptions/GetSubscriptionCode.java | 51 -- .../Subscriptions/SuspendSubscription.java | 53 -- .../Subscriptions/UpdateSubscription.java | 98 ---- .../GetChargebackDetails.java | 65 --- .../GetChargebackSummaries.java | 65 --- .../GetConversionDetailTransactions.java | 65 --- ...ClearingLevelDataForAccountOrMerchant.java | 65 --- ...undingInformationForAccountOrMerchant.java | 66 --- .../GetNotificationOfChanges.java | 64 --- .../GetPaymentBatchSummaryData.java | 67 --- .../GetPurchaseAndRefundDetails.java | 70 --- .../GetReportDefinition.java | 65 --- .../GetReportingResourceInformation.java | 64 --- .../ReportDownloads/DownloadReport.java | 87 --- ...eateClassicStandardReportSubscription.java | 66 --- .../CreateReportSubscription.java | 79 --- ...ubscriptionOfReportNameByOrganization.java | 62 -- .../GetAllSubscriptions.java | 63 --- .../GetSubscriptionForReportName.java | 64 --- .../Reporting/Reports/CreateAdhocReport.java | 83 --- .../Reports/GetReportBasedOnReportId.java | 63 --- .../Reports/RetrieveAvailableReports.java | 70 --- .../RetrievalDetails/GetRetrievalDetails.java | 65 --- .../GetRetrievalSummaries.java | 65 --- .../DecisionManager/AddDataToList.java | 100 ---- .../AddDuplicateInformation.java | 95 ---- .../DecisionManager/BasicDMTransaction.java | 102 ---- .../DMWithBuyerInformation.java | 110 ---- .../DMWithDecisionProfileRejectResponse.java | 103 ---- .../DMWithDeviceInformation.java | 104 ---- .../DMWithMerchantDefinedInformation.java | 110 ---- .../DMWithScoreExceedsThresholdResponse.java | 108 ---- .../DMWithShippingInformation.java | 108 ---- .../DMWithTravelInformation.java | 116 ---- .../DecisionManager/MarkAsSuspect.java | 87 --- .../DecisionManager/RemoveFromHistory.java | 73 --- .../Verification/AddressMatchNotFound.java | 80 --- .../ApartmentNumberMissingOrNotFound.java | 92 --- .../Verification/CanadianBillingDetails.java | 98 ---- .../ComplianceStatusCompleted.java | 117 ---- .../CustomerMatchDeniedPartiesList.java | 109 ---- .../ExportComplianceInformationProvided.java | 119 ---- .../Verification/MultipleLineItems.java | 117 ---- .../Verification/MultipleSanctionLists.java | 133 ----- .../Verification/NoCompanyName.java | 100 ---- .../ShippingDetailsNotUSOrCanada.java | 109 ---- .../VerboseRequestWithAllFields.java | 114 ---- .../DownloadFileWithFileIdentifier.java | 99 ---- .../SecureFileShare/GetListOfFiles.java | 65 --- .../Customer/CreateCustomer.java | 74 --- .../Customer/DeleteCustomer.java | 59 -- .../Customer/RetrieveCustomer.java | 55 -- .../Customer/UpdateCustomer.java | 75 --- ...dateCustomersDefaultPaymentInstrument.java | 65 --- ...UpdateCustomersDefaultShippingAddress.java | 61 -- ...eCustomerDefaultPaymentInstrumentCard.java | 80 --- ...stomerNonDefaultPaymentInstrumentCard.java | 80 --- ...eCustomerPaymentInstrumentBankAccount.java | 105 ---- ...CustomerPaymentInstrumentPinlessDebit.java | 83 --- .../DeleteCustomerPaymentInstrument.java | 59 -- .../ListPaymentInstrumentsForCustomer.java | 60 -- .../RetrieveCustomerPaymentInstrument.java | 55 -- .../CreateCustomerDefaultShippingAddress.java | 70 --- ...eateCustomerNonDefaultShippingAddress.java | 70 --- .../DeleteCustomerShippingAddress.java | 59 -- .../ListShippingAddressesForCustomer.java | 60 -- .../RetrieveCustomerShippingAddress.java | 55 -- ...CreateInstrumentIdentifierBankAccount.java | 62 -- .../CreateInstrumentIdentifierCard.java | 61 -- ...ntIdentifierCardEnrollForNetworkToken.java | 73 --- .../DeleteInstrumentIdentifier.java | 62 -- ...umentIdentifierForNetworkTokenization.java | 77 --- ...entInstrumentsForInstrumentIdentifier.java | 56 -- .../RetrieveInstrumentIdentifier.java | 57 -- ...rumentIdentifierPreviousTransactionId.java | 72 --- .../CreatePaymentInstrumentBankAccount.java | 107 ---- .../CreatePaymentInstrumentCard.java | 81 --- .../CreatePaymentInstrumentPinlessDebit.java | 85 --- .../DeletePaymentInstrument.java | 60 -- .../RetrievePaymentInstrument.java | 57 -- .../UpdatePaymentInstrument.java | 80 --- .../GetIndividualBatchFile.java | 62 -- .../GetListOfBatchFiles.java | 64 --- .../GetTransactionDetailsForGivenBatchId.java | 101 ---- .../UploadTransactionBatch.java | 60 -- .../RetrieveTransaction.java | 65 --- .../CreateSearchRequest.java | 70 --- .../TransactionSearch/GetSearchResults.java | 62 -- ...teCaptureContextForClickToPayDropInUI.java | 101 ---- ...GenerateUnifiedCheckoutCaptureContext.java | 103 ---- ...tCaptureContextPassingBillingShipping.java | 166 ------ .../GetUserInformationDeprecated.java | 66 --- .../BasicTaxCalculationRequest.java | 114 ---- .../CommittedTaxCallRequest.java | 134 ----- .../CommittedTaxRefundCallRequest.java | 135 ----- .../ValueAddedService/TaxRefundRequest.java | 134 ----- .../VoidCommittedTaxCall.java | 68 --- ...lternativePaymentsNotificationWebhook.java | 87 --- .../CreateDecisionManagerWebhook.java | 90 --- .../CreateFraudManagementWebhook.java | 92 --- .../CreateInvoicingWebhook.java | 93 --- ...geAndKeyExpirationNotificationWebhook.java | 91 --- .../CreateRecurringBillingWebhook.java | 92 --- .../CreateSecureAcceptanceWebhook.java | 92 --- .../CreateTerminalManagementWebhook.java | 92 --- .../CreateTokenManagementWebhook.java | 94 ---- .../CreateWebhookSymmetricKey.java | 70 --- ...ebhookUsingOAuthWithClientCredentials.java | 96 ---- .../CreateWebhookUsingOAuthWithJWT.java | 103 ---- .../FindProductsYouCanSubscribeTo.java | 61 -- .../StoreOAuthCredentials.java | 74 --- .../ManageWebhooks/CreateAsymmetricKey.java | 66 --- .../DeleteWebhookSubscription.java | 61 -- .../GetDetailsOnAllCreatedWebhooks.java | 67 --- .../GetDetailsOnSingleWebhook.java | 61 -- ...ailedTransactionsBySetStartAndEndTime.java | 69 --- ...ReplayFailedTransactionsInLast24Hours.java | 68 --- .../ReplaySpecificListOfTransactions.java | 70 --- .../ManageWebhooks/UpdateWebhook.java | 80 --- .../AuthSampleCode/DeleteGenerateHeaders.java | 119 ---- .../AuthSampleCode/DeleteMethod.java | 107 ---- .../AuthSampleCode/GetGenerateHeaders.java | 164 ------ .../AuthSampleCode/GetMethod.java | 86 --- .../AuthSampleCode/GetObjectMethod.java | 83 --- .../AuthSampleCode/PostGenerateHeaders.java | 189 ------- .../AuthSampleCode/PostMethod.java | 151 ----- .../AuthSampleCode/PostObjectMethod.java | 97 ---- .../AuthSampleCode/PutGenerateHeaders.java | 109 ---- .../AuthSampleCode/PutMethod.java | 98 ---- .../AuthSampleCode/StandAloneMetaKey.java | 109 ---- .../StandaloneHttpSignature.java | 405 -------------- .../AuthSampleCode/StandaloneJwt.java | 431 -------------- .../AuthSampleCode/StandaloneOAuth.java | 210 ------- .../authentication/AuthSampleCode/Test.java | 10 - .../AuthSampleCode/reportDownload.java | 272 --------- .../authentication/Data/Configuration.java | 39 -- .../authentication/Data/PayloadData.java | 77 --- .../authentication/harness/FileReader.java | 19 - .../harness/MerchantProperties.java | 22 - .../0.0.5/SampleApiClient-0.0.5.jar | Bin 24960 -> 0 bytes .../0.0.5/SampleApiClient-0.0.5.jar.md5 | 1 - .../0.0.5/SampleApiClient-0.0.5.jar.sha1 | 1 - .../0.0.5/SampleApiClient-0.0.5.pom | 152 ----- .../0.0.5/_remote.repositories | 4 - .../SampleApiClient/maven-metadata.xml | 12 - .../SampleApiClient/maven-metadata.xml.md5 | 1 - .../SampleApiClient/maven-metadata.xml.sha1 | 1 - .../java/samples/core/SampleCodeRunner.java | 123 ---- .../MMSStandaloneHttpSignature.java | 423 -------------- .../MMSStandaloneJwt.java | 451 --------------- ...ntIdentifierCardEnrollForNetworkToken.java | 64 --- .../networkTokenization/NetworkToken.java | 120 ---- .../PaymentCredentialsFromNetworkToken.java | 62 -- src/main/resources/NetworkTokenCert.pem | 28 - src/main/resources/TRRReport.json | 11 - src/main/resources/authRequest.json | 54 -- src/main/resources/batchapiTest.csv | 5 - src/main/resources/cybs.properties | 20 - src/main/resources/log4j2.xml | 48 -- src/main/resources/qaebc2.p12 | Bin 4929 -> 0 bytes src/main/resources/qaebc2.rgdltnd0.csv | 5 - src/main/resources/report.csv | 1 - src/main/resources/report.txt.csv | 1 - src/main/resources/reports.json | 28 - src/main/resources/testmmsv2auth.p12 | Bin 3577 -> 0 bytes src/main/resources/testrest.p12 | Bin 3553 -> 0 bytes src/main/resources/testrest.pem | 87 --- src/main/resources/testrest_cpctv.p12 | Bin 3585 -> 0 bytes src/main/resourcesreport.xml | 42 -- src/test/resourcesreport.xml | 42 -- 363 files changed, 2 insertions(+), 35099 deletions(-) delete mode 100644 .travis.yml delete mode 100644 README.md delete mode 100644 Validation/ExpectedResults/csharp_expected_results.json delete mode 100644 Validation/ExpectedResults/java_expected_results.json delete mode 100644 Validation/ExpectedResults/json_expected_results.json delete mode 100644 Validation/ExpectedResults/node_expected_results.json delete mode 100644 Validation/ExpectedResults/php_expected_results.json delete mode 100644 Validation/ExpectedResults/python_expected_results.json delete mode 100644 Validation/ExpectedResults/ruby_expected_results.json delete mode 100644 Validation/json_to_prettified_html.py delete mode 100644 Validation/response_code_validator.py delete mode 100644 Validation/sample_code_log_processor.py delete mode 100644 license.txt delete mode 100644 pom.xml delete mode 100644 src/main/java/Data/Configuration.java delete mode 100644 src/main/java/Data/ConfigurationWithIntermediateHost.java delete mode 100644 src/main/java/Data/ConfigurationWithMLE.java delete mode 100644 src/main/java/Data/MerchantBoardingConfiguration.java delete mode 100644 src/main/java/samples/AccountUpdater/AmexRegistrationCustomerTokenBatch.java delete mode 100644 src/main/java/samples/AccountUpdater/AmexRegistrationInstrumentIdentifierTokenBatch.java delete mode 100644 src/main/java/samples/AccountUpdater/ListBatches.java delete mode 100644 src/main/java/samples/AccountUpdater/OneOffVisaMasterCardCustomerTokenBatch.java delete mode 100644 src/main/java/samples/AccountUpdater/OneOffVisaMasterCardInstrumentIdentifierTokenBatch.java delete mode 100644 src/main/java/samples/AccountUpdater/RetrieveBatchReport.java delete mode 100644 src/main/java/samples/AccountUpdater/RetrieveBatchStatus.java delete mode 100644 src/main/java/samples/AccountUpdater/StandaloneAuraCardCsvUploadApp.java delete mode 100644 src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithJKS.java delete mode 100644 src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithKeys.java delete mode 100644 src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithP12.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithCard.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithHealthcareCard.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithNetworkToken.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithTMSCustomerID.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithTMSInstrumentIdentifier.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithTMSJWTTransientToken.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithTMSJtiTransientToken.java delete mode 100644 src/main/java/samples/BinLookup/BINLookupWithTMSPaymentInstrument.java delete mode 100644 src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCard.java delete mode 100644 src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCheck.java delete mode 100644 src/main/java/samples/IntermediateHost/Payments/Payments/MultiThread.java delete mode 100644 src/main/java/samples/IntermediateHost/Payments/Payments/SimpleAuthorizationInternetWithCustomHeaders.java delete mode 100644 src/main/java/samples/Invoicing/InvoiceSettings/GetInvoiceSettings.java delete mode 100644 src/main/java/samples/Invoicing/InvoiceSettings/UpdateInvoiceSettings.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/CancelInvoice.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/CreateAndSendInvoiceImmediately.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/CreateDraftInvoice.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/CreateInvoiceAndAssignItSpecificInvoiceNumber.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/CreateInvoiceWithoutSendingIt.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/GetInvoiceDetails.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/GetListOfInvoices.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/SendInvoice.java delete mode 100644 src/main/java/samples/Invoicing/Invoices/UpdateInvoice.java delete mode 100644 src/main/java/samples/MLEFeature/PaymentsWithMLE.java delete mode 100644 src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMAPConfig.java delete mode 100644 src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMapConfigOnly.java delete mode 100644 src/main/java/samples/MerchantBoarding/CreateRegistration.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java delete mode 100644 src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java delete mode 100644 src/main/java/samples/PayerAuthentication/AuthenticationWithNORedirect.java delete mode 100644 src/main/java/samples/PayerAuthentication/AuthenticationWithNewAccount.java delete mode 100644 src/main/java/samples/PayerAuthentication/EnrollWithCustomerIdAsPaymentInformation.java delete mode 100644 src/main/java/samples/PayerAuthentication/EnrollWithPendingAuthentication.java delete mode 100644 src/main/java/samples/PayerAuthentication/EnrollWithTransientToken.java delete mode 100644 src/main/java/samples/PayerAuthentication/EnrollWithTravelInformation.java delete mode 100644 src/main/java/samples/PayerAuthentication/PendingAuthenticationWithUnknownPath.java delete mode 100644 src/main/java/samples/PayerAuthentication/SetupCompletionWithCardNumber.java delete mode 100644 src/main/java/samples/PayerAuthentication/SetupCompletionWithFlexTransientToken.java delete mode 100644 src/main/java/samples/PayerAuthentication/SetupCompletionWithFluidDataValueAndPaymentSolution.java delete mode 100644 src/main/java/samples/PayerAuthentication/SetupCompletionWithSecureStorageToken.java delete mode 100644 src/main/java/samples/PayerAuthentication/SetupCompletionWithTMSToken.java delete mode 100644 src/main/java/samples/PayerAuthentication/SetupCompletionWithTokenizedCard.java delete mode 100644 src/main/java/samples/PayerAuthentication/ValidateAuthenticationResults.java delete mode 100644 src/main/java/samples/Payments/Capture/CaptureOfAuthorizationThatUsedSwipedTrackData.java delete mode 100644 src/main/java/samples/Payments/Capture/CapturePayment.java delete mode 100644 src/main/java/samples/Payments/Capture/CapturePaymentServiceFee.java delete mode 100644 src/main/java/samples/Payments/Capture/RestaurantCaptureWithGratuity.java delete mode 100644 src/main/java/samples/Payments/Credit/Credit.java delete mode 100644 src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java delete mode 100644 src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Credit/CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId.java delete mode 100644 src/main/java/samples/Payments/Credit/CreditWithCustomerTokenId.java delete mode 100644 src/main/java/samples/Payments/Credit/CreditWithInstrumentIdentifierTokenId.java delete mode 100644 src/main/java/samples/Payments/Credit/EBTMerchandiseReturnCreditVoucherFromSNAP.java delete mode 100644 src/main/java/samples/Payments/Credit/ElectronicCheckStandAloneCredits.java delete mode 100644 src/main/java/samples/Payments/Credit/PinDebitCreditUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Credit/PinDebitCreditUsingSwipedTrackDataWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Credit/ServiceFeesCredit.java delete mode 100644 src/main/java/samples/Payments/Payments/AmericanExpressDirectEMVWithContactRead.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationCaptureForTimeoutVoidFlow.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationForIncrementalAuthorizationFlow.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationForTimeoutReversalFlow.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationSkipDecisionManagerForSingleTransaction.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationUsingSwipedTrackData.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithCaptureSale.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenCreation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenId.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDMAcceptPAEnroll.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDMRejectPAEnroll.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDMReviewPAEnroll.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManager.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerBuyerInformation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerCustomSetup.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerDeviceInformation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerMerchantDefinedInformation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerShippingInformation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerTravelInformation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenCreation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenId.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithLegacyToken.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithPAEnrollAuthenticationNeeded.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithPayerAuthValidation.java delete mode 100644 src/main/java/samples/Payments/Payments/AuthorizationWithTMSTokenBypassingNetworkToken.java delete mode 100644 src/main/java/samples/Payments/Payments/CITInitiatingInstalmentSubscriptionUK.java delete mode 100644 src/main/java/samples/Payments/Payments/CITInitiatingRecurringSubscription.java delete mode 100644 src/main/java/samples/Payments/Payments/CITPlacingCredentialOnFile.java delete mode 100644 src/main/java/samples/Payments/Payments/DigitalPaymentGooglePay.java delete mode 100644 src/main/java/samples/Payments/Payments/DigitalPaymentsApplePay.java delete mode 100644 src/main/java/samples/Payments/Payments/EBTElectronicVoucherPurchaseFromSNAPAccountWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/EBTPurchaseFromCashBenefitsAccountWithCashback.java delete mode 100644 src/main/java/samples/Payments/Payments/EBTPurchaseFromSNAPAccountWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/ElectronicCheckDebits.java delete mode 100644 src/main/java/samples/Payments/Payments/ElectronicCheckDebitsWithLegacyToken.java delete mode 100644 src/main/java/samples/Payments/Payments/IncrementalAuthorization.java delete mode 100644 src/main/java/samples/Payments/Payments/LevelIIData.java delete mode 100644 src/main/java/samples/Payments/Payments/LevelIIIData.java delete mode 100644 src/main/java/samples/Payments/Payments/MITIndustryPracticeDelayedCharge3RIVisa.java delete mode 100644 src/main/java/samples/Payments/Payments/MITIndustryPracticeResubmission.java delete mode 100644 src/main/java/samples/Payments/Payments/MITInstalment.java delete mode 100644 src/main/java/samples/Payments/Payments/MITRecurring.java delete mode 100644 src/main/java/samples/Payments/Payments/MITUnscheduledCredentialOnFile.java delete mode 100644 src/main/java/samples/Payments/Payments/PartialAuthorization.java delete mode 100644 src/main/java/samples/Payments/Payments/PaymentNetworkTokenization.java delete mode 100644 src/main/java/samples/Payments/Payments/PaymentWithFlexToken.java delete mode 100644 src/main/java/samples/Payments/Payments/PaymentWithFlexTokenCreatePermanentTMSToken.java delete mode 100644 src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingSwipedTrackDataWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/RestaurantAuthorization.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactless.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingKeyedDataForCardPresentEnabledAcquirer.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithBalanceInquiry.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer.java delete mode 100644 src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataWithVisaPlatformConnect.java delete mode 100644 src/main/java/samples/Payments/Payments/ServiceFeesWithCreditCardTransaction.java delete mode 100644 src/main/java/samples/Payments/Payments/SimpleAuthorizationInternet.java delete mode 100644 src/main/java/samples/Payments/Payments/Swiped.java delete mode 100644 src/main/java/samples/Payments/Payments/ZeroDollarAuthorization.java delete mode 100644 src/main/java/samples/Payments/Refund/ElectronicCheckFollowonRefund.java delete mode 100644 src/main/java/samples/Payments/Refund/RefundCapture.java delete mode 100644 src/main/java/samples/Payments/Refund/RefundPayment.java delete mode 100644 src/main/java/samples/Payments/Reversal/ProcessAuthorizationReversal.java delete mode 100644 src/main/java/samples/Payments/Reversal/ServiceFeesAuthorizationReversal.java delete mode 100644 src/main/java/samples/Payments/Reversal/TimeoutReversal.java delete mode 100644 src/main/java/samples/Payments/Void/EBTReversalOfPurchaseFromSNAPAccount.java delete mode 100644 src/main/java/samples/Payments/Void/PinDebitPurchaseReversalVoid.java delete mode 100644 src/main/java/samples/Payments/Void/TimeoutVoid.java delete mode 100644 src/main/java/samples/Payments/Void/VoidCapture.java delete mode 100644 src/main/java/samples/Payments/Void/VoidCredit.java delete mode 100644 src/main/java/samples/Payments/Void/VoidPayment.java delete mode 100644 src/main/java/samples/Payments/Void/VoidRefund.java delete mode 100644 src/main/java/samples/Payouts/PayoutCardNotToken.java delete mode 100644 src/main/java/samples/Payouts/PayoutToken.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/ActivatePlan.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/CreatePlan.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/DeactivatePlan.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/DeletePlan.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/GetListOfPlans.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlan.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlanCode.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Plans/UpdatePlan.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/ActivateSubscription.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CancelSubscription.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetListOfSubscriptions.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscription.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscriptionCode.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/SuspendSubscription.java delete mode 100644 src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.java delete mode 100644 src/main/java/samples/Reporting/ChargebackDetails/GetChargebackDetails.java delete mode 100644 src/main/java/samples/Reporting/ChargebackSummaries/GetChargebackSummaries.java delete mode 100644 src/main/java/samples/Reporting/ConversionDetails/GetConversionDetailTransactions.java delete mode 100644 src/main/java/samples/Reporting/InterchangeClearingLevelDetails/InterchangeClearingLevelDataForAccountOrMerchant.java delete mode 100644 src/main/java/samples/Reporting/NetFundings/GetNetfundingInformationForAccountOrMerchant.java delete mode 100644 src/main/java/samples/Reporting/NotificationOfChanges/GetNotificationOfChanges.java delete mode 100644 src/main/java/samples/Reporting/PaymentBatchSummaries/GetPaymentBatchSummaryData.java delete mode 100644 src/main/java/samples/Reporting/PurchaseAndRefundDetails/GetPurchaseAndRefundDetails.java delete mode 100644 src/main/java/samples/Reporting/ReportDefinitions/GetReportDefinition.java delete mode 100644 src/main/java/samples/Reporting/ReportDefinitions/GetReportingResourceInformation.java delete mode 100644 src/main/java/samples/Reporting/ReportDownloads/DownloadReport.java delete mode 100644 src/main/java/samples/Reporting/ReportSubscriptions/CreateClassicStandardReportSubscription.java delete mode 100644 src/main/java/samples/Reporting/ReportSubscriptions/CreateReportSubscription.java delete mode 100644 src/main/java/samples/Reporting/ReportSubscriptions/DeleteSubscriptionOfReportNameByOrganization.java delete mode 100644 src/main/java/samples/Reporting/ReportSubscriptions/GetAllSubscriptions.java delete mode 100644 src/main/java/samples/Reporting/ReportSubscriptions/GetSubscriptionForReportName.java delete mode 100644 src/main/java/samples/Reporting/Reports/CreateAdhocReport.java delete mode 100644 src/main/java/samples/Reporting/Reports/GetReportBasedOnReportId.java delete mode 100644 src/main/java/samples/Reporting/Reports/RetrieveAvailableReports.java delete mode 100644 src/main/java/samples/Reporting/RetrievalDetails/GetRetrievalDetails.java delete mode 100644 src/main/java/samples/Reporting/RetrievalSummaries/GetRetrievalSummaries.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/AddDataToList.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/AddDuplicateInformation.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/BasicDMTransaction.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/DMWithBuyerInformation.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/DMWithDecisionProfileRejectResponse.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/DMWithDeviceInformation.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/DMWithMerchantDefinedInformation.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/DMWithScoreExceedsThresholdResponse.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/DMWithShippingInformation.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/DMWithTravelInformation.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/MarkAsSuspect.java delete mode 100644 src/main/java/samples/RiskManagement/DecisionManager/RemoveFromHistory.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/AddressMatchNotFound.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/ApartmentNumberMissingOrNotFound.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/CanadianBillingDetails.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/ComplianceStatusCompleted.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/CustomerMatchDeniedPartiesList.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/ExportComplianceInformationProvided.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/MultipleLineItems.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/MultipleSanctionLists.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/NoCompanyName.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/ShippingDetailsNotUSOrCanada.java delete mode 100644 src/main/java/samples/RiskManagement/Verification/VerboseRequestWithAllFields.java delete mode 100644 src/main/java/samples/SecureFileShare/DownloadFileWithFileIdentifier.java delete mode 100644 src/main/java/samples/SecureFileShare/GetListOfFiles.java delete mode 100644 src/main/java/samples/TokenManagement/Customer/CreateCustomer.java delete mode 100644 src/main/java/samples/TokenManagement/Customer/DeleteCustomer.java delete mode 100644 src/main/java/samples/TokenManagement/Customer/RetrieveCustomer.java delete mode 100644 src/main/java/samples/TokenManagement/Customer/UpdateCustomer.java delete mode 100644 src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.java delete mode 100644 src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerPaymentInstrument/DeleteCustomerPaymentInstrument.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerPaymentInstrument/ListPaymentInstrumentsForCustomer.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerPaymentInstrument/RetrieveCustomerPaymentInstrument.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerShippingAddress/DeleteCustomerShippingAddress.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerShippingAddress/ListShippingAddressesForCustomer.java delete mode 100644 src/main/java/samples/TokenManagement/CustomerShippingAddress/RetrieveCustomerShippingAddress.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierBankAccount.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCard.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCardEnrollForNetworkToken.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/DeleteInstrumentIdentifier.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/EnrollInstrumentIdentifierForNetworkTokenization.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/ListPaymentInstrumentsForInstrumentIdentifier.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/RetrieveInstrumentIdentifier.java delete mode 100644 src/main/java/samples/TokenManagement/InstrumentIdentifier/UpdateInstrumentIdentifierPreviousTransactionId.java delete mode 100644 src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.java delete mode 100644 src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.java delete mode 100644 src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.java delete mode 100644 src/main/java/samples/TokenManagement/PaymentInstrument/DeletePaymentInstrument.java delete mode 100644 src/main/java/samples/TokenManagement/PaymentInstrument/RetrievePaymentInstrument.java delete mode 100644 src/main/java/samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.java delete mode 100644 src/main/java/samples/TransactionBatches/GetIndividualBatchFile.java delete mode 100644 src/main/java/samples/TransactionBatches/GetListOfBatchFiles.java delete mode 100644 src/main/java/samples/TransactionBatches/GetTransactionDetailsForGivenBatchId.java delete mode 100644 src/main/java/samples/TransactionBatches/UploadTransactionBatch.java delete mode 100644 src/main/java/samples/TransactionDetails/RetrieveTransaction.java delete mode 100644 src/main/java/samples/TransactionSearch/CreateSearchRequest.java delete mode 100644 src/main/java/samples/TransactionSearch/GetSearchResults.java delete mode 100644 src/main/java/samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.java delete mode 100644 src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContext.java delete mode 100644 src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.java delete mode 100644 src/main/java/samples/UserManagement/UserManagement/GetUserInformationDeprecated.java delete mode 100644 src/main/java/samples/ValueAddedService/BasicTaxCalculationRequest.java delete mode 100644 src/main/java/samples/ValueAddedService/CommittedTaxCallRequest.java delete mode 100644 src/main/java/samples/ValueAddedService/CommittedTaxRefundCallRequest.java delete mode 100644 src/main/java/samples/ValueAddedService/TaxRefundRequest.java delete mode 100644 src/main/java/samples/ValueAddedService/VoidCommittedTaxCall.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateAlternativePaymentsNotificationWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateDecisionManagerWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateFraudManagementWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateInvoicingWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateOutageAndKeyExpirationNotificationWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateRecurringBillingWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateSecureAcceptanceWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTerminalManagementWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTokenManagementWebhook.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookSymmetricKey.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithClientCredentials.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithJWT.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/FindProductsYouCanSubscribeTo.java delete mode 100644 src/main/java/samples/Webhooks/CreateNewWebhooks/StoreOAuthCredentials.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/CreateAsymmetricKey.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/DeleteWebhookSubscription.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnAllCreatedWebhooks.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnSingleWebhook.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsBySetStartAndEndTime.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsInLast24Hours.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/ReplaySpecificListOfTransactions.java delete mode 100644 src/main/java/samples/Webhooks/ManageWebhooks/UpdateWebhook.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/DeleteGenerateHeaders.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/DeleteMethod.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/GetGenerateHeaders.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/GetMethod.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/GetObjectMethod.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/PostGenerateHeaders.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/PostMethod.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/PostObjectMethod.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/PutGenerateHeaders.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/PutMethod.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/StandAloneMetaKey.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/StandaloneHttpSignature.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/StandaloneJwt.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/StandaloneOAuth.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/Test.java delete mode 100644 src/main/java/samples/authentication/AuthSampleCode/reportDownload.java delete mode 100644 src/main/java/samples/authentication/Data/Configuration.java delete mode 100644 src/main/java/samples/authentication/Data/PayloadData.java delete mode 100644 src/main/java/samples/authentication/harness/FileReader.java delete mode 100644 src/main/java/samples/authentication/harness/MerchantProperties.java delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.md5 delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.sha1 delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.pom delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/_remote.repositories delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.md5 delete mode 100644 src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.sha1 delete mode 100644 src/main/java/samples/core/SampleCodeRunner.java delete mode 100644 src/main/java/samples/merchantmanagementservice/MMSStandaloneHttpSignature.java delete mode 100644 src/main/java/samples/merchantmanagementservice/MMSStandaloneJwt.java delete mode 100644 src/main/java/samples/networkTokenization/CreateInstrumentIdentifierCardEnrollForNetworkToken.java delete mode 100644 src/main/java/samples/networkTokenization/NetworkToken.java delete mode 100644 src/main/java/samples/networkTokenization/PaymentCredentialsFromNetworkToken.java delete mode 100644 src/main/resources/NetworkTokenCert.pem delete mode 100644 src/main/resources/TRRReport.json delete mode 100644 src/main/resources/authRequest.json delete mode 100644 src/main/resources/batchapiTest.csv delete mode 100644 src/main/resources/cybs.properties delete mode 100644 src/main/resources/log4j2.xml delete mode 100644 src/main/resources/qaebc2.p12 delete mode 100644 src/main/resources/qaebc2.rgdltnd0.csv delete mode 100644 src/main/resources/report.csv delete mode 100644 src/main/resources/report.txt.csv delete mode 100644 src/main/resources/reports.json delete mode 100644 src/main/resources/testmmsv2auth.p12 delete mode 100644 src/main/resources/testrest.p12 delete mode 100644 src/main/resources/testrest.pem delete mode 100644 src/main/resources/testrest_cpctv.p12 delete mode 100644 src/main/resourcesreport.xml delete mode 100644 src/test/resourcesreport.xml diff --git a/.gitignore b/.gitignore index 63ee138..310dfe7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ # Adding .DS_Store for mac .DS_Store +/.settings +/bin diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d32185a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: - java - -sudo: - false - -dist: trusty - -jdk: - - oraclejdk8 - - oraclejdk9 - -matrix: - allow_failures: - - jdk: oraclejdk9 - -script: - - java -jar target/SampleCode.jar diff --git a/README.md b/README.md deleted file mode 100644 index 94cdaf3..0000000 --- a/README.md +++ /dev/null @@ -1,223 +0,0 @@ -# Java Sample Code for the CyberSource SDK - -[![Build Status](https://app.travis-ci.com/CyberSource/cybersource-rest-samples-java.svg?branch=master)](https://app.travis-ci.com/CyberSource/cybersource-rest-samples-java) - -This repository contains working code samples which demonstrate Java integration with the CyberSource REST APIs through the [CyberSource Java SDK](https://github.com/CyberSource/cybersource-rest-client-java). - -The samples are organized into categories and common usage examples. - -## Using the Sample Code - -The samples are all completely independent and self-contained. You can analyze them to get an understanding of how a particular method works, or you can use the snippets as a starting point for your own project. - -### Clone (or download) this repository - -```bash - git clone https://github.com/CyberSource/cybersource-rest-samples-java -``` - -### Running the Samples using IntelliJ IDE - -* Open the project/folder (rather than import or new). - -* Build the project: - * From the Build menu, select Rebuild Project. - -* Run any sample: - * For example, select `SimpleAuthorizationInternet` class from the class Explorer - * Right-click and select Run `SimpleAuthorizationInternet.Main()` - -### Running the Samples using Eclipse IDE - -* Import the project: - * From File menu, select Import. - * Expand Maven menu. - * And click Existing Maven Projects - * Click next and browse the location where you have the Maven project source code. - * Click next, Eclipse will recognize the Maven project and it will show you a list of all possible Maven projects located there. - * Just select the project and click next. - * Eclipse will show you a Maven Build message. Just click finish. - * The Maven project is successfully imported into Eclipse IDE. - -* Run the project: - * Right-click the project folder. - * Select Run as Maven Build. - * In the Goals field, enter "clean install" - * Select the JRE tab and make sure it is pointing at a JRE associated with a JDK. - * Click Run. - -## Setting Your API Credentials - -To set your API credentials for an API request, configure the following information in `src/main/java/data/Configuration.java` file: - -* Http Signature - -```java - authenticationType = http_Signature - merchantID = your_merchant_id - merchantKeyId = your_key_serial_number - merchantsecretKey = your_key_shared_secret - useMetaKey = false - enableClientCert = false -``` - -* Jwt - -```java - authenticationType = jwt - merchantID = your_merchant_id - keyAlias = your_merchant_id - keyPass = your_merchant_id - keyFileName = your_merchant_id - keysDirectory = resources - useMetaKey = false - enableClientCert = false -``` - -* MetaKey Http - -```java - authenticationType = http_Signature - merchantID = your_child_merchant_id - merchantKeyId = your_metakey_serial_number - merchantsecretKey = your_metakey_shared_secret - portfolioId = your_portfolio_id - useMetaKey = true - enableClientCert = false -``` - -* MetaKey JWT - -```java - authenticationType = jwt - merchantID = your_child_merchant_id - keyAlias = your_child_merchant_id - keyPass = your_portfolio_id - keyFileName = your_portfolio_id - portfolioId = your_portfolio_id - keysDirectory = resources - useMetaKey = true - enableClientCert = false -``` - -* OAuth - - CyberSource OAuth uses mutual authentication. A Client Certificate is required to authenticate against the OAuth API. - - Refer to [Supporting Mutual Authentication](https://developer.cybersource.com/api/developer-guides/OAuth/cybs_extend_intro/Supporting-Mutual-Authentication.html) to get information on how to generate Client certificate. - - If the certificate (Public Key) and Private Key are in 2 different files, merge them into a single .p12 file using `openssl`. - - ```bash - openssl pkcs12 -export -out certificate.p12 -inkey privateKey.key -in certificate.crt - ``` - - Set the run environment to OAuth enabled URLs. OAuth only works in these run environments. - - ```java - // For TESTING use - runEnvironment = api-matest.cybersource.com - // For PRODUCTION use - // runEnvironment = api-ma.cybersource.com - ``` - - To generate tokens, an Auth Code is required. The Auth Code can be generated by following the instructions given in [Integrating OAuth](https://developer.cybersource.com/api/developer-guides/OAuth/cybs_extend_intro/integrating_OAuth.html). - - This generated Auth Code can then be used to create the Access Token and Refresh Token. - - In `src/main/java/data/Configuration.java` file, set the following properties. - - Note that `authenticationType` is set to `MutualAuth` only to generate the Access Token and the Refresh Token. - - ```java - authenticationType = MutualAuth - enableClientCert = true - clientCertDirectory = resources - clientCertFile = your_client_cert in .p12 format - clientCertPassword = password_for_client_cert - clientId = your_client_id - clientSecret = your_client_secret - ``` - - Once the tokens are obtained, the `authenticationType` can then be set to `OAuth` to use the generated Access Token to send requests to other APIs. - - ```java - authenticationType = OAuth - enableClientCert = true - clientCertDirectory = resources - clientCertFile = your_client_cert - .p12 format - clientCertPassword = password_for_client_cert - clientId = your_client_id - clientSecret = your_client_secret - accessToken = generated_access_token - refreshToken = generated_refresh_token - ``` - - The Access Token is valid for 15 mins, whereas the Refresh Token is valid for 1 year. - - Once the Access Token expires, use the Refresh Token to generate another Access Token. - - Refer to [StandAloneOAuth.java](https://github.com/CyberSource/cybersource-rest-samples-java/blob/master/src/main/java/samples/authentication/AuthSampleCode/StandaloneOAuth.java) to understand how to consume OAuth. - - For further information, refer to the documentation at [Cybersource OAuth 2.0](https://developer.cybersource.com/api/developer-guides/OAuth/cybs_extend_intro.html). - -## Run Environments - -The run environments that were supported in CyberSource Java SDK have been deprecated. -Moving forward, the SDKs will only support the direct hostname as the run environment. - -For the old run environments previously used, they should be replaced by the following hostnames: - -| Old Run Environment | New Hostname Value | -|-----------------------------------------------|------------------------------------------------| -|`cybersource.environment.sandbox` |`apitest.cybersource.com` | -|`cybersource.environment.production` |`api.cybersource.com` | -|`cybersource.environment.mutualauth.sandbox` |`api-matest.cybersource.com` | -|`cybersource.environment.mutualauth.production`|`api-ma.cybersource.com` | -|`cybersource.in.environment.sandbox` |`apitest.cybersource.com` | -|`cybersource.in.environment.production` |`api.in.cybersource.com` | - -For example, replace the following code in the Configuration file: - -```java - // For TESTING use - runEnvironment = CyberSource.Environment.SANDBOX - // For PRODUCTION use - // runEnvironment = CyberSource.Environment.PRODUCTION -``` - -with the following code: - -```java - // For TESTING use - runEnvironment = apitest.cybersource.com - // For PRODUCTION use - // runEnvironment = api.cybersource.com -``` - -## Switching between the sandbox environment and the production environment - -CyberSource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, set the appropriate environment constant in resources/cybersource.properties file. For example: - -```java - // For TESTING use - runEnvironment = apitest.cybersource.com - // For PRODUCTION use - // runEnvironment = api.cybersource.com -``` - -To use OAuth, switch to OAuth enabled URLs - -```java - // For TESTING use - runEnvironment = api-matest.cybersource.com - // For PRODUCTION use - // runEnvironment = api-ma.cybersource.com -``` - -The [API Reference Guide](https://developer.cybersource.com/api/reference/api-reference.html) provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request -using this SDK. - -## Disclaimer - -Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS. diff --git a/Validation/ExpectedResults/csharp_expected_results.json b/Validation/ExpectedResults/csharp_expected_results.json deleted file mode 100644 index ff3a6bb..0000000 --- a/Validation/ExpectedResults/csharp_expected_results.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "StandAloneHttpSignature": "200", - "StandAloneJWT": "200", - "DeleteMethod": "200", - "GetMethod": "404", - "GetObjectMethod": "404", - "PostMethod": "201", - "PostObjectMethod": "201", - "PutMethod": "201", - "DeleteGenerateHeaders": "200", - "GetGenerateHeaders": "200", - "PostGenerateHeaders": "200", - "PutGenerateHeaders": "200", - "GenerateKeyLegacyTokenFormat": "200", - "FlexTokenizeCard": "200", - "GenerateKey": "200", - "CreateAndSendInvoiceImmediately": "201", - "CreateDraftInvoice": "201", - "CreateInvoiceAndAssignItSpecificInvoiceNumber": "400", - "CreateInvoiceWithoutSendingIt": "400", - "GetInvoiceDetails": "200", - "GetInvoiceSettings": "200", - "UpdateInvoiceSettings": "200", - "AuthenticationWithNewAccount": "201", - "AuthenticationWithNORedirect": "201", - "EnrollWithCustomerIdAsPaymentInformation": "201", - "EnrollWithPendingAuthentication": "201", - "EnrollWithTransientToken": "400", - "EnrollWithTravelInformation": "201", - "PendingAuthenticationWithUnknownPath": "201", - "SetupCompletionWithCardNumber": "201", - "SetupCompletionWithFlexTransientToken": "400", - "SetupCompletionWithFluidDataValueAndPaymentSolution": "400", - "SetupCompletionWithSecureStorageToken": "400", - "SetupCompletionWithTMSToken": "201", - "SetupCompletionWithTokenizedCard": "201", - "ValidateAuthenticationResults": "201", - "AuthorizationUsingSwipedTrackData": "201", - "CaptureOfAuthorizationThatUsedSwipedTrackData": "400", - "SimpleAuthorizationInternet": "201", - "CapturePayment": "201", - "ServiceFeesWithCreditCardTransaction": "201", - "CapturePaymentServiceFee": "201", - "RestaurantAuthorization": "201", - "RestaurantCaptureWithGratuity": "400", - "Credit": "201", - "CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer": "502", - "CreditUsingBluefinPCIP2PEWithVisaPlatformConnect": "502", - "CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId": "201", - "CreditWithCustomerTokenId": "201", - "CreditWithInstrumentIdentifierTokenId": "201", - "ElectronicCheckStandAloneCredits": "201", - "ServiceFeesCredit": "201", - "AmericanExpressDirectEMVWithContactRead": "201", - "AuthorizationCaptureForTimeoutVoidFlow": "201", - "AuthorizationForIncrementalAuthorizationFlow": "201", - "AuthorizationForTimeoutReversalFlow": "201", - "AuthorizationSkipDecisionManagerForSingleTransaction": "201", - "AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer": "502", - "AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect": "502", - "AuthorizationWithCaptureSale": "201", - "AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId": "201", - "AuthorizationWithCustomerTokenCreation": "201", - "AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation": "201", - "AuthorizationWithCustomerTokenId": "201", - "AuthorizationWithDecisionManager": "201", - "AuthorizationWithDecisionManagerBuyerInformation": "201", - "AuthorizationWithDecisionManagerCustomSetup": "201", - "AuthorizationWithDecisionManagerDeviceInformation": "201", - "AuthorizationWithDecisionManagerMerchantDefinedInformation": "201", - "AuthorizationWithDecisionManagerShippingInformation": "201", - "AuthorizationWithDecisionManagerTravelInformation": "201", - "AuthorizationWithDMAcceptPAEnroll": "201", - "AuthorizationWithDMRejectPAEnroll": "201", - "AuthorizationWithDMReviewPAEnroll": "201", - "AuthorizationWithInstrumentIdentifierTokenCreation": "201", - "AuthorizationWithInstrumentIdentifierTokenId": "201", - "AuthorizationWithLegacyToken": "201", - "AuthorizationWithPAEnrollAuthenticationNeeded": "201", - "AuthorizationWithPayerAuthValidation": "201", - "AuthorizationWithTMSTokenBypassingNetworkToken": "201", - "DigitalPaymentGooglePay": "201", - "DigitalPaymentsApplePay": "201", - "ElectronicCheckDebits": "201", - "ElectronicCheckDebitsWithLegacyToken": "201", - "IncrementalAuthorization": "400", - "LevelIIData": "201", - "LevelIIIData": "201", - "PartialAuthorization": "201", - "PaymentNetworkTokenization": "201", - "PaymentWithFlexToken": "400", - "PaymentWithFlexTokenCreatePermanentTMSToken": "400", - "SaleUsingEMVTechnologyWithContactless": "201", - "SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer": "201", - "SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect": "201", - "SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer": "201", - "SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer": "201", - "SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect": "201", - "SaleUsingKeyedDataForCardPresentEnabledAcquirer": "201", - "SaleUsingKeyedDataWithBalanceInquiry": "201", - "SaleUsingKeyedDataWithVisaPlatformConnect": "201", - "SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer": "201", - "SaleUsingSwipedTrackDataWithVisaPlatformConnect": "201", - "Swiped": "201", - "ZeroDollarAuthorization": "201", - "ElectronicCheckFollowonRefund": "201", - "RefundCapture": "201", - "RefundPayment": "201", - "ProcessAuthorizationReversal": "201", - "ServiceFeesAuthorizationReversal": "201", - "TimeoutReversal": "201", - "TimeoutVoid": "201", - "VoidCapture": "201", - "VoidCredit": "201", - "VoidPayment": "201", - "VoidRefund": "201", - "PayoutCardNotToken": "400", - "PayoutToken": "400", - "GetChargebackDetails": "404", - "GetChargebackSummaries": "404", - "GetConversionDetailTransactions": "400", - "InterchangeClearingLevelDataForAccountOrMerchant": "404", - "GetNetfundingInformationForAccountOrMerchant": "400", - "GetNotificationOfChanges": "400", - "GetPaymentBatchSummaryData": "400", - "GetPurchaseAndRefundDetails": "400", - "GetReportDefinition": "200", - "GetReportingResourceInformation": "200", - "DownloadReport": "404", - "CreateAdhocReport": "400", - "GetReportBasedOnReportId": "404", - "RetrieveAvailableReports": "200", - "CreateClassicStandardReportSubscription": "400", - "CreateReportSubscription": "400", - "DeleteSubscriptionOfReportNameByOrganization": "404", - "GetAllSubscriptions": "200", - "GetSubscriptionForReportName": "404", - "GetRetrievalDetails": "404", - "GetRetrievalSummaries": "404", - "AddDataToList": "201", - "AddDuplicateInformation": "201", - "BasicDMTransaction": "201", - "DMWithBuyerInformation": "201", - "DMWithDecisionProfileRejectResponse": "201", - "DMWithDeviceInformation": "201", - "DMWithMerchantDefinedInformation": "201", - "DMWithScoreExceedsThresholdResponse": "201", - "DMWithShippingInformation": "201", - "DMWithTravelInformation": "201", - "MarkAsSuspect": "201", - "RemoveFromHistory": "201", - "AddressMatchNotFound": "201", - "ApartmentNumberMissingOrNotFound": "201", - "CanadianBillingDetails": "201", - "ComplianceStatusCompleted": "201", - "CustomerMatchDeniedPartiesList": "201", - "ExportComplianceInformationProvided": "201", - "MultipleLineItems": "201", - "MultipleSanctionLists": "201", - "NoCompanyName": "201", - "ShippingDetailsNotUSOrCanada": "201", - "VerboseRequestWithAllFields": "201", - "DownloadFileWithFileIdentifier": "404", - "GetListOfFiles": "400", - "CreateCustomer": "201", - "DeleteCustomer": "204", - "RetrieveCustomer": "200", - "UpdateCustomer": "200", - "UpdateCustomersDefaultPaymentInstrument": "200", - "UpdateCustomersDefaultShippingAddress": "200", - "CreateCustomerDefaultPaymentInstrumentCard": "201", - "CreateCustomerNonDefaultPaymentInstrumentCard": "201", - "CreateCustomerPaymentInstrumentBankAccount": "201", - "CreateCustomerPaymentInstrumentPinlessDebit": "201", - "DeleteCustomerPaymentInstrument": "204", - "ListPaymentInstrumentsForCustomer": "200", - "RetrieveCustomerPaymentInstrument": "200", - "CreateCustomerDefaultShippingAddress": "201", - "CreateCustomerNonDefaultShippingAddress": "201", - "DeleteCustomerShippingAddress": "204", - "ListShippingAddressesForCustomer": "200", - "RetrieveCustomerShippingAddress": "200", - "CreateInstrumentIdentifierBankAccount": "200", - "CreateInstrumentIdentifierCard": "200", - "CreateInstrumentIdentifierCardEnrollForNetworkToken": "200", - "DeleteInstrumentIdentifier": "409", - "EnrollInstrumentIdentifierForNetworkTokenization": "202", - "ListPaymentInstrumentsForInstrumentIdentifier": "200", - "RetrieveInstrumentIdentifier": "200", - "UpdateInstrumentIdentifierPreviousTransactionId": "200", - "CreatePaymentInstrumentBankAccount": "201", - "CreatePaymentInstrumentCard": "201", - "CreatePaymentInstrumentPinlessDebit": "201", - "DeletePaymentInstrument": "204", - "RetrievePaymentInstrument": "200", - "UpdatePaymentInstrument": "200", - "GetIndividualBatchFile": "404", - "GetListOfBatchFiles": "404", - "GetTransactionDetailsForGivenBatchId": "404", - "RetrieveTransaction": "200", - "CreateSearchRequest": "201", - "GetSearchResults": "200", - "GetUserInformationDeprecated": "405", - "BasicTaxCalculationRequest": "201", - "CommittedTaxCallRequest": "201", - "CommittedTaxRefundCallRequest": "201", - "TaxRefundRequest": "201", - "VoidCommittedTaxCall": "201" -} \ No newline at end of file diff --git a/Validation/ExpectedResults/java_expected_results.json b/Validation/ExpectedResults/java_expected_results.json deleted file mode 100644 index ea15002..0000000 --- a/Validation/ExpectedResults/java_expected_results.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "GetNetfundingInformationForAccountOrMerchant": "200", - "GetIndividualBatchFile": "404", - "GetListOfBatchFiles": "404", - "GetTransactionDetailsForGivenBatchId": "404", - "GenerateKey": "200", - "GenerateKeyLegacyTokenFormat": "200", - "FlexTokenizeCard": "200", - "GetPurchaseAndRefundDetails": "400", - "GetReportBasedOnReportId": "404", - "CreateAdhocReport": "400", - "RetrieveAvailableReports": "200", - "GetPaymentBatchSummaryData": "400", - "DeleteGenerateHeaders": "200", - "DeleteMethod": "200", - "PostObjectMethod": "201", - "PostGenerateHeaders": "200", - "StandAloneMetaKey": "400", - "GetObjectMethod": "404", - "GetGenerateHeaders": "200", - "reportDownload": "200", - "GetMethod": "404", - "PutMethod": "404", - "PutGenerateHeaders": "200", - "PostMethod": "201", - "StandaloneJwt": "200", - "SimpleAuthorizationInternet": "201", - "RetrieveTransaction": "200", - "DMWithScoreExceedsThresholdResponse": "201", - "DMWithMerchantDefinedInformation": "201", - "AddDuplicateInformation": "201", - "DMWithTravelInformation": "201", - "DMWithDeviceInformation": "201", - "DMWithDecisionProfileRejectResponse": "201", - "BasicDMTransaction": "201", - "MarkAsSuspect": "201", - "DMWithBuyerInformation": "201", - "RemoveFromHistory": "201", - "AddDataToList": "201", - "DMWithShippingInformation": "201", - "GetRetrievalSummaries": "404", - "CreateDraftInvoice": "201", - "GetInvoiceDetails": "200", - "CreateInvoiceWithoutSendingIt": "400", - "CreateInvoiceAndAssignItSpecificInvoiceNumber": "400", - "CreateAndSendInvoiceImmediately": "201", - "UpdateInvoiceSettings": "200", - "GetInvoiceSettings": "200", - "PayoutCardNotToken": "400", - "PayoutToken": "400", - "EnrollWithCustomerIdAsPaymentInformation": "201", - "SetupCompletionWithSecureStorageToken": "400", - "EnrollWithTransientToken": "400", - "SetupCompletionWithTokenizedCard": "201", - "EnrollWithTravelInformation": "201", - "ValidateAuthenticationResults": "201", - "AuthenticationWithNORedirect": "201", - "SetupCompletionWithFluidDataValueAndPaymentSolution": "400", - "AuthenticationWithNewAccount": "201", - "SetupCompletionWithFlexTransientToken": "400", - "PendingAuthenticationWithUnknownPath": "201", - "SetupCompletionWithCardNumber": "201", - "EnrollWithPendingAuthentication": "201", - "SetupCompletionWithTMSToken": "201", - "GetChargebackSummaries": "404", - "AmericanExpressDirectEMVWithContactRead": "201", - "AuthorizationWithCaptureSale": "201", - "AuthorizationWithDecisionManagerDeviceInformation": "201", - "AuthorizationWithInstrumentIdentifierTokenId": "201", - "ElectronicCheckDebitsWithLegacyToken": "201", - "RestaurantAuthorization": "201", - "SaleUsingKeyedDataWithBalanceInquiry": "201", - "AuthorizationForIncrementalAuthorizationFlow": "201", - "AuthorizationWithCustomerTokenCreation": "201", - "AuthorizationWithDecisionManagerShippingInformation": "201", - "AuthorizationWithPAEnrollAuthenticationNeeded": "201", - "LevelIIData": "201", - "SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer": "201", - "SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer": "201", - "AuthorizationForTimeoutReversalFlow": "201", - "AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation": "201", - "AuthorizationWithDecisionManagerTravelInformation": "201", - "AuthorizationWithPayerAuthValidation": "201", - "LevelIIIData": "201", - "SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect": "201", - "SaleUsingSwipedTrackDataWithVisaPlatformConnect": "201", - "AuthorizationUsingSwipedTrackData": "201", - "AuthorizationWithDecisionManagerCustomSetup": "201", - "AuthorizationWithInstrumentIdentifierTokenCreation": "201", - "ElectronicCheckDebits": "201", - "PaymentWithFlexTokenCreatePermanentTMSToken": "400", - "SaleUsingKeyedDataForCardPresentEnabledAcquirer": "201", - "ZeroDollarAuthorization": "201", - "AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect": "502", - "AuthorizationWithDecisionManagerBuyerInformation": "201", - "AuthorizationWithDMReviewPAEnroll": "201", - "DigitalPaymentsApplePay": "201", - "PaymentWithFlexToken": "400", - "SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect": "201", - "Swiped": "201", - "AuthorizationSkipDecisionManagerForSingleTransaction": "201", - "AuthorizationWithCustomerTokenId": "201", - "AuthorizationWithDMAcceptPAEnroll": "201", - "AuthorizationWithTMSTokenBypassingNetworkToken": "201", - "PartialAuthorization": "201", - "SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer": "201", - "ServiceFeesWithCreditCardTransaction": "201", - "AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer": "502", - "AuthorizationWithDecisionManager": "201", - "AuthorizationWithDMRejectPAEnroll": "201", - "DigitalPaymentGooglePay": "201", - "PaymentNetworkTokenization": "201", - "SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer": "201", - "AuthorizationCaptureForTimeoutVoidFlow": "201", - "AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId": "201", - "AuthorizationWithDecisionManagerMerchantDefinedInformation": "201", - "AuthorizationWithLegacyToken": "201", - "IncrementalAuthorization": "201", - "SaleUsingEMVTechnologyWithContactless": "201", - "SaleUsingKeyedDataWithVisaPlatformConnect": "201", - "UpdateCustomersDefaultShippingAddress": "200", - "CreateCustomer": "201", - "UpdateCustomersDefaultPaymentInstrument": "200", - "UpdateCustomer": "200", - "DeleteCustomer": "204", - "RetrieveCustomer": "200", - "GetChargebackDetails": "404", - "ProcessAuthorizationReversal": "201", - "ServiceFeesAuthorizationReversal": "201", - "TimeoutReversal": "201", - "InterchangeClearingLevelDataForAccountOrMerchant": "404", - "GetRetrievalDetails": "404", - "GetNotificationOfChanges": "400", - "CreateCustomerNonDefaultShippingAddress": "201", - "CreateCustomerDefaultShippingAddress": "201", - "ListShippingAddressesForCustomer": "200", - "RetrieveCustomerShippingAddress": "200", - "DeleteCustomerShippingAddress": "204", - "GetConversionDetailTransactions": "400", - "GetReportingResourceInformation": "200", - "GetReportDefinition": "200", - "GetUserInformationDeprecated": "405", - "Credit": "201", - "CreditUsingBluefinPCIP2PEWithVisaPlatformConnect": "502", - "CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId": "201", - "ServiceFeesCredit": "201", - "ElectronicCheckStandAloneCredits": "201", - "CreditWithCustomerTokenId": "201", - "CreditWithInstrumentIdentifierTokenId": "201", - "CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer": "502", - "ComplianceStatusCompleted": "201", - "CanadianBillingDetails": "201", - "VerboseRequestWithAllFields": "201", - "ExportComplianceInformationProvided": "201", - "ApartmentNumberMissingOrNotFound": "201", - "ShippingDetailsNotUSOrCanada": "201", - "AddressMatchNotFound": "201", - "NoCompanyName": "201", - "MultipleLineItems": "201", - "MultipleSanctionLists": "201", - "CustomerMatchDeniedPartiesList": "201", - "CreateCustomerDefaultPaymentInstrumentCard": "201", - "CreateCustomerPaymentInstrumentBankAccount": "201", - "RetrieveCustomerPaymentInstrument": "200", - "ListPaymentInstrumentsForCustomer": "200", - "CreateCustomerPaymentInstrumentPinlessDebit": "201", - "CreateCustomerNonDefaultPaymentInstrumentCard": "201", - "DeleteCustomerPaymentInstrument": "204", - "RetrievePaymentInstrument": "200", - "CreatePaymentInstrumentCard": "201", - "DeletePaymentInstrument": "204", - "CreatePaymentInstrumentPinlessDebit": "201", - "CreatePaymentInstrumentBankAccount": "201", - "UpdatePaymentInstrument": "200", - "CreateClassicStandardReportSubscription": "400", - "GetSubscriptionForReportName": "404", - "GetAllSubscriptions": "200", - "CreateReportSubscription": "400", - "DeleteSubscriptionOfReportNameByOrganization": "404", - "CreateSearchRequest": "201", - "GetSearchResults": "200", - "DownloadFileWithFileIdentifier": "404", - "GetListOfFiles": "400", - "CommittedTaxCallRequest": "201", - "VoidCommittedTaxCall": "201", - "CommittedTaxRefundCallRequest": "201", - "TaxRefundRequest": "201", - "BasicTaxCalculationRequest": "201", - "ElectronicCheckFollowonRefund": "201", - "CapturePayment": "201", - "RefundCapture": "201", - "RefundPayment": "201", - "DownloadReport": "200", - "RestaurantCaptureWithGratuity": "400", - "CapturePaymentServiceFee": "201", - "CaptureOfAuthorizationThatUsedSwipedTrackData": "400", - "VoidCredit": "201", - "VoidPayment": "201", - "VoidCapture": "201", - "TimeoutVoid": "201", - "VoidRefund": "201", - "EnrollInstrumentIdentifierForNetworkTokenization": "202", - "CreateInstrumentIdentifierCard": "200", - "DeleteInstrumentIdentifier": "409", - "RetrieveInstrumentIdentifier": "200", - "CreateInstrumentIdentifierCardEnrollForNetworkToken": "200", - "UpdateInstrumentIdentifierPreviousTransactionId": "200", - "CreateInstrumentIdentifierBankAccount": "200", - "ListPaymentInstrumentsForInstrumentIdentifier": "200" -} \ No newline at end of file diff --git a/Validation/ExpectedResults/json_expected_results.json b/Validation/ExpectedResults/json_expected_results.json deleted file mode 100644 index 90b3f9d..0000000 --- a/Validation/ExpectedResults/json_expected_results.json +++ /dev/null @@ -1,528 +0,0 @@ -{ - "/pts/v2/payments": { - "post": { - "Simple Authorization(Internet)": 201, - "Authorization with Capture(Sale)": 201, - "Payment with Flex Token": 400, - "Payment with Flex Token(Create Permanent TMS token)": 400, - "Authorization with Customer Token Creation": 201, - "Authorization with Customer Token Id": 400, - "Authorization with Customer Token, Default Payment Instrument and Shipping Address Creation": 400, - "Authorization with TMS Token bypassing Network Token": 201, - "Authorization with Customer, Payment Instrument and Shipping Address Token Id": 201, - "Authorization with Instrument Identifier Token Creation": 201, - "Authorization with Decision Manager": 201, - "Authorization - Skip DecisionManager for single transaction": 201, - "Authorization with Decision Manager (Device Information)": 201, - "Authorization with Decision Manager (Merchant Defined Information)": 201, - "Authorization with Decision Manager (Travel Information)": 201, - "Authorization with Decision Manager (Buyer Information)": 201, - "Authorization with Decision Manager (Shipping Information)": 201, - "Authorization with Decision Manager (custom setup)": 201, - "Authorization with PA Enroll (Authentication Needed)": 201, - "Authorization with Payer Auth Validation": 201, - "Authorization with DM(Accept) + PA Enroll": 201, - "Authorization with DM(Review) + PA Enroll": 201, - "Authorization with DM(Reject) + PA Enroll": 201, - "Payment Network Tokenization": 201, - "Digital Payment - GooglePay": 201, - "Digital Payments - ApplePay": 201, - "Zero Dollar Authorization": 201, - "Level II Data": 201, - "Level III Data": 201, - "Partial Authorization": 201, - "Electronic Check Debits": 201, - "Electronic Check Debits with Legacy Token": 400, - "Service Fees with Credit Card transaction": 201, - "Authorization Using Swiped Track Data": 201, - "Sale Using Swiped Track Data with Visa Platform Connect": 201, - "Sale Using Keyed Data with Visa Platform Connect": 201, - "Sale Using Keyed Data with Balance Inquiry": 201, - "Sale Using EMV Technology with Contact Read with Visa Platform Connect": 201, - "Sale Using EMV Technology with Contactless Read with Visa Platform Connect": 201, - "Authorization Using Bluefin PCI P2PE with Visa Platform Connect": 502, - "Restaurant Authorization": 201, - "Sale Using EMV Technology with a Contactless": 201, - "Sale Using EMV Technology with Contact Read (One) for Card Present Enabled Acquirer": 201, - "Swiped": 201, - "Sale Using Swiped Track Data for Card Present Enabled Acquirer": 201, - "Sale Using Keyed Data for Card Present Enabled Acquirer": 201, - "American Express Direct - EMV with Contact Read": 201, - "Sale Using EMV Technology with Contact Read (Two) for Card Present Enabled Acquirer": 201, - "Sale Using EMV Technology with Contactless Read for Card Present Enabled Acquirer": 201, - "Authorization Using Bluefin PCI P2PE for Card Present Enabled Acquirer": 502, - "Authorization with Instrument Identifier Token Id": 201, - "Authorization with Legacy Token": 400 - } - }, - "/pts/v2/payments/{id}": { - "patch": { - "Incremental Authorization": 400 - } - }, - "/pts/v2/payments/{id}/reversals": { - "post": { - "Process an Authorization Reversal": 201, - "Service Fees Authorization Reversal": 400 - } - }, - "/pts/v2/reversals/": { - "post": { - "Timeout Reversal": 400 - } - }, - "/pts/v2/payments/{id}/captures": { - "post": { - "Capture a Payment": 201, - "Capture a Payment - Service Fee": 400, - "Capture of Authorization that used Swiped track data": 401, - "Restaurant Capture with Gratuity": 401 - } - }, - "/pts/v2/payments/{id}/refunds": { - "post": { - "Refund a Payment": 400, - "Electronic check follow-on Refund": 400 - } - }, - "/pts/v2/captures/{id}/refunds": { - "post": { - "Refund a Capture": 201 - } - }, - "/pts/v2/credits": { - "post": { - "Credit": 201, - "Electronic Check Stand-Alone Credits": 201, - "Service Fees Credit": 201, - "Credit with Customer Token Id": 400, - "Credit with Customer, Payment Instrument and Shipping Address Token Id": 400, - "Credit with Instrument Identifier Token Id": 400, - "Credit Using Bluefin PCI P2PE with Visa Platform Connect": 502, - "Credit Using Bluefin PCI P2PE for Card Present Enabled Acquirer": 502 - } - }, - "/pts/v2/payments/{id}/voids": { - "post": { - "Void a Payment": 201 - } - }, - "/pts/v2/captures/{id}/voids": { - "post": { - "Void a Capture": 201 - } - }, - "/pts/v2/refunds/{id}/voids": { - "post": { - "Void a Refund": 201 - } - }, - "/pts/v2/credits/{id}/voids": { - "post": { - "Void a Credit": 201 - } - }, - "/pts/v2/voids/": { - "post": { - "Timeout void": 400 - } - }, - "/pts/v1/transaction-batches": { - "get": { - "Get a List of Batch Files": 404 - } - }, - "/pts/v1/transaction-batches/{id}": { - "get": { - "Get Individual Batch File": 401 - } - }, - "/pts/v1/transaction-batch-details/{id}": { - "get": { - "Get Transaction Details for a given Batch Id": 401 - } - }, - "/tms/v2/customers": { - "post": { - "Create Customer": 201 - } - }, - "/tms/v2/customers/{customerTokenId}": { - "get": { - "Retrieve a Customer": 200 - }, - "patch": { - "Update Customer": 200, - "Update Customers default Payment Instrument": 401, - "Update Customers default Shipping Address": 401 - } - }, - "/tms/v2/customers/{customerTokenId}/shipping-addresses": { - "post": { - "Create Customer Default Shipping Address": 201, - "Create Customer Non-Default Shipping Address": 201 - }, - "get": { - "List Shipping Addresses for a Customer": 200 - } - }, - "/tms/v2/customers/{customerTokenId}/shipping-addresses/{shippingAddressTokenId}": { - "get": { - "Retrieve a Customer Shipping Address": 200 - }, - "patch": { - "Update Customer Default Shipping Address": 200 - } - }, - "/tms/v2/customers/{customerTokenId}/payment-instruments": { - "post": { - "Create Customer Default Payment Instrument (Card)": 401, - "Create Customer Non-Default Payment Instrument (Card)": 401, - "Create Customer Payment Instrument (Bank Account)": 401, - "Create Customer Payment Instrument (Pinless Debit)": 401 - }, - "get": { - "List Payment Instruments for a Customer": 401 - } - }, - "/tms/v2/customers/{customerTokenId}/payment-instruments/{paymentInstrumentTokenId}": { - "get": { - "Retrieve a Customer Payment Instrument": 401 - }, - "patch": {} - }, - "/tms/v1/paymentinstruments": { - "post": { - "Create Payment Instrument (Card)": 400, - "Create Payment Instrument (Bank Account)": 400, - "Create Payment Instrument (Pinless Debit)": 400 - } - }, - "/tms/v1/paymentinstruments/{paymentInstrumentTokenId}": { - "get": { - "Retrieve a Payment Instrument": 401 - }, - "patch": { - "Update Payment Instrument": 401 - } - }, - "/tms/v1/instrumentidentifiers": { - "post": { - "Create Instrument Identifier (Card)": 200, - "Create Instrument Identifier (Bank Account)": 200, - "Create Instrument Identifier (Card & Enroll for Network Token)": 200 - } - }, - "/tms/v1/instrumentidentifiers/{instrumentIdentifierTokenId}": { - "get": { - "Retrieve an Instrument Identifier": 200 - }, - "patch": { - "Update Instrument Identifier previousTransactionId": 401 - } - }, - "/tms/v1/instrumentidentifiers/{instrumentIdentifierTokenId}/paymentinstruments": { - "get": { - "List Payment Instruments for an Instrument Identifier": 200 - } - }, - "/tms/v1/instrumentidentifiers/{instrumentIdentifierTokenId}/enrollment": { - "post": { - "Enroll Instrument Identifier for Network Tokenization": 202 - } - }, - "/flex/v1/keys": { - "post": { - "Generate Key": 200 - } - }, - "/flex/v1/tokens": { - "post": { - "Flex Tokenize Card": 400 - } - }, - "/risk/v1/decisions": { - "post": { - "Basic DM Transaction": 201, - "DM With Device Information": 201, - "DM With Merchant Defined Information": 201, - "DM With Travel Information": 201, - "DM With Buyer Information": 201, - "DM With Shipping Information": 201, - "DM With Score_Exceeds_Threshold Response": 201, - "DM With Decision_Profile_Reject Response": 201 - } - }, - "/risk/v1/authentication-setups": { - "post": { - "Setup Completion with Card Number": 201, - "Setup Completion with Fluid Data Value and Payment Solution": 400, - "Setup Completion with Tokenized Card": 201, - "Setup Completion with TMS Token": 400, - "Setup Completion with Visa Checkout": 400, - "Setup Completion with Flex Transient Token": 400, - "Setup Completion with Secure Storage Token": 400 - } - }, - "/risk/v1/authentications": { - "post": { - "Enroll with Pending Authentication": 201, - "Enroll with Travel Information": 201, - "Authentication with NO Redirect": 201, - "Authentication with New Account": 201, - "Pending Authentication with Unknown path": 201, - "Enroll with customerId as payment information": 400, - "Enroll with transient token": 400 - } - }, - "/risk/v1/authentication-results": { - "post": { - "Validate authentication results": 201 - } - }, - "/risk/v1/lists/{type}/entries": { - "post": { - "Add Data to a List": 401, - "Add Duplicate Information": 401 - } - }, - "/risk/v1/decisions/{id}/marking": { - "post": { - "Mark as Suspect": 201, - "Remove from History": 201 - } - }, - "/risk/v1/address-verifications": { - "post": { - "Verbose Request with all fields": 201, - "Shipping Details not US or Canada": 201, - "Canadian Billing Details": 201, - "Multiple Line Items": 201, - "Apartment Number Missing or Not Found": 201, - "Address Match Not Found": 201 - } - }, - "/risk/v1/export-compliance-inquiries": { - "post": { - "Customer Match Denied Parties List": 201, - "Export Compliance Information Provided": 201, - "Compliance Status Completed": 201, - "Multiple Sanction Lists": 201, - "No Company Name": 201 - } - }, - "/pts/v2/payouts": { - "post": { - "Payout (Card not Token)": 400, - "Payout (Token)": 400 - } - }, - "/tss/v2/transactions/{id}": { - "get": { - "Retrieve a Transaction": 200 - } - }, - "/tss/v2/searches": { - "post": { - "Create a search request": 201 - } - }, - "/tss/v2/searches/{searchId}": { - "get": { - "Get Search Results": 200 - } - }, - "/reporting/v3/report-downloads": { - "get": { - "Download a Report": 404 - } - }, - "/reporting/v3/reports": { - "get": { - "Retrieve Available Reports": 400 - }, - "post": { - "Create Adhoc Report": 400 - } - }, - "/reporting/v3/reports/{reportId}": { - "get": { - "Get Report Based on Report Id": 401 - } - }, - "/reporting/v3/report-definitions/{reportDefinitionName}": { - "get": { - "Get Report Definition": 401 - } - }, - "/reporting/v3/report-definitions": { - "get": { - "Get Reporting Resource Information": 200 - } - }, - "/reporting/v3/report-subscriptions": { - "get": { - "Get All Subscriptions": 200 - }, - "put": { - "Create Report Subscription": 400 - } - }, - "/reporting/v3/report-subscriptions/{reportName}": { - "get": { - "Get Subscription for Report Name": 200 - } - }, - "/reporting/v3/predefined-report-subscriptions": { - "put": { - "Create Classic/Standard Report Subscription": 400 - } - }, - "/reporting/v3/notification-of-changes": { - "get": { - "Get Notification of Changes": 400 - } - }, - "/reporting/v3/purchase-refund-details": { - "get": { - "Get Purchase and Refund Details": 400 - } - }, - "/reporting/v3/payment-batch-summaries": { - "get": { - "Get Payment Batch Summary Data": 400 - } - }, - "/reporting/v3/conversion-details": { - "get": { - "Get Conversion Detail Transactions": 400 - } - }, - "/reporting/v3/net-fundings": { - "get": { - "Get Netfunding Information for an Account or a Merchant": 400 - } - }, - "/reporting/v3/dtds/{reportDefinitionNameVersion}": { - "get": { - "Download DTD for Report": 404 - } - }, - "/reporting/v3/xsds/{reportDefinitionNameVersion}": { - "get": { - "Download XSD for Report": 404 - } - }, - "/reporting/v3/chargeback-summaries": { - "get": { - "Get Chargeback Summaries": 400 - } - }, - "/reporting/v3/chargeback-details": { - "get": { - "Get Chargeback Details": 400 - } - }, - "/reporting/v3/retrieval-summaries": { - "get": { - "Get Retrieval Summaries": 400 - } - }, - "/reporting/v3/retrieval-details": { - "get": { - "Get Retrieval Details": 400 - } - }, - "/reporting/v3/interchange-clearing-level-details": { - "get": { - "Interchange Clearing Level data for an account or a merchant": 400 - } - }, - "/sfs/v1/file-details": { - "get": { - "Get List of Files": 400 - } - }, - "/sfs/v1/files/{fileId}": { - "get": { - "Download a File with File Identifier": 401 - } - }, - "/invoicing/v2/invoices": { - "post": { - "Create a draft invoice": 201, - "Create and send the invoice immediately": 201, - "Create an invoice and assign it a specific invoice number": 400, - "Create an invoice without sending it": 400 - }, - "get": { - "Get a List of Invoices": 200 - } - }, - "/invoicing/v2/invoices/{id}": { - "get": { - "Get Invoice Details": 200 - }, - "put": {} - }, - "/invoicing/v2/invoices/{id}/delivery": { - "post": {} - }, - "/invoicing/v2/invoices/{id}/cancelation": { - "post": {} - }, - "/invoicing/v2/invoiceSettings": { - "put": { - "UpdateInvoiceSettings": 200 - }, - "get": { - "Get Invoice Settings": 200 - } - }, - "/ums/v1/users": { - "get": { - "Get User Information - Deprecated": 405 - } - }, - "/ums/v1/users/search": { - "post": {} - }, - "/vas/v2/tax": { - "post": { - "Basic Tax Calculation Request": 201, - "Tax Refund Request": 201, - "Committed Tax Call Request": 201, - "Committed Tax Refund Call Request": 201 - } - }, - "/vas/v2/tax/{id}": { - "patch": { - "Void a Committed Tax Call": 401 - } - }, - "/kms/v2/keys-sym": { - "post": {} - }, - "/kms/v2/keys-sym/{keyId}": { - "get": { - "Retrieves shared secret key details": 401 - } - }, - "/kms/v2/keys-sym/deletes": { - "post": {} - }, - "/kms/v2/keys-asym": { - "post": {} - }, - "/kms/v2/keys-asym/{keyId}": { - "get": { - "Retrieves PKCS#12 key details": 401 - } - }, - "/kms/v2/keys-asym/deletes": { - "post": {} - }, - "/kms/v2/keys-sym/verifi": { - "post": {} - } -} \ No newline at end of file diff --git a/Validation/ExpectedResults/node_expected_results.json b/Validation/ExpectedResults/node_expected_results.json deleted file mode 100644 index d5502d7..0000000 --- a/Validation/ExpectedResults/node_expected_results.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "StandAloneHttpSignature": "400", - "StandAloneJWT": "400", - "generate-key-legacy-token-format": "200", - "flex-tokenize-card": "200", - "generate-key": "200", - "create-and-send-invoice-immediately": "201", - "create-draft-invoice": "201", - "create-invoice-and-assign-it-specific-invoice-number": "400", - "create-invoice-without-sending-it": "400", - "get-invoice-details": "200", - "get-invoice-settings": "200", - "updateinvoicesettings": "200", - "authentication-with-new-account": "201", - "authentication-with-no-redirect": "201", - "enroll-with-customerid-as-payment-information": "201", - "enroll-with-pending-authentication": "201", - "enroll-with-transient-token": "400", - "enroll-with-travel-information": "201", - "pending-authentication-with-unknown-path": "201", - "setup-completion-with-card-number": "201", - "setup-completion-with-flex-transient-token": "400", - "setup-completion-with-fluid-data-value-and-payment-solution": "400", - "setup-completion-with-secure-storage-token": "400", - "setup-completion-with-tms-token": "201", - "setup-completion-with-tokenized-card": "201", - "validate-authentication-results": "201", - "authorization-using-swiped-track-data": "201", - "capture-of-authorization-that-used-swiped-track-data": "400", - "service-fees-with-credit-card-transaction": "201", - "capture-payment-service-fee": "201", - "simple-authorizationinternet": "201", - "capture-payment": "201", - "restaurant-authorization": "201", - "restaurant-capture-with-gratuity": "400", - "credit-using-bluefin-pci-p2pe-for-card-present-enabled-acquirer": "502", - "credit-using-bluefin-pci-p2pe-with-visa-platform-connect": "502", - "credit-with-customer-payment-instrument-and-shipping-address-token-id": "201", - "credit-with-customer-token-id": "201", - "credit-with-instrument-identifier-token-id": "201", - "credit": "201", - "electronic-check-standalone-credits": "201", - "service-fees-credit": "201", - "american-express-direct-emv-with-contact-read": "201", - "authorization-capture-for-timeout-void-flow": "201", - "authorization-for-incremental-authorization-flow": "201", - "authorization-for-timeout-reversal-flow": "201", - "authorization-skip-decisionmanager-for-single-transaction": "201", - "authorization-using-bluefin-pci-p2pe-for-card-present-enabled-acquirer": "502", - "authorization-using-bluefin-pci-p2pe-with-visa-platform-connect": "502", - "authorization-with-capturesale": "201", - "authorization-with-customer-payment-instrument-and-shipping-address-token-id": "201", - "authorization-with-customer-token-creation": "201", - "authorization-with-customer-token-default-payment-instrument-and-shipping-address-creation": "201", - "authorization-with-customer-token-id": "201", - "authorization-with-decision-manager-buyer-information": "201", - "authorization-with-decision-manager-custom-setup": "201", - "authorization-with-decision-manager-device-information": "201", - "authorization-with-decision-manager-merchant-defined-information": "201", - "authorization-with-decision-manager-shipping-information": "201", - "authorization-with-decision-manager-travel-information": "201", - "authorization-with-decision-manager": "201", - "authorization-with-dmaccept-pa-enroll": "201", - "authorization-with-dmreject-pa-enroll": "201", - "authorization-with-dmreview-pa-enroll": "201", - "authorization-with-instrument-identifier-token-creation": "201", - "authorization-with-instrument-identifier-token-id": "201", - "authorization-with-legacy-token": "201", - "authorization-with-pa-enroll-authentication-needed": "201", - "authorization-with-payer-auth-validation": "201", - "authorization-with-tms-token-bypassing-network-token": "201", - "digital-payment-googlepay": "201", - "digital-payments-applepay": "201", - "electronic-check-debits-with-legacy-token": "201", - "electronic-check-debits": "201", - "incremental-authorization": "400", - "level-ii-data": "201", - "level-iii-data": "201", - "partial-authorization": "201", - "payment-network-tokenization": "201", - "payment-with-flex-token-create-permanent-tms-token": "400", - "payment-with-flex-token": "400", - "sale-using-emv-technology-with-contact-read-one-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contact-read-two-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contact-read-with-visa-platform-connect": "201", - "sale-using-emv-technology-with-contactless-read-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contactless-read-with-visa-platform-connect": "201", - "sale-using-emv-technology-with-contactless": "201", - "sale-using-keyed-data-for-card-present-enabled-acquirer": "201", - "sale-using-keyed-data-with-balance-inquiry": "201", - "sale-using-keyed-data-with-visa-platform-connect": "201", - "sale-using-swiped-track-data-for-card-present-enabled-acquirer": "201", - "sale-using-swiped-track-data-with-visa-platform-connect": "201", - "swiped": "201", - "zero-dollar-authorization": "201", - "electronic-check-follow-on-refund": "201", - "refund-capture": "201", - "refund-payment": "201", - "process-authorization-reversal": "201", - "service-fees-authorization-reversal": "201", - "timeout-reversal": "201", - "timeout-void": "201", - "void-capture": "201", - "void-credit": "201", - "void-payment": "201", - "void-refund": "201", - "payout-card-not-token": "400", - "payout-token": "400", - "get-chargeback-details": "404", - "get-chargeback-summaries": "404", - "get-conversion-detail-transactions": "400", - "interchange-clearing-level-data-for-account-or-merchant": "404", - "get-netfunding-information-for-account-or-merchant": "400", - "get-notification-of-changes": "400", - "get-payment-batch-summary-data": "400", - "get-purchase-and-refund-details": "400", - "get-report-definition": "200", - "get-reporting-resource-information": "200", - "download-report": "200", - "create-adhoc-report": "400", - "get-report-based-on-report-id": "404", - "retrieve-available-reports": "200", - "create-classicstandard-report-subscription": "400", - "create-report-subscription": "400", - "delete-subscription-of-report-name-by-organization": "404", - "get-all-subscriptions": "200", - "get-subscription-for-report-name": "404", - "get-retrieval-details": "404", - "get-retrieval-summaries": "404", - "add-data-to-list": "201", - "add-duplicate-information": "201", - "basic-dm-transaction": "201", - "dm-with-buyer-information": "201", - "dm-with-decisionprofilereject-response": "201", - "dm-with-device-information": "201", - "dm-with-merchant-defined-information": "201", - "dm-with-scoreexceedsthreshold-response": "201", - "dm-with-shipping-information": "201", - "dm-with-travel-information": "201", - "mark-as-suspect": "201", - "remove-from-history": "201", - "address-match-not-found": "201", - "apartment-number-missing-or-not-found": "201", - "canadian-billing-details": "201", - "compliance-status-completed": "201", - "customer-match-denied-parties-list": "201", - "export-compliance-information-provided": "201", - "multiple-line-items": "201", - "multiple-sanction-lists": "201", - "no-company-name": "201", - "shipping-details-not-us-or-canada": "201", - "verbose-request-with-all-fields": "201", - "download-file-with-file-identifier": "200", - "get-list-of-files": "400", - "create-customer": "201", - "delete-customer": "204", - "retrieve-customer": "200", - "update-customer": "200", - "update-customers-default-payment-instrument": "200", - "update-customers-default-shipping-address": "200", - "create-customer-default-payment-instrument-card": "201", - "create-customer-non-default-payment-instrument-card": "201", - "create-customer-payment-instrument-bank-account": "201", - "create-customer-payment-instrument-pinless-debit": "201", - "delete-customer-payment-instrument": "204", - "list-payment-instruments-for-customer": "200", - "retrieve-customer-payment-instrument": "200", - "create-customer-default-shipping-address": "201", - "create-customer-non-default-shipping-address": "201", - "delete-customer-shipping-address": "204", - "list-shipping-addresses-for-customer": "200", - "retrieve-customer-shipping-address": "200", - "create-instrument-identifier-bank-account": "200", - "create-instrument-identifier-card-enroll-for-network-token": "200", - "create-instrument-identifier-card": "200", - "delete-instrument-identifier": "409", - "enroll-instrument-identifier-for-network-tokenization": "202", - "list-payment-instruments-for-instrument-identifier": "200", - "retrieve-instrument-identifier": "200", - "update-instrument-identifier-previoustransactionid": "200", - "create-payment-instrument-bank-account": "201", - "create-payment-instrument-card": "201", - "create-payment-instrument-pinless-debit": "201", - "delete-payment-instrument": "204", - "retrieve-payment-instrument": "200", - "update-payment-instrument": "200", - "get-individual-batch-file": "404", - "get-list-of-batch-files": "404", - "get-transaction-details-for-given-batch-id": "200", - "retrieve-transaction": "200", - "create-search-request": "201", - "get-search-results": "200", - "get-user-information-deprecated": "405", - "basic-tax-calculation-request": "201", - "committed-tax-call-request": "201", - "committed-tax-refund-call-request": "201", - "tax-refund-request": "201", - "void-committed-tax-call": "201" -} \ No newline at end of file diff --git a/Validation/ExpectedResults/php_expected_results.json b/Validation/ExpectedResults/php_expected_results.json deleted file mode 100644 index 73b5b39..0000000 --- a/Validation/ExpectedResults/php_expected_results.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "deleteMethod": "200", - "getGenerateHeaders": "200", - "getMethod": "404", - "postGenerateHeaders": "200", - "postMethod": "201", - "postMethodJsonModel": "201", - "putGenerateHeaders": "200", - "putMethod": "201", - "StandAloneHttpSignature": "200", - "StandAloneJWT": "200", - "GenerateKeyLegacyTokenFormat": "200", - "GenerateKey": "200", - "CreateAndSendInvoiceImmediately": "201", - "CreateDraftInvoice": "200", - "CreateInvoiceAndAssignItSpecificInvoiceNumber": "400", - "CreateInvoiceWithoutSendingIt": "400", - "GetInvoiceSettings": "200", - "UpdateInvoiceSettings": "200", - "AuthenticationWithNewAccount": "201", - "AuthenticationWithNORedirect": "201", - "EnrollWithCustomerIdAsPaymentInformation": "201", - "EnrollWithPendingAuthentication": "201", - "EnrollWithTransientToken": "400", - "EnrollWithTravelInformation": "201", - "PendingAuthenticationWithUnknownPath": "201", - "SetupCompletionWithCardNumber": "201", - "SetupCompletionWithFlexTransientToken": "400", - "SetupCompletionWithFluidDataValueAndPaymentSolution": "400", - "SetupCompletionWithSecureStorageToken": "400", - "SetupCompletionWithTMSToken": "201", - "SetupCompletionWithTokenizedCard": "201", - "ValidateAuthenticationResults": "201", - "CaptureOfAuthorizationThatUsedSwipedTrackData": "400", - "SimpleAuthorizationInternet": "200", - "ServiceFeesWithCreditCardTransaction": "201", - "RestaurantCaptureWithGratuity": "400", - "Credit": "201", - "CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer": "502", - "CreditUsingBluefinPCIP2PEWithVisaPlatformConnect": "502", - "CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId": "201", - "CreditWithCustomerTokenId": "201", - "CreditWithInstrumentIdentifierTokenId": "201", - "ElectronicCheckStandAloneCredits": "201", - "ServiceFeesCredit": "201", - "AmericanExpressDirectEMVWithContactRead": "201", - "AuthorizationCaptureForTimeoutVoidFlow": "201", - "AuthorizationForIncrementalAuthorizationFlow": "400", - "AuthorizationForTimeoutReversalFlow": "201", - "AuthorizationSkipDecisionManagerForSingleTransaction": "201", - "AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer": "502", - "AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect": "502", - "AuthorizationUsingSwipedTrackData": "201", - "AuthorizationWithCaptureSale": "201", - "AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId": "201", - "AuthorizationWithCustomerTokenCreation": "201", - "AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation": "201", - "AuthorizationWithCustomerTokenId": "201", - "AuthorizationWithDecisionManager": "201", - "AuthorizationWithDecisionManagerBuyerInformation": "201", - "AuthorizationWithDecisionManagerCustomSetup": "201", - "AuthorizationWithDecisionManagerDeviceInformation": "201", - "AuthorizationWithDecisionManagerMerchantDefinedInformation": "201", - "AuthorizationWithDecisionManagerShippingInformation": "201", - "AuthorizationWithDecisionManagerTravelInformation": "201", - "AuthorizationWithDMAcceptPAEnroll": "201", - "AuthorizationWithDMRejectPAEnroll": "201", - "AuthorizationWithDMReviewPAEnroll": "201", - "AuthorizationWithInstrumentIdentifierTokenCreation": "201", - "AuthorizationWithInstrumentIdentifierTokenId": "201", - "AuthorizationWithLegacyToken": "201", - "AuthorizationWithPAEnrollAuthenticationNeeded": "201", - "AuthorizationWithPayerAuthValidation": "201", - "AuthorizationWithTMSTokenBypassingNetworkToken": "201", - "DigitalPaymentGooglePay": "201", - "DigitalPaymentsApplePay": "201", - "ElectronicCheckDebits": "201", - "ElectronicCheckDebitsWithLegacyToken": "201", - "LevelIIData": "201", - "LevelIIIData": "201", - "PartialAuthorization": "201", - "PaymentNetworkTokenization": "201", - "PaymentWithFlexToken": "400", - "PaymentWithFlexTokenCreatePermanentTMSToken": "400", - "RestaurantAuthorization": "201", - "SaleUsingEMVTechnologyWithContactless": "201", - "SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer": "201", - "SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect": "201", - "SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer": "201", - "SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer": "201", - "SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect": "201", - "SaleUsingKeyedDataForCardPresentEnabledAcquirer": "201", - "SaleUsingKeyedDataWithBalanceInquiry": "201", - "SaleUsingKeyedDataWithVisaPlatformConnect": "201", - "SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer": "201", - "SaleUsingSwipedTrackDataWithVisaPlatformConnect": "201", - "Swiped": "201", - "ZeroDollarAuthorization": "201", - "TimeoutReversal": "201", - "TimeoutVoid": "201", - "PayoutCardNotToken": "400", - "PayoutToken": "400", - "GetChargebackDetails": "404", - "GetChargebackSummaries": "404", - "GetConversionDetailTransactions": "400", - "InterchangeClearingLevelDataForAccountOrMerchant": "404", - "GetNetfundingInformationForAccountOrMerchant": "400", - "GetNotificationOfChanges": "400", - "GetPaymentBatchSummaryData": "400", - "GetPurchaseAndRefundDetails": "404", - "GetReportDefinition": "200", - "GetReportingResourceInformation": "200", - "DownloadReport": "404", - "CreateAdhocReport": "400", - "GetReportBasedOnReportId": "404", - "RetrieveAvailableReports": "200", - "CreateClassicStandardReportSubscription": "400", - "CreateReportSubscription": "400", - "DeleteSubscriptionOfReportNameByOrganization": "404", - "GetAllSubscriptions": "200", - "GetSubscriptionForReportName": "404", - "GetRetrievalDetails": "404", - "GetRetrievalSummaries": "404", - "AddDataToList": "201", - "AddDuplicateInformation": "201", - "BasicDMTransaction": "201", - "DMWithBuyerInformation": "201", - "DMWithDecisionProfileRejectResponse": "201", - "DMWithDeviceInformation": "201", - "DMWithMerchantDefinedInformation": "201", - "DMWithScoreExceedsThresholdResponse": "201", - "DMWithShippingInformation": "201", - "DMWithTravelInformation": "201", - "MarkAsSuspect": "201", - "RemoveFromHistory": "201", - "AddressMatchNotFound": "201", - "ApartmentNumberMissingOrNotFound": "201", - "CanadianBillingDetails": "201", - "ComplianceStatusCompleted": "201", - "CustomerMatchDeniedPartiesList": "201", - "ExportComplianceInformationProvided": "201", - "MultipleLineItems": "201", - "MultipleSanctionLists": "201", - "NoCompanyName": "201", - "ShippingDetailsNotUSOrCanada": "201", - "VerboseRequestWithAllFields": "201", - "DownloadFileWithFileIdentifier": "404", - "GetListOfFiles": "400", - "CreateCustomer": "204", - "RetrieveCustomer": "200", - "UpdateCustomer": "200", - "UpdateCustomersDefaultPaymentInstrument": "200", - "UpdateCustomersDefaultShippingAddress": "200", - "CreateCustomerDefaultPaymentInstrumentCard": "201", - "CreateCustomerNonDefaultPaymentInstrumentCard": "204", - "CreateCustomerPaymentInstrumentBankAccount": "201", - "CreateCustomerPaymentInstrumentPinlessDebit": "201", - "ListPaymentInstrumentsForCustomer": "200", - "RetrieveCustomerPaymentInstrument": "200", - "CreateCustomerDefaultShippingAddress": "201", - "CreateCustomerNonDefaultShippingAddress": "204", - "ListShippingAddressesForCustomer": "200", - "RetrieveCustomerShippingAddress": "200", - "CreateInstrumentIdentifierBankAccount": "200", - "CreateInstrumentIdentifierCard": "409", - "CreateInstrumentIdentifierCardEnrollForNetworkToken": "200", - "EnrollInstrumentIdentifierForNetworkTokenization": "202", - "ListPaymentInstrumentsForInstrumentIdentifier": "200", - "RetrieveInstrumentIdentifier": "200", - "UpdateInstrumentIdentifierPreviousTransactionId": "200", - "CreatePaymentInstrumentBankAccount": "201", - "CreatePaymentInstrumentCard": "204", - "CreatePaymentInstrumentPinlessDebit": "201", - "RetrievePaymentInstrument": "200", - "UpdatePaymentInstrument": "200", - "GetIndividualBatchFile": "404", - "GetListOfBatchFiles": "404", - "GetTransactionDetailsForGivenBatchId": "404", - "CreateSearchRequest": "200", - "GetUserInformationDeprecated": "405", - "BasicTaxCalculationRequest": "201", - "CommittedTaxCallRequest": "201", - "CommittedTaxRefundCallRequest": "201", - "TaxRefundRequest": "201" -} \ No newline at end of file diff --git a/Validation/ExpectedResults/python_expected_results.json b/Validation/ExpectedResults/python_expected_results.json deleted file mode 100644 index a25d156..0000000 --- a/Validation/ExpectedResults/python_expected_results.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "DeleteMethod": "200", - "Delete_Generate_Headers": "200", - "GetMethod": "200", - "GetObjectMethod": "400", - "Get_Generate_Headers": "200", - "PostMethod": "200", - "PostObjectMethod": "200", - "Post_Generate_Headers": "200", - "PutMethod": "200", - "Put_Generate_Headers": "200", - "StandAloneHttpSignature": "200", - "StandAloneJWT": "200", - "StandAloneMetaKey": "400", - "StandAloneOAuth": "400", - "flex-tokenize-card": "200", - "generate-key-legacy-token-format": "200", - "generate-key": "200", - "create-and-send-invoice-immediately": "201", - "create-draft-invoice": "201", - "create-invoice-and-assign-it-specific-invoice-number": "400", - "create-invoice-without-sending-it": "400", - "get-invoice-details": "200", - "get-invoice-settings": "200", - "updateinvoicesettings": "200", - "authentication-with-new-account": "201", - "authentication-with-no-redirect": "201", - "enroll-with-customerid-as-payment-information": "201", - "enroll-with-pending-authentication": "201", - "enroll-with-transient-token": "400", - "enroll-with-travel-information": "201", - "pending-authentication-with-unknown-path": "201", - "setup-completion-with-card-number": "201", - "setup-completion-with-flex-transient-token": "400", - "setup-completion-with-fluid-data-value-and-payment-solution": "400", - "setup-completion-with-secure-storage-token": "400", - "setup-completion-with-tms-token": "201", - "setup-completion-with-tokenized-card": "201", - "validate-authentication-results": "201", - "capture-of-authorization-that-used-swiped-track-data": "400", - "capture-payment-service-fee": "201", - "capture-payment": "201", - "restaurant-capture-with-gratuity": "400", - "credit-using-bluefin-pci-p2pe-for-card-present-enabled-acquirer": "502", - "credit-using-bluefin-pci-p2pe-with-visa-platform-connect": "502", - "credit-with-customer-payment-instrument-and-shipping-address-token-id": "201", - "credit-with-customer-token-id": "201", - "credit-with-instrument-identifier-token-id": "201", - "credit": "201", - "electronic-check-standalone-credits": "201", - "service-fees-credit": "201", - "american-express-direct-emv-with-contact-read": "201", - "authorization-capture-for-timeout-void-flow": "201", - "authorization-for-incremental-authorization-flow": "201", - "authorization-for-timeout-reversal-flow": "201", - "authorization-skip-decisionmanager-for-single-transaction": "201", - "authorization-using-bluefin-pci-p2pe-for-card-present-enabled-acquirer": "502", - "authorization-using-bluefin-pci-p2pe-with-visa-platform-connect": "502", - "authorization-using-swiped-track-data": "201", - "authorization-with-capturesale": "201", - "authorization-with-customer-payment-instrument-and-shipping-address-token-id": "201", - "authorization-with-customer-token-creation": "201", - "authorization-with-customer-token-default-payment-instrument-and-shipping-address-creation": "201", - "authorization-with-customer-token-id": "201", - "authorization-with-decision-manager-buyer-information": "201", - "authorization-with-decision-manager-custom-setup": "201", - "authorization-with-decision-manager-device-information": "201", - "authorization-with-decision-manager-merchant-defined-information": "201", - "authorization-with-decision-manager-shipping-information": "201", - "authorization-with-decision-manager-travel-information": "201", - "authorization-with-decision-manager": "201", - "authorization-with-dmaccept-pa-enroll": "201", - "authorization-with-dmreject-pa-enroll": "201", - "authorization-with-dmreview-pa-enroll": "201", - "authorization-with-instrument-identifier-token-creation": "201", - "authorization-with-instrument-identifier-token-id": "201", - "authorization-with-legacy-token": "201", - "authorization-with-pa-enroll-authentication-needed": "201", - "authorization-with-payer-auth-validation": "201", - "authorization-with-tms-token-bypassing-network-token": "201", - "digital-payment-googlepay": "201", - "digital-payments-applepay": "201", - "electronic-check-debits-with-legacy-token": "201", - "electronic-check-debits": "201", - "incremental-authorization": "400", - "level-ii-data": "201", - "level-iii-data": "201", - "partial-authorization": "201", - "payment-network-tokenization": "201", - "payment-with-flex-token": "400", - "payment-with-flex-tokencreate-permanent-tms-token": "400", - "restaurant-authorization": "201", - "sale-using-emv-technology-with-contact-read-one-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contact-read-two-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contact-read-with-visa-platform-connect": "201", - "sale-using-emv-technology-with-contactless-read-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contactless-read-with-visa-platform-connect": "201", - "sale-using-emv-technology-with-contactless": "201", - "sale-using-keyed-data-for-card-present-enabled-acquirer": "201", - "sale-using-keyed-data-with-balance-inquiry": "201", - "sale-using-keyed-data-with-visa-platform-connect": "201", - "sale-using-swiped-track-data-for-card-present-enabled-acquirer": "201", - "sale-using-swiped-track-data-with-visa-platform-connect": "201", - "service-fees-with-credit-card-transaction": "201", - "simple-authorizationinternet": "201", - "swiped": "201", - "zero-dollar-authorization": "201", - "electronic-check-followon-refund": "201", - "refund-capture": "201", - "refund-payment": "201", - "process-authorization-reversal": "201", - "service-fees-authorization-reversal": "201", - "timeout-reversal": "201", - "timeout-void": "201", - "void-capture": "201", - "void-credit": "201", - "void-payment": "201", - "void-refund": "201", - "payout-card-not-token": "400", - "payout-token": "400", - "get-chargeback-details": "404", - "get-chargeback-summaries": "404", - "get-conversion-detail-transactions": "400", - "interchange-clearing-level-data-for-account-or-merchant": "404", - "get-netfunding-information-for-account-or-merchant": "400", - "get-notification-of-changes": "400", - "get-payment-batch-summary-data": "400", - "get-purchase-and-refund-details": "404", - "get-report-definition": "200", - "get-reporting-resource-information": "200", - "download-report": "404", - "create-adhoc-report": "400", - "get-report-based-on-report-id": "404", - "retrieve-available-reports": "200", - "create-classicstandard-report-subscription": "400", - "create-report-subscription": "400", - "delete-subscription-of-report-name-by-organization": "404", - "get-all-subscriptions": "200", - "get-subscription-for-report-name": "404", - "get-retrieval-details": "404", - "get-retrieval-summaries": "404", - "add-data-to-list": "201", - "add-duplicate-information": "201", - "basic-dm-transaction": "201", - "dm-with-buyer-information": "201", - "dm-with-decisionprofilereject-response": "201", - "dm-with-device-information": "201", - "dm-with-merchant-defined-information": "201", - "dm-with-scoreexceedsthreshold-response": "201", - "dm-with-shipping-information": "201", - "dm-with-travel-information": "201", - "mark-as-suspect": "201", - "remove-from-history": "201", - "address-match-not-found": "201", - "apartment-number-missing-or-not-found": "201", - "canadian-billing-details": "201", - "compliance-status-completed": "201", - "customer-match-denied-parties-list": "201", - "export-compliance-information-provided": "201", - "multiple-line-items": "201", - "multiple-sanction-lists": "201", - "no-company-name": "201", - "shipping-details-not-us-or-canada": "201", - "verbose-request-with-all-fields": "201", - "download-file-with-file-identifier": "404", - "get-list-of-files": "400", - "create-customer": "201", - "delete-customer": "204", - "retrieve-customer": "200", - "update-customer": "200", - "update-customers-default-payment-instrument": "200", - "update-customers-default-shipping-address": "200", - "create-customer-default-payment-instrument-card": "201", - "create-customer-nondefault-payment-instrument-card": "201", - "create-customer-payment-instrument-bank-account": "201", - "create-customer-payment-instrument-pinless-debit": "201", - "delete-customer-payment-instrument": "204", - "list-payment-instruments-for-customer": "200", - "retrieve-customer-payment-instrument": "200", - "create-customer-default-shipping-address": "201", - "create-customer-nondefault-shipping-address": "201", - "delete-customer-shipping-address": "204", - "list-shipping-addresses-for-customer": "200", - "retrieve-customer-shipping-address": "200", - "create-instrument-identifier-bank-account": "200", - "create-instrument-identifier-card-enroll-for-network-token": "200", - "create-instrument-identifier-card": "200", - "delete-instrument-identifier": "409", - "enroll-instrument-identifier-for-network-tokenization": "202", - "list-payment-instruments-for-instrument-identifier": "200", - "retrieve-instrument-identifier": "200", - "update-instrument-identifier-previoustransactionid": "200", - "create-payment-instrument-bank-account": "201", - "create-payment-instrument-card": "201", - "create-payment-instrument-pinless-debit": "201", - "delete-payment-instrument": "204", - "retrieve-payment-instrument": "200", - "update-payment-instrument": "200", - "get-individual-batch-file": "404", - "get-list-of-batch-files": "404", - "get-transaction-details-for-given-batch-id": "404", - "retrieve-transaction": "200", - "create-search-request": "201", - "get-search-results": "200", - "get-user-information-deprecated": "405", - "basic-tax-calculation-request": "201", - "committed-tax-call-request": "201", - "committed-tax-refund-call-request": "201", - "tax-refund-request": "201", - "void-committed-tax-call": "201" -} \ No newline at end of file diff --git a/Validation/ExpectedResults/ruby_expected_results.json b/Validation/ExpectedResults/ruby_expected_results.json deleted file mode 100644 index fdd7efb..0000000 --- a/Validation/ExpectedResults/ruby_expected_results.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "DeleteGenerateHeaders": "200", - "DeleteMethod": "200", - "GetGenerateHeaders": "200", - "GetMethod": "404", - "GetObjectMethod": "404", - "PostGenerateHeaders": "200", - "PostMethod": "201", - "PostObjectMethod": "201", - "PutGenerateHeaders": "200", - "PutMethod": "201", - "StandAloneHttpSignature": "200", - "StandAloneJWT": "200", - "StandAloneMetaKey": "400", - "StandAloneOAuth": "400", - "flex-tokenize-card": "200", - "generate-key-legacy-token-format": "200", - "generate-key": "200", - "create-and-send-invoice-immediately": "201", - "create-draft-invoice": "201", - "create-invoice-and-assign-it-specific-invoice-number": "400", - "create-invoice-without-sending-it": "400", - "get-invoice-details": "200", - "get-invoice-settings": "200", - "updateinvoicesettings": "200", - "authentication-with-new-account": "201", - "authentication-with-no-redirect": "201", - "enroll-with-customerid-as-payment-information": "201", - "enroll-with-pending-authentication": "201", - "enroll-with-transient-token": "400", - "enroll-with-travel-information": "201", - "pending-authentication-with-unknown-path": "201", - "setup-completion-with-card-number": "201", - "setup-completion-with-flex-transient-token": "400", - "setup-completion-with-fluid-data-value-and-payment-solution": "400", - "setup-completion-with-secure-storage-token": "400", - "setup-completion-with-tms-token": "201", - "setup-completion-with-tokenized-card": "201", - "validate-authentication-results": "201", - "capture-of-authorization-that-used-swiped-track-data": "400", - "capture-payment-service-fee": "201", - "capture-payment": "201", - "restaurant-capture-with-gratuity": "400", - "credit-using-bluefin-pci-p2pe-for-card-present-enabled-acquirer": "502", - "credit-using-bluefin-pci-p2pe-with-visa-platform-connect": "502", - "credit-with-customer-payment-instrument-and-shipping-address-token-id": "201", - "credit-with-customer-token-id": "201", - "credit-with-instrument-identifier-token-id": "201", - "credit": "201", - "electronic-check-standalone-credits": "201", - "service-fees-credit": "201", - "american-express-direct-emv-with-contact-read": "201", - "authorization-capture-for-timeout-void-flow": "201", - "authorization-for-incremental-authorization-flow": "201", - "authorization-for-timeout-reversal-flow": "201", - "authorization-skip-decisionmanager-for-single-transaction": "201", - "authorization-using-bluefin-pci-p2pe-for-card-present-enabled-acquirer": "502", - "authorization-using-bluefin-pci-p2pe-with-visa-platform-connect": "502", - "authorization-using-swiped-track-data": "201", - "authorization-with-capturesale": "201", - "authorization-with-customer-payment-instrument-and-shipping-address-token-id": "201", - "authorization-with-customer-token-creation": "201", - "authorization-with-customer-token-default-payment-instrument-and-shipping-address-creation": "201", - "authorization-with-customer-token-id": "201", - "authorization-with-decision-manager-buyer-information": "201", - "authorization-with-decision-manager-custom-setup": "201", - "authorization-with-decision-manager-device-information": "201", - "authorization-with-decision-manager-merchant-defined-information": "201", - "authorization-with-decision-manager-shipping-information": "201", - "authorization-with-decision-manager-travel-information": "201", - "authorization-with-decision-manager": "201", - "authorization-with-dmaccept-pa-enroll": "201", - "authorization-with-dmreject-pa-enroll": "201", - "authorization-with-dmreview-pa-enroll": "201", - "authorization-with-instrument-identifier-token-creation": "201", - "authorization-with-instrument-identifier-token-id": "201", - "authorization-with-legacy-token": "201", - "authorization-with-pa-enroll-authentication-needed": "201", - "authorization-with-payer-auth-validation": "201", - "authorization-with-tms-token-bypassing-network-token": "201", - "digital-payment-googlepay": "201", - "digital-payments-applepay": "201", - "electronic-check-debits-with-legacy-token": "201", - "electronic-check-debits": "201", - "incremental-authorization": "400", - "level-ii-data": "201", - "level-iii-data": "201", - "partial-authorization": "201", - "payment-network-tokenization": "201", - "payment-with-flex-token-create-permanent-tms-token": "400", - "payment-with-flex-token": "400", - "restaurant-authorization": "201", - "sale-using-emv-technology-with-contact-read-one-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contact-read-two-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contact-read-with-visa-platform-connect": "201", - "sale-using-emv-technology-with-contactless-read-for-card-present-enabled-acquirer": "201", - "sale-using-emv-technology-with-contactless-read-with-visa-platform-connect": "201", - "sale-using-emv-technology-with-contactless": "201", - "sale-using-keyed-data-for-card-present-enabled-acquirer": "201", - "sale-using-keyed-data-with-balance-inquiry": "201", - "sale-using-keyed-data-with-visa-platform-connect": "201", - "sale-using-swiped-track-data-for-card-present-enabled-acquirer": "201", - "sale-using-swiped-track-data-with-visa-platform-connect": "201", - "service-fees-with-credit-card-transaction": "201", - "simple-authorizationinternet": "201", - "swiped": "201", - "zero-dollar-authorization": "201", - "electronic-check-follow-on-refund": "201", - "refund-capture": "201", - "refund-payment": "201", - "process-authorization-reversal": "201", - "service-fees-authorization-reversal": "201", - "timeout-reversal": "201", - "timeout-void": "201", - "void-capture": "201", - "void-credit": "201", - "void-payment": "201", - "void-refund": "201", - "payout-card-not-token": "400", - "payout-token": "400", - "get-chargeback-details": "404", - "get-chargeback-summaries": "404", - "get-conversion-detail-transactions": "400", - "interchange-clearing-level-data-for-account-or-merchant": "404", - "get-netfunding-information-for-account-or-merchant": "400", - "get-notification-of-changes": "400", - "get-payment-batch-summary-data": "400", - "get-purchase-and-refund-details": "404", - "get-report-definition": "200", - "get-reporting-resource-information": "200", - "download-report": "404", - "create-adhoc-report": "400", - "get-report-based-on-report-id": "404", - "retrieve-available-reports": "200", - "create-classicstandard-report-subscription": "400", - "create-report-subscription": "400", - "delete-subscription-of-report-name-by-organization": "404", - "get-all-subscriptions": "200", - "get-subscription-for-report-name": "404", - "get-retrieval-details": "404", - "get-retrieval-summaries": "404", - "add-data-to-list": "201", - "add-duplicate-information": "201", - "basic-dm-transaction": "201", - "dm-with-buyer-information": "201", - "dm-with-decisionprofilereject-response": "201", - "dm-with-device-information": "201", - "dm-with-merchant-defined-information": "201", - "dm-with-scoreexceedsthreshold-response": "201", - "dm-with-shipping-information": "201", - "dm-with-travel-information": "201", - "mark-as-suspect": "201", - "remove-from-history": "201", - "address-match-not-found": "201", - "apartment-number-missing-or-not-found": "201", - "canadian-billing-details": "201", - "compliance-status-completed": "201", - "customer-match-denied-parties-list": "201", - "export-compliance-information-provided": "201", - "multiple-line-items": "201", - "multiple-sanction-lists": "201", - "no-company-name": "201", - "shipping-details-not-us-or-canada": "201", - "verbose-request-with-all-fields": "201", - "download-file-with-file-identifier": "404", - "get-list-of-files": "400", - "create-customer": "201", - "delete-customer": "204", - "retrieve-customer": "200", - "update-customer": "200", - "update-customers-default-payment-instrument": "200", - "update-customers-default-shipping-address": "200", - "create-customer-default-payment-instrument-card": "201", - "create-customer-non-default-payment-instrument-card": "201", - "create-customer-payment-instrument-bank-account": "201", - "create-customer-payment-instrument-pinless-debit": "201", - "delete-customer-payment-instrument": "204", - "list-payment-instruments-for-customer": "200", - "retrieve-customer-payment-instrument": "200", - "create-customer-default-shipping-address": "201", - "create-customer-non-default-shipping-address": "201", - "delete-customer-shipping-address": "204", - "list-shipping-addresses-for-customer": "200", - "retrieve-customer-shipping-address": "200", - "create-instrument-identifier-bank-account": "200", - "create-instrument-identifier-card-enroll-for-network-token": "200", - "create-instrument-identifier-card": "200", - "delete-instrument-identifier": "409", - "enroll-instrument-identifier-for-network-tokenization": "202", - "list-payment-instruments-for-instrument-identifier": "200", - "retrieve-instrument-identifier": "200", - "update-instrument-identifier-previoustransactionid": "200", - "create-payment-instrument-bank-account": "201", - "create-payment-instrument-card": "201", - "create-payment-instrument-pinless-debit": "201", - "delete-payment-instrument": "204", - "retrieve-payment-instrument": "200", - "update-payment-instrument": "200", - "get-individual-batch-file": "404", - "get-list-of-batch-files": "404", - "get-transaction-details-for-given-batch-id": "404", - "retrieve-transaction": "200", - "create-search-request": "201", - "get-search-results": "200", - "get-user-information-deprecated": "405", - "basic-tax-calculation-request": "201", - "committed-tax-call-request": "201", - "committed-tax-refund-call-request": "201", - "tax-refund-request": "201", - "void-committed-tax-call": "201" -} \ No newline at end of file diff --git a/Validation/json_to_prettified_html.py b/Validation/json_to_prettified_html.py deleted file mode 100644 index 6be05d2..0000000 --- a/Validation/json_to_prettified_html.py +++ /dev/null @@ -1,171 +0,0 @@ - -""" -IMPORTS -""" - -import argparse -import os -import re -import copy -import json -import re -from json2html import * -from xhtml2pdf import pisa -from bs4 import BeautifulSoup as bs, Tag - -""" -ARGUMENT PARSER -""" - -def parse_arguments(): - parser = argparse.ArgumentParser(description="Converts JSON result data to HTML") - parser.add_argument("--input", "-i", help="JSON file containing result data to be rendered") - parser.add_argument("--output", "-o", help="HTML file generated from the JSON data") - - args = parser.parse_args() - input_file = args.input - output_file = args.output - return input_file, output_file - -""" -LOAD JSON FILE -""" - -def load_json_file(file): - with open(file, "r") as file_handle: - file_contents = json.load(file_handle) - return file_contents - -""" -CONVERT JSON TO HTML -""" - -def convert_json_to_html(data, file): - with open(file, "w") as file_handle: - file_handle.write(json2html.convert(json=data)) - -""" -PRETTIFY HTML -""" - -def prettify_html(file): - with open(file, "r") as file_handle: - soup = bs(file_handle, "html.parser") - - # Processing table - table_tag = soup.table - table_tag.name = "table" - table_tag["style"] = """ - width: 95%; - border-collapse:collapse; - margin-left:auto; - margin-right:auto; - font-family: Helvetica, sans-serif; - font-size: 10px; - vertical-align: bottom; - """ - - # Processing second column - second_col_tags = soup.find_all("td") - for second_col_single_tag in second_col_tags: - more_style = "" - if "FAILURE" in second_col_single_tag.contents[0]: - more_style = """ - color: #FFFFFF; - background-color: #E34234 - """ - elif "SUCCESS" in second_col_single_tag.contents[0]: - more_style = """ - color: #000000; - background-color: #50C878 - """ - elif "SAMPLE CODE" in second_col_single_tag.contents[0]: - more_style = """ - color: #E34234; - background-color: #FFE135 - """ - second_col_single_tag.name = "td" - second_col_single_tag["style"] = "text-align: center; padding-top: 2px; padding-bottom: 0px; vertical-align: middle;" + more_style - - # Processing first column - first_col_tags = soup.find_all("th") - first_col_style = """ - text-align: left; - padding-top: 2px; - padding-bottom: 0px; - vertical-align: middle; - padding-left: 10px; - """ - for first_col_single_tag in first_col_tags: - first_col_single_tag.name = "td" - first_col_single_tag["style"] = first_col_style - - # Create header rows - first_column_style = """ - text-align: center; - padding-top: 2px; - padding-bottom: 0px; - padding-left: 10px; - color: #FFFFFF; - background-color: #333399; - font-size: 12px; - width: 70%; - """ - first_column_header = soup.new_tag("th", style=first_column_style) - first_column_header.insert(3, "Sample Code Tested") - - second_column_style = """ - text-align: center; - padding-top: 2px; - padding-bottom: 0px; - color: #FFFFFF; - background-color: #333399; - font-size: 12px; - width: 30%; - """ - second_column_header = soup.new_tag("th", style=second_column_style) - second_column_header.insert(3, "Validation Result") - - # Insert header rows into table - table_tag.insert(0, second_column_header) - table_tag.insert(0, first_column_header) - - with open(file, "wb") as file_handle: - file_handle.write(soup.prettify("utf-8")) - -""" -CONVERT HTML TO PDF -""" - -def convert_html_to_pdf(file): - with open(file, "r") as src: - source_html = src.read() - - output_file = file.split(".")[0] + ".pdf" - - try: - with open(output_file, "w+b") as result_file: - pisa_status = pisa.CreatePDF(source_html, dest=result_file) - - if pisa_status.err != 0: - raise Exception('Error during PDF file creation:\n' + pisa_status.err) - except Exception as e: - raise e - -""" -MAIN FUNCTION -""" - -def main(): - input_file, output_file = parse_arguments() - json_data = load_json_file(input_file) - convert_json_to_html(json_data, output_file) - prettify_html(output_file) - - try: - convert_html_to_pdf(output_file) - except Exception as e: - print(e) - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/Validation/response_code_validator.py b/Validation/response_code_validator.py deleted file mode 100644 index 098a7b7..0000000 --- a/Validation/response_code_validator.py +++ /dev/null @@ -1,96 +0,0 @@ - -""" -IMPORTS -""" - -import argparse -import re -import json - -""" -ARGUMENT PARSER -""" - -def parse_arguments(): - parser = argparse.ArgumentParser(description="Validates Response Codes for Requests") - parser.add_argument("--expected", "-e", help="Source file containing the expected response codes for the requests") - parser.add_argument("--actual", "-a", help="Log file for the current testing run") - parser.add_argument("--output", "-o", help="Output JSON file for the result of validation") - - args = parser.parse_args() - expected = args.expected - actual = args.actual - output = args.output - return expected, actual, output - -""" -ADD TO JSON OBJECT -""" - -def add_to_json_object(json_obj, key, value): - json_obj[key] = value - return json_obj - -""" -DUMP JSON TO FILE -""" - -def dump_json_to_file(json_obj, filepath): - with open(filepath, "w") as file: - json.dump(json_obj, file, ensure_ascii=False, indent=4) - -""" -LOAD EXPECTED JSON FILE -""" - -def load_file(file): - file_content = json.load(open(file, "r")) - if "/pts/v2/payments" in file_content: - flat_json_object = {} - for path in file_content: - path_content = file_content[path] - for verb in path_content: - samples_content = path_content[verb] - for sample_name, response_code in samples_content.items(): - flat_json_object = add_to_json_object(flat_json_object, sample_name, response_code) - return flat_json_object - else: - return file_content - -""" -COMPARE RESULTS -""" - -def compare_results(expected, actual): - code_map = {} - for sample, response in actual.items(): - if sample in expected: - if expected[sample] == response: - validation = "SUCCESS" - else: - validation = "FAILURE [ Expected : " + str(expected[sample]) + " | Actual : " + str(response) + " ]" - - code_map = add_to_json_object(code_map, sample, validation) - expected.pop(sample) - else: - code_map = add_to_json_object(code_map, sample, "UNEXPECTED SAMPLE CODE FOUND") - - for remaining_sample, remaining_response in expected.items(): - code_map = add_to_json_object(code_map, remaining_sample, "SAMPLE CODE NOT EXECUTED | Expected : " + str(remaining_response)) - - return code_map - -""" -MAIN FUNCTION -""" - -def main(): - expected_json_file, actuals_json_file, destination_file = parse_arguments() - expected_results = load_file(expected_json_file) - actual_results = load_file(actuals_json_file) - - validation_results = compare_results(expected_results, actual_results) - dump_json_to_file(validation_results, destination_file) - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/Validation/sample_code_log_processor.py b/Validation/sample_code_log_processor.py deleted file mode 100644 index 7e4a62c..0000000 --- a/Validation/sample_code_log_processor.py +++ /dev/null @@ -1,67 +0,0 @@ - -""" -IMPORTS -""" - -import argparse -import re -import json - -""" -ARGUMENT PARSER -""" - -def parse_arguments(): - parser = argparse.ArgumentParser(description="Processes the log file from Sample Code Testing") - parser.add_argument("--log", "-l", help="Log file for the current testing run of Sample Codes") - parser.add_argument("--output", "-o", help="JSON file to store the actual results from the current testing run") - - args = parser.parse_args() - log_path = args.log - output_file = args.output - return log_path, output_file - -""" -LOG FILE PROCESSOR -""" - -def process_log_file(filepath): - with open(filepath, "r", encoding = "utf-8") as file: - contents = file.read() - matches = re.findall(r"(\[Sample Code Testing\]) (\[([A-Za-z0-9\-_]+)\]) ([0-9]{3})", contents) - - return matches - -""" -ADD TO JSON OBJECT -""" - -def add_to_json_object(json_obj, key, value): - json_obj[key] = value - return json_obj - -""" -DUMP JSON TO FILE -""" - -def dump_json_to_file(filepath, src): - with open(filepath, "w") as file: - json.dump(src, file, ensure_ascii=False, indent=4) - -""" -MAIN FUNCTION -""" - -def main(): - current_log_file, output_json_file = parse_arguments() - log_statements = process_log_file(current_log_file) - - code_map = {} - for statement in log_statements: - if statement[2] not in ("Configuration"): - code_map = add_to_json_object(code_map, statement[2], statement[3]) - - dump_json_to_file(output_json_file, code_map) - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/license.txt b/license.txt deleted file mode 100644 index f264cdf..0000000 --- a/license.txt +++ /dev/null @@ -1,57 +0,0 @@ - -CyberSource Software Development Kit (SDK) License Agreement -v. July 9, 2014 - -1 -SDK LICENSE AGREEMENT - -This Software Development Kit (“SDK”) License Agreement (“Agreement”) is between you (both the individual downloading the SDK and any legal entity on behalf of which such individual is acting) (“You” or “Your”) and CyberSource Corporation (“CyberSource’). -IT IS IMPORTANT THAT YOU READ CAREFULLY AND UNDERSTAND THIS AGREEMENT. BY CLICKING THE “I ACCEPT” BUTTON OR AN EQUIVALENT INDICATOR OR BY DOWNLOADING, INSTALLING OR USING THE SDK OR THE DOCUMENTATION, YOU AGREE TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE TO BE BOUND BY THIS AGREEMENT, YOU WILL NOT BE PERMITTED TO (AND YOU WILL HAVE NO RIGHT TO) DOWNLOAD, INSTALL OR USE THE SDK OR THE DOCUMENTATION. -1. DEFINITIONS -1.1 “Application(s)” means software programs that You develop to operate with the Gateway using components of the Software. -1.2 “Documentation” means the materials made available to You in connection with the Software by or on behalf of CyberSource pursuant to this Agreement. -1.3 “Gateway” means any electronic payment platform maintained and operated by CyberSource and any of its affiliates. -1.4 “Software” means all of the software included in the software development kit made available to You by or on behalf of CyberSource pursuant to this Agreement, including but not limited to sample source code, code snippets, software tools, code libraries, sample applications, Documentation and any upgrades, modified versions, updates, and/or additions thereto, if any, made available to You by or on behalf of CyberSource pursuant to this Agreement. -2. GRANT OF LICENSE; RESTRICTIONS -2.1 Limited License. Subject to and conditioned upon Your compliance with the terms of this Agreement, CyberSource hereby grants to You a limited, revocable, non-exclusive, non-transferable, royalty-free license during the term of this Agreement to: (a) in any country worldwide, use, reproduce, modify, and create derivative works of the components of the Software solely for the purpose of developing, testing and manufacturing Applications; (b) distribute, sell or otherwise provide Your Applications that include components of the Software to Your end users in all countries worldwide; and (c) use the Documentation in connection with the foregoing activities. The license to distribute Applications that include components of the Software as set forth in subsection (b) above includes the right to grant sublicenses to Your end users to use such components of the Software as incorporated into such Applications, subject to the limitations and restrictions set forth in this Agreement. -2.2 Restrictions. You shall not (and shall have no right to): (a) make or distribute copies of the Software or the Documentation, in whole or in part, except as expressly permitted pursuant to Section 2.1; (b) alter or remove any copyright, trademark, trade name or other proprietary notices, legends, symbols or labels appearing on or in the Software or Documentation; (c) sublicense (or purport to sublicense) the Software or the Documentation, in whole or in part, to any third party except as expressly permitted pursuant to Section 2.1; (d) engage in any activity with the Software, including the development or distribution of an Application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the Gateway or platform, servers, or systems of CyberSource, any of its affiliates, or any third party; (e) make any statements that Your Application is “certified” or otherwise endorsed, or that its performance is guaranteed, by CyberSource or any of its affiliates; or (f) otherwise use or exploit the Software or the Documentation for any purpose other than to develop and distribute Applications as expressly permitted by this Agreement. -2.3 Ownership. You shall retain ownership of Your Applications developed in accordance with this Agreement, subject to CyberSource’s ownership of the Software and Documentation (including CyberSource’s ownership of any portion of the Software or Documentation incorporated in Your Applications). You acknowledge and agree that all right, title and interest in and to the Software and Documentation shall, at all times, be and remain the exclusive property of CyberSource and that You do not have or acquire any rights, express or implied, in the Software or Documentation except those rights expressly granted under this Agreement. -2.4 No Support. CyberSource has no obligation to provide support, maintenance, upgrades, modifications or new releases of the Software. -2.5 Open Source Software. You hereby acknowledge that the Software may contain software that is distributed under “open source” -license terms (“Open Source Software”). You shall review the Documentation in order to determine which portions of the Software are Open Source Software and are licensed under such Open Source Software license terms. To the extent any such license requires that CyberSource provide You any rights with respect to such Open Source Software that are inconsistent with the limited rights granted to You in this Agreement, then such rights in the applicable Open Source Software license shall take precedence over the rights and restrictions granted in this Agreement, but solely with respect to such Open Source Software. You acknowledge that the Open Source Software license is solely between You and the applicable licensor of the Open Source Software and that Your use, reproduction and distribution of Open Source Software shall be in compliance with applicable Open Source Software license. You understand and agree that CyberSource is not liable for any loss or damage that You may experience as a result of Your use of Open Source Software and that You will look solely to the licensor of the Open Source Software in the event of any such loss or damage. -2.6 License to CyberSource. In the event You choose to submit any suggestions, feedback or other information or materials related to the Software or Documentation or Your use thereof (collectively, “Feedback”) to CyberSource, You hereby grant to CyberSource a worldwide, non-exclusive, royalty-free, transferable, sublicensable, perpetual and irrevocable license to use and otherwise exploit such Feedback in connection with the Software, Documentation, and other products and services. -2.7 Use. -(a) You represent, warrant and agree to use the Software and write Applications only for purposes permitted by (i) this Agreement; (ii) applicable law and regulation, including, without limitation, the Payment Card Industry Data Security Standard (PCI DSS); and (iii) generally accepted practices or guidelines in the relevant jurisdictions. -(b) You represent, warrant and agree that if You use the Software to develop Applications for general public end users, that You will protect the privacy and legal rights of those users. If the Application receives or stores personal or sensitive information provided by end users, it must do so securely and in compliance with all applicable laws and regulations, including card association regulations. If the Application receives CyberSource account information, the Application may only use that information to access the end user's CyberSource account. -(c) You represent, warrant and agree that You are solely responsible for (and that neither CyberSource nor its affiliates have any responsibility to You or to any third party for): (i) any data, content, or resources that You obtain, transmit or display through the Application; and (ii) any breach of Your obligations under this Agreement, any applicable third party license, or any applicable law or regulation, and for the consequences of any such breach. -3. WARRANTY DISCLAIMER; LIMITATION OF LIABILITY -3.1 Disclaimer. THE SOFTWARE AND THE DOCUMENTATION ARE PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS WITH NO WARRANTY. YOU AGREE THAT YOUR USE OF THE SOFTWARE AND THE DOCUMENTATION IS AT YOUR SOLE RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, CYBERSOURCE AND ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE AND THE DOCUMENTATION, INCLUDING ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, SATISFACTORY QUALITY, ACCURACY, TITLE AND NON-INFRINGEMENT, AND ANY -CyberSource Software Development Kit (SDK) License Agreement -v. July 9, 2014 - -2 -WARRANTIES THAT MAY ARISE OUT OF COURSE OF PERFORMANCE, COURSE OF DEALING OR USAGE OF TRADE. NEITHER CYBERSOURCE NOR ITS AFFILIATES WARRANT THAT THE FUNCTIONS OR INFORMATION CONTAINED IN THE SOFTWARE OR THE DOCUMENTATION WILL MEET ANY REQUIREMENTS OR NEEDS YOU MAY HAVE, OR THAT THE SOFTWARE OR DOCUMENTATION WILL OPERATE ERROR FREE, OR THAT THE SOFTWARE OR DOCUMENTATION IS COMPATIBLE WITH ANY PARTICULAR OPERATING SYSTEM. -3.2 Limitation of Liability. IN NO EVENT SHALL CYBERSOURCE AND ITS AFFILIATES BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR PUNITIVE DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, BUSINESS, SAVINGS, DATA, USE OR COST OF SUBSTITUTE PROCUREMENT, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF CYBERSOURCE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES ARE FORESEEABLE. IN NO EVENT SHALL THE ENTIRE LIABILITY OF CYBERSOURCE AND AFFILIATES ARISING FROM OR RELATING TO THIS AGREEMENT OR THE SUBJECT MATTER HEREOF EXCEED ONE HUNDRED U.S. DOLLARS ($100). THE PARTIES ACKNOWLEDGE THAT THE LIMITATIONS OF LIABILITY IN THIS SECTION 3.2 AND IN THE OTHER PROVISIONS OF THIS AGREEMENT AND THE ALLOCATION OF RISK HEREIN ARE AN ESSENTIAL ELEMENT OF THE BARGAIN BETWEEN THE PARTIES, WITHOUT WHICH CYBERSOURCE WOULD NOT HAVE ENTERED INTO THIS AGREEMENT. -4. INDEMNIFICATION -You shall indemnify, hold harmless and, at CyberSource’s request, defend CyberSource and its affiliates and their officers, directors, employees, and agents from and against any claim, suit or proceeding, and any associated liabilities, costs, damages and expenses, including reasonable attorneys’ fees, that arise out of relate to: (i) Your Applications or the use or distribution thereof and Your use or distribution of the Software or the Documentation (or any portion thereof including Open Source Software), including, but not limited to, any allegation that any such Application or any such use or distribution infringes, misappropriates or otherwise violates any intellectual property (including, without limitation, copyright, patent, and trademark), privacy, publicity or other rights of any third party, or has caused the death or injury of any person or damage to any property; (ii) Your alleged or actual breach of this Agreement; (iii) the alleged or actual breach of this Agreement by any party to whom you have provided Your Applications, the Software or the Documentation or (iii) Your alleged or actual violation of or non-compliance with any applicable laws, legislation, policies, rules, regulations or governmental requirements (including, without limitation, any laws, legislation, policies, rules, regulations or governmental requirements related to privacy and data collection). -5. TERMINATION -This Agreement and the licenses granted to you herein are effective until terminated. CyberSource may terminate this Agreement and the licenses granted to You at any time. Upon termination of this Agreement, You shall cease all use of the Software and the Documentation, return to CyberSource or destroy all copies of the Software and Documentation and related materials in Your possession, and so certify to CyberSource. Except for the license to You granted herein, the terms of this Agreement shall survive termination. -6. CONFIDENTIAL INFORMATION -a. You hereby agree (i) to hold CyberSource’s Confidential Information in strict confidence and to take reasonable precautions to protect such Confidential Information (including, without limitation, all precautions You employ with respect to Your own confidential materials), (ii) not to divulge any such Confidential Information to any third person; (iii) not to make any use whatsoever at any time of such Confidential Information except as strictly licensed hereunder, (iv) not to remove or export from the United States or re-export any such Confidential Information or any direct product thereof, except in compliance with, and with all licenses and approvals required under applicable U.S. and foreign export laws and regulations, including, without limitation, those of the U.S. Department of Commerce. -b. “Confidential Information” shall mean any data or information, oral or written, treated as confidential that relates to CyberSource’s past, present, or future research, development or business activities, including without limitation any unannounced products and services, any information relating to services, developments, inventions, processes, plans, financial information, customer data, revenue, transaction volume, forecasts, projections, application programming interfaces, Software and Documentation. -7. General Terms -7.1 Law. This Agreement and all matters arising out of or relating to this Agreement shall be governed by the internal laws of the State of California without giving effect to any choice of law rule. This Agreement shall not be governed by the United Nations Convention on Contracts for the International Sales of Goods, the application of which is expressly excluded. In the event of any controversy, claim or dispute between the parties arising out of or relating to this Agreement, such controversy, claim or dispute shall be resolved in the state or federal courts in Santa Clara County, California, and the parties hereby irrevocably consent to the jurisdiction and venue of such courts. -7.2 Logo License. CyberSource hereby grants to You the right to use, reproduce, publish, perform and display CyberSource logo solely in accordance with the current CyberSource brand guidelines. -7.3 Severability and Waiver. If any provision of this Agreement is held to be illegal, invalid or otherwise unenforceable, such provision shall be enforced to the extent possible consistent with the stated intention of the parties, or, if incapable of such enforcement, shall be deemed to be severed and deleted from this Agreement, while the remainder of this Agreement shall continue in full force and effect. The waiver by either party of any default or breach of this Agreement shall not constitute a waiver of any other or subsequent default or breach. -7.4 No Assignment. You may not assign, sell, transfer, delegate or otherwise dispose of, whether voluntarily or involuntarily, by operation of law or otherwise, this Agreement or any rights or obligations under this Agreement without the prior written consent of CyberSource, which may be withheld in CyberSource’s sole discretion. Any purported assignment, transfer or delegation by You shall be null and void. Subject to the foregoing, this Agreement shall be binding upon and shall inure to the benefit of the parties and their respective successors and assigns. -7.5 Government Rights. If You (or any person or entity to whom you provide the Software or Documentation) are an agency or instrumentality of the United States Government, the Software and Documentation are “commercial computer software” and “commercial computer software documentation,” and pursuant to FAR 12.212 or DFARS 227.7202, and their successors, as applicable, use, reproduction and disclosure of the Software and Documentation are governed by the terms of this Agreement. -7.6 Export Administration. You shall comply fully with all relevant export laws and regulations of the United States, including, without limitation, the U.S. Export Administration Regulations (collectively “Export Controls”). Without limiting the generality of the foregoing, You shall not, and You shall require Your representatives not to, export, direct or transfer the Software or the Documentation, or any direct product thereof, to any destination, person or entity restricted or prohibited by the Export Controls. -7.7 Privacy. In order to continually innovate and improve the Software, Licensee understands and agrees that CyberSource may collect certain usage statistics including but not limited to a unique identifier, associated IP address, version number of software, and information on which tools and/or services in the Software are being used and how they are being used. -7.8 Headings. The headings to the Sections and Subsections of this Agreement are included merely for convenience of reference and shall not affect the meaning of the language included therein. -7.9 Entire Agreement; Amendments. This Agreement constitutes the entire agreement between the parties and supersedes all prior or contemporaneous agreements or representations, written or oral, concerning the subject matter of this Agreement. CyberSource may make changes to this Agreement, Software or Documentation in its sole discretion. When these changes are made, CyberSource will make a new version of the Agreement, Software or Documentation available on the website where the - -CyberSource Software Development Kit (SDK) License Agreement -v. July 9, 2014 -3 -Software is available. This Agreement may not be modified or amended by You except in a writing signed by a duly authorized representative of each party. You acknowledge and agree that CyberSource has not made any representations, warranties or agreements of any kind, except as expressly set forth herein. -BY CLICKING “I ACCEPT,” “I AGREE” OR AN EQUIVALENT INDICATOR OR BY DOWNLOADING, INSTALLING OR USING THE SOFTWARE OR THE DOCUMENTATION, YOU ACKNOWLEDGE AND AGREE THAT (1) YOU HAVE READ AND REVIEWED THIS AGREEMENT IN ITS ENTIRETY, (2) YOU AGREE TO BE BOUND BY THIS AGREEMENT, (3) YOU HAVE THE POWER, AUTHORITY AND LEGAL RIGHT TO ENTER INTO THIS AGREEMENT ON BEHALF OF YOU AND, (4) THIS AGREEMENT CONSTITUTES BINDING AND ENFORCEABLE OBLIGATIONS OF YOU. diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 731bb71..0000000 --- a/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ - - 4.0.0 - com.cybersource.sample - SampleCode - jar - 1.0 - SampleCode - http://maven.apache.org - - - - com.cybersource - cybersource-rest-client-java - 0.0.80 - - - - com.google.guava - guava - [33.0.0-jre,) - - - - commons-io - commons-io - 2.15.1 - - - - com.fasterxml.jackson.core - jackson-databind - 2.16.1 - - - org.bouncycastle - bcpkix-jdk18on - 1.78 - - - - - - - maven-compiler-plugin - 3.7.0 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - prepare-package - - copy-dependencies - - - - ${project.build.directory}/libs - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.9 - - - **/*.java - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - SampleCode - - - true - libs/ - samples.core.SampleCodeRunner - - - - - - - diff --git a/src/main/java/Data/Configuration.java b/src/main/java/Data/Configuration.java deleted file mode 100644 index 8b9d99a..0000000 --- a/src/main/java/Data/Configuration.java +++ /dev/null @@ -1,141 +0,0 @@ -package Data; - -import java.util.Properties; - -public class Configuration { - public static Properties getMerchantDetails() { - Properties props = new Properties(); - - // HTTP_Signature = http_signature and JWT = jwt - props.setProperty("authenticationType", "http_signature"); - props.setProperty("merchantID", "testrest"); - 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", "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"); - props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="); - // 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", "false"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", ""); - props.setProperty("clientCertPassword", ""); - props.setProperty("clientId", ""); - props.setProperty("clientSecret", ""); - - /* - 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"); - - //Add the property if required to override the cybs default developerId in all request body - props.setProperty("defaultDeveloperId", ""); - - return props; - - } - - public static Properties getAlternativeMerchantDetails() { - Properties props = new Properties(); - - // HTTP_Signature = http_signature and JWT = jwt - props.setProperty("authenticationType", "http_signature"); - props.setProperty("merchantID", "testrest_cpctv"); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("requestJsonPath", "src/main/resources/request.json"); - - // JWT Parameters - props.setProperty("keyAlias", "testrest_cpctv"); - props.setProperty("keyPass", "testrest_cpctv"); - props.setProperty("keyFileName", "testrest_cpctv"); - - // P12 key path. Enter the folder path where the .p12 file is located. - - props.setProperty("keysDirectory", "src/main/resources"); - // HTTP Parameters - props.setProperty("merchantKeyId", "964f2ecc-96f0-4432-a742-db0b44e6a73a"); - props.setProperty("merchantsecretKey", "zXKpCqMQPmOR/JRldSlkQUtvvIzOewUVqsUP0sBHpxQ="); - // 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"); - - return props; - - } - - public static Properties getMerchantDetailsForBatchUploadSample() { - Properties props = new Properties(); - - // HTTP_Signature = http_signature and JWT = jwt - props.setProperty("authenticationType", "jwt"); - props.setProperty("merchantID", "qaebc2"); - 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", "qaebc2"); - props.setProperty("keyPass", "?Test1234"); - props.setProperty("keyFileName", "qaebc2"); - - // P12 key path. Enter the folder path where the .p12 file is located. - - props.setProperty("keysDirectory", "src/main/resources"); - - // 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", "false"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", ""); - props.setProperty("clientCertPassword", ""); - props.setProperty("clientId", ""); - props.setProperty("clientSecret", ""); - - - - //Add the property if required to override the cybs default developerId in all request body - props.setProperty("defaultDeveloperId", ""); - - return props; - - } - -} diff --git a/src/main/java/Data/ConfigurationWithIntermediateHost.java b/src/main/java/Data/ConfigurationWithIntermediateHost.java deleted file mode 100644 index 668bd8f..0000000 --- a/src/main/java/Data/ConfigurationWithIntermediateHost.java +++ /dev/null @@ -1,94 +0,0 @@ -package Data; - -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -public class ConfigurationWithIntermediateHost { - public static Properties getMerchantDetails() { - Properties props = new Properties(); - - // HTTP_Signature = http_signature and JWT = jwt - props.setProperty("authenticationType", "http_signature"); - props.setProperty("merchantID", "testrest"); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("intermediateHost", "apitest.axa.com"); - props.setProperty("requestJsonPath", "src/main/resources/request.json"); - - // MetaKey Parameters - props.setProperty("portfolioID", ""); - props.setProperty("useMetaKey", "false"); - - // JWT Parameters - 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"); - props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="); - // 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", "false"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", ""); - props.setProperty("clientCertPassword", ""); - props.setProperty("clientId", ""); - props.setProperty("clientSecret", ""); - - return props; - - } - - public static Properties getAlternativeMerchantDetails() { - Properties props = new Properties(); - - // HTTP_Signature = http_signature and JWT = jwt - props.setProperty("authenticationType", "http_signature"); - props.setProperty("merchantID", "testrest_cpctv"); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("requestJsonPath", "src/main/resources/request.json"); - - // JWT Parameters - props.setProperty("keyAlias", "testrest_cpctv"); - props.setProperty("keyPass", "testrest_cpctv"); - props.setProperty("keyFileName", "testrest_cpctv"); - - // P12 key path. Enter the folder path where the .p12 file is located. - - props.setProperty("keysDirectory", "src/main/resources"); - // HTTP Parameters - props.setProperty("merchantKeyId", "e547c3d3-16e4-444c-9313-2a08784b906a"); - props.setProperty("merchantsecretKey", "JXm4dqKYIxWofM1TIbtYY9HuYo7Cg1HPHxn29f6waRo="); - // 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"); - - return props; - - } - - public static Map getDefaultHeaders() { - Map defaultHeaders = new HashMap(); - defaultHeaders.put("Ocp-Apim-Subscription-Key", "223344"); - defaultHeaders.put("Host", "axa.com"); - return defaultHeaders; - } - -} diff --git a/src/main/java/Data/ConfigurationWithMLE.java b/src/main/java/Data/ConfigurationWithMLE.java deleted file mode 100644 index 88dfc8a..0000000 --- a/src/main/java/Data/ConfigurationWithMLE.java +++ /dev/null @@ -1,189 +0,0 @@ -package Data; - -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -public class ConfigurationWithMLE { - public static Properties getMerchantDetailsWithMLE1() { - - Properties props = new Properties(); - - // MLE only support with JWT = jwt auth type only - props.setProperty("authenticationType", "JWT"); - - props.setProperty("merchantID", "testrest"); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("requestJsonPath", "src/main/resources/request.json"); - - //Set MLE Settings in Merchant Configuration - props.setProperty("useMLEGlobally", "true"); //globally MLE will be enabled for all MLE supported APIs - props.setProperty("mleKeyAlias", "CyberSource_SJC_US"); //this is optional parameter, not required to set the parameter if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - - // MetaKey Parameters - props.setProperty("portfolioID", ""); - props.setProperty("useMetaKey", "false"); - - // JWT Parameters - 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"); - - // 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", "false"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", ""); - props.setProperty("clientCertPassword", ""); - props.setProperty("clientId", ""); - props.setProperty("clientSecret", ""); - -// // HTTP Parameters -// props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda"); -// props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="); - - /* - 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; - - } - - public static Properties getMerchantDetailsWithMLE2() { - - Properties props = new Properties(); - - // MLE only support with JWT = jwt auth type only - props.setProperty("authenticationType", "JWT"); - - props.setProperty("merchantID", "testrest"); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("requestJsonPath", "src/main/resources/request.json"); - - //Set MLE Settings in Merchant Configuration - Map mleMap = new HashMap<>(); - mleMap.put("createPayment", false); //only createPayment function will have MLE=false i.e. (/pts/v2/payments POST API) out of all MLE supported APIs - mleMap.put("capturePayment", true); //capturePayment function will have MLE=true i.e. (/pts/v2/payments/{id}/captures POST API), if it not in list of MLE supportedAPIs else it will already have MLE=true by global MLE parameter. - - props.setProperty("useMLEGlobally", "true"); //globally MLE will be enabled for all MLE supported APIs - props.put("mapToControlMLEonAPI", mleMap); //disable or enable the MLE for APIs which is in the list of mleMAP - props.setProperty("mleKeyAlias", "CyberSource_SJC_US"); //this is optional parameter, not required to set the parameter if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - - // MetaKey Parameters - props.setProperty("portfolioID", ""); - props.setProperty("useMetaKey", "false"); - - // JWT Parameters - 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"); - - // 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", "false"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", ""); - props.setProperty("clientCertPassword", ""); - props.setProperty("clientId", ""); - props.setProperty("clientSecret", ""); - -// // HTTP Parameters -// props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda"); -// props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="); - - /* - 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; - - } - - public static Properties getMerchantDetailsWithMLE3() { - - Properties props = new Properties(); - - // MLE only support with JWT = jwt auth type only - props.setProperty("authenticationType", "JWT"); - - props.setProperty("merchantID", "testrest"); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("requestJsonPath", "src/main/resources/request.json"); - - //Set MLE Settings in Merchant Configuration - Map mleMap = new HashMap<>(); - mleMap.put("createPayment", true); //only createPayment function will have MLE=true i.e. (/pts/v2/payments POST API) - mleMap.put("capturePayment", true); //only capturePayment function will have MLE=true i.e. (/pts/v2/payments/{id}/captures POST API) - - props.setProperty("useMLEGlobally", "false"); //globally MLE will be disabled for all the APIs in SDK - props.put("mapToControlMLEonAPI", mleMap); //disable or enable the MLE for APIs which is in the list of mleMAP - props.setProperty("mleKeyAlias", "CyberSource_SJC_US"); //this is optional parameter, not required to set the parameter if custom value is not required for MLE key alias. Default value is "CyberSource_SJC_US". - - // MetaKey Parameters - props.setProperty("portfolioID", ""); - props.setProperty("useMetaKey", "false"); - - // JWT Parameters - 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"); - - // 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", "false"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", ""); - props.setProperty("clientCertPassword", ""); - props.setProperty("clientId", ""); - props.setProperty("clientSecret", ""); - -// // HTTP Parameters -// props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda"); -// props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="); - - /* - 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; - - } - -} \ No newline at end of file diff --git a/src/main/java/Data/MerchantBoardingConfiguration.java b/src/main/java/Data/MerchantBoardingConfiguration.java deleted file mode 100644 index 443b34a..0000000 --- a/src/main/java/Data/MerchantBoardingConfiguration.java +++ /dev/null @@ -1,38 +0,0 @@ -package Data; - -import java.util.Properties; - -public class MerchantBoardingConfiguration { - - public static Properties getMerchantConfigForBoardingAPI() { - Properties props = new Properties(); - - props.setProperty("authenticationType", "jwt"); - props.setProperty("merchantID", ""); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("requestJsonPath", "src/main/resources/request.json"); - - - props.setProperty("portfolioID", ""); - props.setProperty("useMetaKey", "false"); - - - props.setProperty("keyAlias", ""); - props.setProperty("keyPass", ""); - props.setProperty("keyFileName", ""); - props.setProperty("keysDirectory", "src/main/resources"); - - - props.setProperty("merchantKeyId", ""); - props.setProperty("merchantsecretKey", ""); - - props.setProperty("enableLog", "true"); - props.setProperty("logDirectory", "log"); - props.setProperty("logFilename", "cybs"); - props.setProperty("logMaximumSize", "5M"); - - - return props; - - } -} diff --git a/src/main/java/samples/AccountUpdater/AmexRegistrationCustomerTokenBatch.java b/src/main/java/samples/AccountUpdater/AmexRegistrationCustomerTokenBatch.java deleted file mode 100644 index a14051a..0000000 --- a/src/main/java/samples/AccountUpdater/AmexRegistrationCustomerTokenBatch.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.AccountUpdater; - -import Api.BatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.Accountupdaterv1batchesIncluded; -import Model.Accountupdaterv1batchesIncludedTokens; -import Model.Body; -import Model.InlineResponse202; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -public class AmexRegistrationCustomerTokenBatch { - 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 { - run(); - } - - public static InlineResponse202 run() { - - Body requestObj = new Body(); - - requestObj.type("amexRegistration"); - Accountupdaterv1batchesIncluded included = new Accountupdaterv1batchesIncluded(); - - List tokens = new ArrayList (); - Accountupdaterv1batchesIncludedTokens tokens1 = new Accountupdaterv1batchesIncludedTokens(); - tokens1.id("C06977C0EDC0E985E053AF598E0A3326"); - tokens.add(tokens1); - - Accountupdaterv1batchesIncludedTokens tokens2 = new Accountupdaterv1batchesIncludedTokens(); - tokens2.id("C069A534044F6140E053AF598E0AD492"); - tokens.add(tokens2); - - included.tokens(tokens); - - requestObj.included(included); - - requestObj.merchantReference("TC50171_3"); - requestObj.notificationEmail("test@cybs.com"); - InlineResponse202 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BatchesApi apiInstance = new BatchesApi(apiClient); - result = apiInstance.postBatch(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/AccountUpdater/AmexRegistrationInstrumentIdentifierTokenBatch.java b/src/main/java/samples/AccountUpdater/AmexRegistrationInstrumentIdentifierTokenBatch.java deleted file mode 100644 index 666c9c0..0000000 --- a/src/main/java/samples/AccountUpdater/AmexRegistrationInstrumentIdentifierTokenBatch.java +++ /dev/null @@ -1,82 +0,0 @@ -package samples.AccountUpdater; - -import Api.BatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.Accountupdaterv1batchesIncluded; -import Model.Accountupdaterv1batchesIncludedTokens; -import Model.Body; -import Model.InlineResponse202; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -public class AmexRegistrationInstrumentIdentifierTokenBatch { - 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 { - run(); - } - - public static InlineResponse202 run() { - - Body requestObj = new Body(); - - requestObj.type("amexRegistration"); - Accountupdaterv1batchesIncluded included = new Accountupdaterv1batchesIncluded(); - - List tokens = new ArrayList (); - Accountupdaterv1batchesIncludedTokens tokens1 = new Accountupdaterv1batchesIncludedTokens(); - tokens1.id("7030000000000260224"); - tokens1.expirationMonth("12"); - tokens1.expirationYear("2020"); - tokens.add(tokens1); - - Accountupdaterv1batchesIncludedTokens tokens2 = new Accountupdaterv1batchesIncludedTokens(); - tokens2.id("7030000000000231118"); - tokens2.expirationMonth("12"); - tokens2.expirationYear("2020"); - tokens.add(tokens2); - - included.tokens(tokens); - - requestObj.included(included); - - requestObj.merchantReference("TC50171_3"); - requestObj.notificationEmail("test@cybs.com"); - InlineResponse202 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BatchesApi apiInstance = new BatchesApi(apiClient); - result = apiInstance.postBatch(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/AccountUpdater/ListBatches.java b/src/main/java/samples/AccountUpdater/ListBatches.java deleted file mode 100644 index e88bfef..0000000 --- a/src/main/java/samples/AccountUpdater/ListBatches.java +++ /dev/null @@ -1,52 +0,0 @@ -package samples.AccountUpdater; - -import Api.BatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class ListBatches { - 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 { - run(); - } - - public static void run() { - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - String fromDate = "20230101T123000Z"; - String toDate = "20230410T123000Z"; - BatchesApi apiInstance = new BatchesApi(apiClient); - apiInstance.getBatchesList(0L, 10L, fromDate, toDate); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/AccountUpdater/OneOffVisaMasterCardCustomerTokenBatch.java b/src/main/java/samples/AccountUpdater/OneOffVisaMasterCardCustomerTokenBatch.java deleted file mode 100644 index fd98c64..0000000 --- a/src/main/java/samples/AccountUpdater/OneOffVisaMasterCardCustomerTokenBatch.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.AccountUpdater; - -import Api.BatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.Accountupdaterv1batchesIncluded; -import Model.Accountupdaterv1batchesIncludedTokens; -import Model.Body; -import Model.InlineResponse202; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -public class OneOffVisaMasterCardCustomerTokenBatch { - 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 { - run(); - } - - public static InlineResponse202 run() { - - Body requestObj = new Body(); - - requestObj.type("oneOff"); - Accountupdaterv1batchesIncluded included = new Accountupdaterv1batchesIncluded(); - - List tokens = new ArrayList (); - Accountupdaterv1batchesIncludedTokens tokens1 = new Accountupdaterv1batchesIncludedTokens(); - tokens1.id("C064DE56200B0DB0E053AF598E0A52AA"); - tokens.add(tokens1); - - Accountupdaterv1batchesIncludedTokens tokens2 = new Accountupdaterv1batchesIncludedTokens(); - tokens2.id("C064DE56213D0DB0E053AF598E0A52AA"); - tokens.add(tokens2); - - included.tokens(tokens); - - requestObj.included(included); - - requestObj.merchantReference("TC50171_3"); - requestObj.notificationEmail("test@cybs.com"); - InlineResponse202 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BatchesApi apiInstance = new BatchesApi(apiClient); - result = apiInstance.postBatch(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/AccountUpdater/OneOffVisaMasterCardInstrumentIdentifierTokenBatch.java b/src/main/java/samples/AccountUpdater/OneOffVisaMasterCardInstrumentIdentifierTokenBatch.java deleted file mode 100644 index ed13b1a..0000000 --- a/src/main/java/samples/AccountUpdater/OneOffVisaMasterCardInstrumentIdentifierTokenBatch.java +++ /dev/null @@ -1,82 +0,0 @@ -package samples.AccountUpdater; - -import Api.BatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.Accountupdaterv1batchesIncluded; -import Model.Accountupdaterv1batchesIncludedTokens; -import Model.Body; -import Model.InlineResponse202; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -public class OneOffVisaMasterCardInstrumentIdentifierTokenBatch { - 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 { - run(); - } - - public static InlineResponse202 run() { - - Body requestObj = new Body(); - - requestObj.type("oneOff"); - Accountupdaterv1batchesIncluded included = new Accountupdaterv1batchesIncluded(); - - List tokens = new ArrayList (); - Accountupdaterv1batchesIncludedTokens tokens1 = new Accountupdaterv1batchesIncludedTokens(); - tokens1.id("7030000000000116236"); - tokens1.expirationMonth("12"); - tokens1.expirationYear("2020"); - tokens.add(tokens1); - - Accountupdaterv1batchesIncludedTokens tokens2 = new Accountupdaterv1batchesIncludedTokens(); - tokens2.id("7030000000000178855"); - tokens2.expirationMonth("12"); - tokens2.expirationYear("2020"); - tokens.add(tokens2); - - included.tokens(tokens); - - requestObj.included(included); - - requestObj.merchantReference("TC50171_3"); - requestObj.notificationEmail("test@cybs.com"); - InlineResponse202 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BatchesApi apiInstance = new BatchesApi(apiClient); - result = apiInstance.postBatch(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/AccountUpdater/RetrieveBatchReport.java b/src/main/java/samples/AccountUpdater/RetrieveBatchReport.java deleted file mode 100644 index a8d81f7..0000000 --- a/src/main/java/samples/AccountUpdater/RetrieveBatchReport.java +++ /dev/null @@ -1,54 +0,0 @@ -package samples.AccountUpdater; - -import Api.BatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.InlineResponse20011; -import Model.InlineResponse2009; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class RetrieveBatchReport { - 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 { - run(); - } - - public static void run() { - String batchId = "16188390061150001062041064"; - InlineResponse20011 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BatchesApi apiInstance = new BatchesApi(apiClient); - result = apiInstance.getBatchReport(batchId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/AccountUpdater/RetrieveBatchStatus.java b/src/main/java/samples/AccountUpdater/RetrieveBatchStatus.java deleted file mode 100644 index afb28c7..0000000 --- a/src/main/java/samples/AccountUpdater/RetrieveBatchStatus.java +++ /dev/null @@ -1,55 +0,0 @@ -package samples.AccountUpdater; - -import Api.BatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.InlineResponse2008; -import Model.InlineResponse20010; - -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class RetrieveBatchStatus { - 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 { - run(); - } - - public static void run() { - String batchId = "16188390061150001062041064"; - InlineResponse20010 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BatchesApi apiInstance = new BatchesApi(apiClient); - result = apiInstance.getBatchStatus(batchId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/AccountUpdater/StandaloneAuraCardCsvUploadApp.java b/src/main/java/samples/AccountUpdater/StandaloneAuraCardCsvUploadApp.java deleted file mode 100644 index 9127b76..0000000 --- a/src/main/java/samples/AccountUpdater/StandaloneAuraCardCsvUploadApp.java +++ /dev/null @@ -1,222 +0,0 @@ -package samples.AccountUpdater; -import com.nimbusds.jose.JWSSigner; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; - - -import java.lang.invoke.MethodHandles; -import java.nio.file.Paths; -import java.security.NoSuchAlgorithmException; -import java.security.KeyStore; -import java.security.MessageDigest; -import java.security.cert.Certificate; -import java.security.cert.X509Certificate; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.time.Instant; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.util.*; - -import okhttp3.MediaType; -import okhttp3.Response; -import okhttp3.OkHttpClient; -import okhttp3.RequestBody; -import okhttp3.Request; -import org.apache.commons.lang3.RandomStringUtils; - -import com.nimbusds.jose.JWSAlgorithm; -import com.nimbusds.jose.JWSHeader; -import com.nimbusds.jose.crypto.RSASSASigner; -import com.nimbusds.jwt.JWTClaimsSet; -import com.nimbusds.jwt.SignedJWT; -import org.bouncycastle.jce.provider.BouncyCastleProvider; - - -public class StandaloneAuraCardCsvUploadApp { - - public static void WriteLogAudit(int status) { - String filename = MethodHandles.lookup().lookupClass().getSimpleName(); - System.out.println("[Sample Code Testing] [" + filename + "] " + status); - } - /* - * This Java application demonstrates how to upload a file using a multipart/form-data request with JWT authentication for the card upload CSV endpoint in AURA. - * CyberSource Business Center - https://ebc2test.cybersource.com/ebc2/ - * Instructions on generating your own .P12 from CyberSource Business Center - https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/authentication/createCertSharedKey.html - * Also, To understand details about CyberSource JWT headers, please check Authentication guide - https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/authentication/GenerateHeader/jwtTokenAuthentication.html - * This sample standalone demonstrates a full end to end working of uploading a file with a multipart/form-data request and building a JWT token for API authentication. - * - */ - public static void main(String[] args) throws IOException, NoSuchAlgorithmException { - if (args.length < 4) { - System.out.println("Usage: "); - return; - } - String merchantId = args[0]; - String csv_file_path = args[1]; - String P12_FILE_PATH = args[2]; - String P12_PASSWORD = args[3]; - String URL = args[4] + "/accountupdater/v1/batches/upload-csv-card-numbers"; - run(merchantId, csv_file_path,P12_FILE_PATH,P12_PASSWORD,URL); - } - - public static void run(String merchantId, String file_path, String P12_FILE_PATH, String P12_PASSWORD, String URL) throws IOException, NoSuchAlgorithmException { - String fileName = Paths.get(file_path).getFileName().toString(); - String randomNumeric = RandomStringUtils.randomNumeric(24); - String fullFile = "--" + randomNumeric + "\n"; - fullFile += "Content-Disposition: form-data; name=\"file\"; filename=\"" + fileName + "\"\n" - + "Content-Type: text/csv" + "\n" + "\n"; - String token = null; - try (Scanner scanner = new Scanner(new File(file_path))) { - while (scanner.hasNextLine()) { - String line = scanner.nextLine(); - fullFile += line + "\n"; - } - fullFile += "--" + randomNumeric + "--"; - - FileInputStream fis = new FileInputStream(P12_FILE_PATH); - KeyStore keystore = KeyStore.getInstance("PKCS12", new BouncyCastleProvider()); - keystore.load(fis, P12_PASSWORD.toCharArray()); - String alias = null; - Enumeration enumKeyStore = keystore.aliases(); - ArrayList array = new ArrayList(); - - while (enumKeyStore.hasMoreElements()) { - alias = enumKeyStore.nextElement(); - array.add(alias); - if (alias.contains(merchantId)) { - break; - } - } - - - KeyStore.PrivateKeyEntry privateKeyTest; - // Get the certificate - alias = keyAliasValidator(array, merchantId); - privateKeyTest = (KeyStore.PrivateKeyEntry) keystore.getEntry(alias, - new KeyStore.PasswordProtection(merchantId.toCharArray())); - Certificate certificate = keystore.getCertificate(alias); - - // Cast to X509Certificate to access more details - X509Certificate x509Certificate = (X509Certificate) certificate; - - // Extract SERIALNUMBER and CN - String subjectDN = x509Certificate.getSubjectDN().getName(); - String serialNumber = ""; - String cn = ""; - - String[] dnComponents = subjectDN.split(","); - for (String component : dnComponents) { - if (component.startsWith("SERIALNUMBER=")) { - serialNumber = component.substring("SERIALNUMBER=".length()); - } else if (component.startsWith("CN=")) { - cn = component.substring("CN=".length()); - } - } - - fis.close(); - - JWSSigner signer = new RSASSASigner(privateKeyTest.getPrivateKey()); - String digest = generateDigest(fullFile); - try { - JWSHeader header = new JWSHeader.Builder(JWSAlgorithm.RS256) - .customParam("v-c-merchant-id", cn) - .keyID(serialNumber) - .build(); - Instant now = Instant.now(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") - .withZone(ZoneOffset.UTC); - String iat = formatter.format(now); - // Prepare JWT with claims set - JWTClaimsSet claimsSet = new JWTClaimsSet.Builder() - .claim("digest", digest) - .claim("digestAlgorithm", "SHA-256") - .claim("iat", iat) - .build(); - - SignedJWT signedJWT = new SignedJWT( - header, - claimsSet); - signedJWT.sign(signer); - - token = signedJWT.serialize(); - - System.out.println("Generated JWT Token: " + token); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (Exception e) { - throw new RuntimeException(e); - } - - OkHttpClient client = new OkHttpClient(); - String requestBody = fullFile; - - RequestBody body = RequestBody.create( - requestBody, MediaType.get("multipart/form-data; charset=utf-8; boundary=" + randomNumeric)); - - Request request = new Request.Builder() - .url(URL) - .post(body) - .addHeader("Content-Type", "multipart/form-data; charset=utf-8; boundary=" + randomNumeric) - .addHeader("Authorization", "Bearer " + token) - .addHeader("v-c-correlation-id", "") - .build(); - - Response response = client.newCall(request).execute(); - if (response.isSuccessful()) { - System.out.println("POST request worked"); - System.out.println("Response Body :: " + response.body().string()); - } else { - System.out.println("POST request did not work " + response.body().string()); - } - WriteLogAudit(response.code()); - - } - - /* - - * This method generates a SHA-256 hash of the given payload and returns the Base64-encoded string representation of the hash. - * It uses the MessageDigest class to compute the hash and the Base64 class to encode the hash. - * This takes the converted csv file payload as the input and returns the base64 encoded hash to use as the digest - * - */ - public static String generateDigest(String payload) throws NoSuchAlgorithmException { - // Create a MessageDigest instance for SHA-256 - MessageDigest digest = MessageDigest.getInstance("SHA-256"); - - // Calculate the hash - byte[] hash = digest.digest(payload.getBytes(StandardCharsets.UTF_8)); - - // Encode the hash using Base64 - return Base64.getEncoder().encodeToString(hash); - } - private static String keyAliasValidator(ArrayList array, String merchantID) { - int size = array.size(); - String tempKeyAlias, merchantKeyAlias, result; - StringTokenizer str; - for (int i = 0; i < size; i++) { - merchantKeyAlias = array.get(i).toString(); - str = new StringTokenizer(merchantKeyAlias, ","); - while (str.hasMoreTokens()) { - tempKeyAlias = str.nextToken(); - if (tempKeyAlias.contains("CN")) { - str = new StringTokenizer(tempKeyAlias, "="); - while (str.hasMoreElements()) { - result = str.nextToken(); - if (result.equalsIgnoreCase(merchantID)) { - return merchantKeyAlias; - } - } - } - } - } - - return null; - } -} - - diff --git a/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithJKS.java b/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithJKS.java deleted file mode 100644 index 6c8f35e..0000000 --- a/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithJKS.java +++ /dev/null @@ -1,60 +0,0 @@ -package samples.BatchUploadAPI; - -import java.io.File; -import java.lang.invoke.MethodHandles; -import Api.BatchUploadwithMTLSApi; -import Invokers.ApiResponse; - -public class BatchUploadMTLSwithJKS { - private static int responseCode ; - private static String responseMessage = null; - - 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 { - run(); - } - - public static void run() { - try { - - // Get the file path from the resources folder - String fileName="batchapiTest.csv"; - String filePath = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/"+fileName).getPath(); - - //Input1 - Create a File object - File inputFile = new File(filePath); - //Input2 - Env Host name - String envHostName = "secure-batch-test.cybersource.com"; //cas env - //Input3 - File path of public key for pgp encryption - String publicKeyFile = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/bts-encryption-public.asc").getPath(); - //Input4 - keystore path which contains client private key and client cert - String keystorePath = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/pushtest.jks").getPath(); - //Input5 - keystore password - char[] keyStorePassword = "changeit".toCharArray(); - //Input6 - trustStore path which contains server cert - String truststorePath = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/castrust.jks").getPath(); - //Input7 - trustStore Password - char[] truststorePassword = "changeit".toCharArray(); - - - //SDK need file object and jks to upload file to batch api endpoint - BatchUploadwithMTLSApi apiInstance= new BatchUploadwithMTLSApi(); - ApiResponse result= apiInstance.uploadBatchAPI(inputFile, envHostName, publicKeyFile, keystorePath, keyStorePassword, truststorePath, truststorePassword); - - - responseCode = result.getStatusCode(); - responseMessage = result.getMessage(); - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + responseMessage); - WriteLogAudit(responseCode); - - } catch (Exception e) { - e.printStackTrace(); - } - } - -} diff --git a/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithKeys.java b/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithKeys.java deleted file mode 100644 index 9d24fcb..0000000 --- a/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithKeys.java +++ /dev/null @@ -1,124 +0,0 @@ -package samples.BatchUploadAPI; - -import java.io.File; -import java.io.FileReader; -import java.lang.invoke.MethodHandles; -import java.security.PrivateKey; -import java.security.Security; -import java.security.cert.X509Certificate; -import java.util.Collection; - -import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.bouncycastle.openpgp.PGPPublicKey; -import org.bouncycastle.openssl.PEMEncryptedKeyPair; -import org.bouncycastle.openssl.PEMKeyPair; -import org.bouncycastle.openssl.PEMParser; -import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; -import org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8DecryptorProviderBuilder; -import org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder; -import org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo; - -import Api.BatchUploadwithMTLSApi; -import Invokers.ApiResponse; -import utilities.pgpBatchUpload.BatchUploadUtility; - -public class BatchUploadMTLSwithKeys { - private static int responseCode ; - private static String responseMessage = null; - - 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 { - run(); - } - - public static void run() { - try { - - // Get the file path from the resources folder - String fileName="batchapiTest.csv"; - String filePath = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/"+fileName).getPath(); - - //Input1 - Create a File object - File inputFile = new File(filePath); - - //Input2 - Env Host name - String envHostName = "secure-batch-test.cybersource.com"; //cas env - - //Read public and private keys - - //Input3 - PGP Public Key Object - String publicKeyFile = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/bts-encryption-public.asc").getPath(); - PGPPublicKey pgpPublicKey = BatchUploadUtility.readPGPPublicKey(publicKeyFile); - - //Input4 - Client Private Key Object - String clientprivatekeypath= BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/client_private_key.key").getPath(); - PrivateKey clientPrivateKey = loadPrivateKeyFromPemFile(clientprivatekeypath,null); - - //Input5 - Client Certificate Key Object - String clientcertPath= BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/client_cert.crt").getPath(); - Collection clientCerts = BatchUploadUtility.loadCertificatesFromPemFile(clientcertPath); - - //Input6 - Server Certificate Key Object - String servercertPath= BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/serverCasCert.pem").getPath(); - Collection serverCerts = BatchUploadUtility.loadCertificatesFromPemFile(servercertPath); - - - //SDK need file object and jks to upload file to batch api endpoint - BatchUploadwithMTLSApi apiInstance= new BatchUploadwithMTLSApi(); - ApiResponse result= apiInstance.uploadBatchAPI(inputFile, envHostName, pgpPublicKey, clientPrivateKey, clientCerts.iterator().next(), serverCerts); - - - responseCode = result.getStatusCode(); - responseMessage = result.getMessage(); - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + responseMessage); - WriteLogAudit(responseCode); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - public static PrivateKey loadPrivateKeyFromPemFile(String keyFilePath, char[] password) throws Exception { - Security.addProvider(new BouncyCastleProvider()); - try (FileReader keyReader = new FileReader(keyFilePath); - PEMParser pemParser = new PEMParser(keyReader)) { - Object object = pemParser.readObject(); - JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC"); - - if (object instanceof PEMKeyPair) { - // Unencrypted PKCS#1 key - return converter.getKeyPair((PEMKeyPair) object).getPrivate(); - } else if (object instanceof PEMEncryptedKeyPair) { - // Encrypted PKCS#1 key - if (password == null) { - throw new IllegalArgumentException("Private key is password protected, but no password was provided."); - } - JcePEMDecryptorProviderBuilder decProvBuilder = new JcePEMDecryptorProviderBuilder(); - PEMEncryptedKeyPair encKeyPair = (PEMEncryptedKeyPair) object; - PEMKeyPair decryptedKeyPair = encKeyPair.decryptKeyPair(decProvBuilder.build(password)); - return converter.getKeyPair(decryptedKeyPair).getPrivate(); - } else if (object instanceof PrivateKeyInfo) { - // Unencrypted PKCS#8 key - return converter.getPrivateKey((PrivateKeyInfo) object); - } else if (object instanceof PKCS8EncryptedPrivateKeyInfo) { - // Encrypted PKCS#8 key - if (password == null) { - throw new IllegalArgumentException("Private key is password protected, but no password was provided."); - } - PKCS8EncryptedPrivateKeyInfo encPrivKeyInfo = (PKCS8EncryptedPrivateKeyInfo) object; - JceOpenSSLPKCS8DecryptorProviderBuilder decryptorBuilder = new JceOpenSSLPKCS8DecryptorProviderBuilder(); - PrivateKeyInfo pkInfo = encPrivKeyInfo.decryptPrivateKeyInfo(decryptorBuilder.build(password)); - return converter.getPrivateKey(pkInfo); - } else { - throw new IllegalArgumentException("Unsupported PEM object: " + object.getClass()); - } - } - } - -} diff --git a/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithP12.java b/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithP12.java deleted file mode 100644 index b3dd940..0000000 --- a/src/main/java/samples/BatchUploadAPI/BatchUploadMTLSwithP12.java +++ /dev/null @@ -1,59 +0,0 @@ -package samples.BatchUploadAPI; - -import java.io.File; -import java.lang.invoke.MethodHandles; - -import Api.BatchUploadwithMTLSApi; -import Invokers.ApiResponse; - -public class BatchUploadMTLSwithP12 { - private static int responseCode ; - private static String responseMessage = null; - - 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 { - run(); - } - - public static void run() { - try { - - // Get the file path from the resources folder - String fileName="batchapiTest.csv"; - String filePath = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/"+fileName).getPath(); - - //Input1 - Create a File object - File inputFile = new File(filePath); - //Input2 - Env Host name - String envHostName = "secure-batch-test.cybersource.com"; //cas env - //Input3 - File path of public key for pgp encryption - String publicKeyFile = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/bts-encryption-public.asc").getPath(); - //Input4 - keystore path which contains client private key and client cert - String p12Path = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/pushtest.p12").getPath(); - //Input5 - keystore password - char[] p12Password = "changeit".toCharArray(); - //Input6 - trustStore path which contains server cert - String serverCertPath = BatchUploadMTLSwithJKS.class.getClassLoader().getResource("batchApiMTLS/serverCasCert.pem").getPath(); - - - - //SDK need file object and jks to upload file to batch api endpoint - BatchUploadwithMTLSApi apiInstance= new BatchUploadwithMTLSApi(); - ApiResponse result= apiInstance.uploadBatchAPI(inputFile, envHostName, publicKeyFile, p12Path, p12Password, serverCertPath); - - - responseCode = result.getStatusCode(); - responseMessage = result.getMessage(); - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + responseMessage); - WriteLogAudit(responseCode); - - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/src/main/java/samples/BinLookup/BINLookupWithCard.java b/src/main/java/samples/BinLookup/BINLookupWithCard.java deleted file mode 100644 index df927ef..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithCard.java +++ /dev/null @@ -1,76 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithCard { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupClientReferenceInformation clientReferenceInformation = new Binv1binlookupClientReferenceInformation(); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Binv1binlookupPaymentInformation paymentInformation = new Binv1binlookupPaymentInformation(); - Binv1binlookupPaymentInformationCard paymentInformationCard = new Binv1binlookupPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result = apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - - } -} \ No newline at end of file diff --git a/src/main/java/samples/BinLookup/BINLookupWithHealthcareCard.java b/src/main/java/samples/BinLookup/BINLookupWithHealthcareCard.java deleted file mode 100644 index 503ed4a..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithHealthcareCard.java +++ /dev/null @@ -1,72 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithHealthcareCard { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupPaymentInformation paymentInformation = new Binv1binlookupPaymentInformation(); - Binv1binlookupPaymentInformationCard paymentInformationCard = new Binv1binlookupPaymentInformationCard(); - paymentInformationCard.number("4288900100000"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result = apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/BinLookup/BINLookupWithNetworkToken.java b/src/main/java/samples/BinLookup/BINLookupWithNetworkToken.java deleted file mode 100644 index 8ddbe57..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithNetworkToken.java +++ /dev/null @@ -1,72 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithNetworkToken { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupPaymentInformation paymentInformation = new Binv1binlookupPaymentInformation(); - Binv1binlookupPaymentInformationCard paymentInformationCard = new Binv1binlookupPaymentInformationCard(); - paymentInformationCard.number("4895370016313691"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result= apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/BinLookup/BINLookupWithTMSCustomerID.java b/src/main/java/samples/BinLookup/BINLookupWithTMSCustomerID.java deleted file mode 100644 index 7663edf..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithTMSCustomerID.java +++ /dev/null @@ -1,72 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithTMSCustomerID { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupPaymentInformation paymentInformation = new Binv1binlookupPaymentInformation(); - GetAllSubscriptionsResponsePaymentInformationCustomer paymentInformationCustomer = new GetAllSubscriptionsResponsePaymentInformationCustomer(); - paymentInformationCustomer.id("E5426CFDE77F7390E053A2598D0A925D"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result= apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/BinLookup/BINLookupWithTMSInstrumentIdentifier.java b/src/main/java/samples/BinLookup/BINLookupWithTMSInstrumentIdentifier.java deleted file mode 100644 index d08bfde..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithTMSInstrumentIdentifier.java +++ /dev/null @@ -1,73 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithTMSInstrumentIdentifier { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupPaymentInformation paymentInformation = new Binv1binlookupPaymentInformation(); - Ptsv2paymentsPaymentInformationInstrumentIdentifier paymentInformationInstrumentIdentifier = new Ptsv2paymentsPaymentInformationInstrumentIdentifier(); - paymentInformationInstrumentIdentifier.id("7010000000016241111"); - paymentInformation.instrumentIdentifier(paymentInformationInstrumentIdentifier); - - requestObj.paymentInformation(paymentInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result=apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - - } -} \ No newline at end of file diff --git a/src/main/java/samples/BinLookup/BINLookupWithTMSJWTTransientToken.java b/src/main/java/samples/BinLookup/BINLookupWithTMSJWTTransientToken.java deleted file mode 100644 index c72b8b9..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithTMSJWTTransientToken.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithTMSJWTTransientToken { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupTokenInformation tokenInformation = new Binv1binlookupTokenInformation(); - tokenInformation.transientTokenJwt("eyJraWQiOiIwODd0bk1DNU04bXJHR3JHMVJQTkwzZ2VyRUh5VWV1ciIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJGbGV4LzA4IiwiZXhwIjoxNjYwMTk1ODcwLCJ0eXBlIjoiYXBpLTAuMS4wIiwiaWF0IjoxNjYwMTk0OTcwLCJqdGkiOiIxRTBXQzFHTzg3SkcxQkRQMENROFNDUjFUVEs4NlU5Tjk4SDNXSDhJRk05TVZFV1RJWUZJNjJGNDk0MUU3QTkyIiwiY29udGVudCI6eyJwYXltZW50SW5mb3JtYXRpb24iOnsiY2FyZCI6eyJudW1iZXIiOnsibWFza2VkVmFsdWUiOiJYWFhYWFhYWFhYWFgxMTExIiwiYmluIjoiNDExMTExIn0sInR5cGUiOnsidmFsdWUiOiIwMDEifX19fX0.MkCLbyvufN4prGRvHJcqCu1WceDVlgubZVpShNWQVjpuFQUuqwrKg284sC7ucVKuIsOU0DTN8_OoxDLduvZhS7X_5TnO0QjyA_aFxbRBvU_bEz1l9V99VPADG89T-fox_L6sLUaoTJ8T4PyD7rkPHEA0nmXbqQCVqw4Czc5TqlKCwmL-Fe0NBR2HlOFI1PrSXT-7_wI-JTgXI0dQzb8Ub20erHwOLwu3oni4_ZmS3rGI_gxq2MHi8pO-ZOgA597be4WfVFAx1wnMbareqR72a0QM4DefeoltrpNqXSaASVyb5G0zuqg-BOjWJbawmg2QgcZ_vE3rJ6PDgWROvp9Tbw"); - requestObj.tokenInformation(tokenInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result =apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - - } -} \ No newline at end of file diff --git a/src/main/java/samples/BinLookup/BINLookupWithTMSJtiTransientToken.java b/src/main/java/samples/BinLookup/BINLookupWithTMSJtiTransientToken.java deleted file mode 100644 index df26ae9..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithTMSJtiTransientToken.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithTMSJtiTransientToken { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupTokenInformation tokenInformation = new Binv1binlookupTokenInformation(); - tokenInformation.jti("1E0WC1GO87JG1BDP0CQ8SCR1TTK86U9N98H3WH8IFM9MVEWTIYFI62F4941E7A92"); - requestObj.tokenInformation(tokenInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result=apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - - } -} \ No newline at end of file diff --git a/src/main/java/samples/BinLookup/BINLookupWithTMSPaymentInstrument.java b/src/main/java/samples/BinLookup/BINLookupWithTMSPaymentInstrument.java deleted file mode 100644 index 1400f1f..0000000 --- a/src/main/java/samples/BinLookup/BINLookupWithTMSPaymentInstrument.java +++ /dev/null @@ -1,73 +0,0 @@ -package samples.BinLookup; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class BINLookupWithTMSPaymentInstrument { - 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 { - run(); - } - - public static InlineResponse2012 run() { - - CreateBinLookupRequest requestObj = new CreateBinLookupRequest(); - - Binv1binlookupPaymentInformation paymentInformation = new Binv1binlookupPaymentInformation(); - Ptsv2paymentsPaymentInformationPaymentInstrument paymentInformationPaymentInstrument = new Ptsv2paymentsPaymentInformationPaymentInstrument(); - paymentInformationPaymentInstrument.id("E5427539180789D0E053A2598D0AF053"); - paymentInformation.paymentInstrument(paymentInformationPaymentInstrument); - - requestObj.paymentInformation(paymentInformation); - - - InlineResponse2012 result=null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - BinLookupApi apiInstance = new BinLookupApi(apiClient); - result =apiInstance.getAccountInfo(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - - } -} \ No newline at end of file diff --git a/src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCard.java b/src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCard.java deleted file mode 100644 index ae907a5..0000000 --- a/src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCard.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.FlexMicroform; - -import java.util.*; -import com.cybersource.authsdk.core.MerchantConfig; -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Model.*; - -public class GenerateCaptureContextAcceptCard { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - - public static void main(String args[]) throws Exception { - run(); - } - - public static void run() { - - GenerateCaptureContextRequest requestObj = new GenerateCaptureContextRequest(); - - requestObj.clientVersion("v2"); - - List targetOrigins = new ArrayList (); - targetOrigins.add("https://www.test.com"); - requestObj.targetOrigins(targetOrigins); - - List allowedCardNetworks = new ArrayList (); - allowedCardNetworks.add("VISA"); - allowedCardNetworks.add("MASTERCARD"); - allowedCardNetworks.add("AMEX"); - allowedCardNetworks.add("CARNET"); - allowedCardNetworks.add("CARTESBANCAIRES"); - allowedCardNetworks.add("CUP"); - allowedCardNetworks.add("DINERSCLUB"); - allowedCardNetworks.add("DISCOVER"); - allowedCardNetworks.add("EFTPOS"); - allowedCardNetworks.add("ELO"); - allowedCardNetworks.add("JCB"); - allowedCardNetworks.add("JCREW"); - allowedCardNetworks.add("MADA"); - allowedCardNetworks.add("MAESTRO"); - allowedCardNetworks.add("MEEZA"); - requestObj.allowedCardNetworks(allowedCardNetworks); - - List allowedPaymentTypes = new ArrayList(); - allowedPaymentTypes.add("CARD"); - requestObj.allowedPaymentTypes(allowedPaymentTypes); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - MicroformIntegrationApi apiInstance = new MicroformIntegrationApi(apiClient); - String response = apiInstance.generateCaptureContext(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println("Response Body :" + response); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCheck.java b/src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCheck.java deleted file mode 100644 index 0b2821b..0000000 --- a/src/main/java/samples/FlexMicroform/GenerateCaptureContextAcceptCheck.java +++ /dev/null @@ -1,52 +0,0 @@ -package samples.FlexMicroform; - -import java.util.*; -import com.cybersource.authsdk.core.MerchantConfig; -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Model.*; - -public class GenerateCaptureContextAcceptCheck { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - - public static void main(String args[]) throws Exception { - run(); - } - - public static void run() { - - GenerateCaptureContextRequest requestObj = new GenerateCaptureContextRequest(); - - requestObj.clientVersion("v2"); - - List targetOrigins = new ArrayList (); - targetOrigins.add("https://www.test.com"); - requestObj.targetOrigins(targetOrigins); - - List allowedPaymentTypes = new ArrayList(); - allowedPaymentTypes.add("CHECK"); - requestObj.allowedPaymentTypes(allowedPaymentTypes); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - MicroformIntegrationApi apiInstance = new MicroformIntegrationApi(apiClient); - String response = apiInstance.generateCaptureContext(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println("Response Body :" + response); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/IntermediateHost/Payments/Payments/MultiThread.java b/src/main/java/samples/IntermediateHost/Payments/Payments/MultiThread.java deleted file mode 100644 index dffd40c..0000000 --- a/src/main/java/samples/IntermediateHost/Payments/Payments/MultiThread.java +++ /dev/null @@ -1,141 +0,0 @@ -package samples.IntermediateHost.Payments.Payments; -import Api.InstrumentIdentifierApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.PostInstrumentIdentifierRequest; -import Model.TmsEmbeddedInstrumentIdentifierBankAccount; -import Model.TmsEmbeddedInstrumentIdentifierCard; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; -import java.util.Random; - -public class MultiThread { - private static String responseCode = null; - private static String status = null; - private static MerchantConfig merchantConfig; - private static ApiClient apiClient; - static int counter =0; - - - - - - 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{ - Properties merchantProp = Configuration.getMerchantDetails(); - merchantConfig = new MerchantConfig(merchantProp); - apiClient = new ApiClient(); - apiClient.merchantConfig = merchantConfig; - - int numberOfRuns =1; - - for (int i = 0; i < numberOfRuns; i++) { - Thread thread1 = new Thread(new Runnable() { - @Override - public void run() { - String result1 = runMethod1(); - System.out.println("Result from Method 1: " + Integer.toString(++counter) +" " +result1); - } - }); - - Thread thread2 = new Thread(new Runnable() { - @Override - public void run() { - String result2 = runMethod2(); - System.out.println("Result from Method 2: "+ Integer.toString(++counter) +" " +result2); - } - }); - - thread1.start(); - thread2.start(); - - - } - } - - public static String runMethod1() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - PostInstrumentIdentifierRequest requestObj = new PostInstrumentIdentifierRequest(); - - TmsEmbeddedInstrumentIdentifierBankAccount bankAccount = new TmsEmbeddedInstrumentIdentifierBankAccount(); - bankAccount.number("4100"); - String rnum= "07192328" + String.valueOf(new Random().nextInt(10)); - bankAccount.routingNumber(rnum); - requestObj.bankAccount(bankAccount); - - PostInstrumentIdentifierRequest result = null; - try { -// ApiClient apiClient = new ApiClient(); -// apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.postInstrumentIdentifier(requestObj, profileid,false); - - String responseCode = apiClient.responseCode; - boolean status = rnum.equals(result.getBankAccount().getRoutingNumber()); -// System.out.println("ResponseCode :" + responseCode); -// System.out.println("ResponseMessage :" + status); -// System.out.println(result); -// WriteLogAudit(Integer.parseInt(responseCode)); - return String.valueOf(status); - - } catch (ApiException e) { - e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - public static String runMethod2(){ - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - PostInstrumentIdentifierRequest requestObj = new PostInstrumentIdentifierRequest(); - - TmsEmbeddedInstrumentIdentifierCard card = new TmsEmbeddedInstrumentIdentifierCard(); - String rnum= "411111111111" + String.valueOf(1000 + new Random().nextInt(9000)); - card.number(rnum); - requestObj.card(card); - - ApiResponse result = null; - try { -// ApiClient apiClient = new ApiClient(); -// apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.postInstrumentIdentifierWithHttpInfo(requestObj, profileid,false); - - PostInstrumentIdentifierRequest result1 = result.getData(); - - - String lastFourDigitsStr1 = rnum.substring(rnum.length() - 4); - String lastFourDigitsStr2 = result1.getCard().getNumber().substring(result1.getCard().getNumber().length() - 4); - - String responseCode = apiClient.responseCode; - boolean status = lastFourDigitsStr1.equals(lastFourDigitsStr2); - - //oauth - not thread safe in case same instance of merchantConfig and api client - //apiClient.responseCode , apiClient.status - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); -// WriteLogAudit(Integer.parseInt(responseCode)); - return String.valueOf(status); - } catch (ApiException e) { - e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - -} diff --git a/src/main/java/samples/IntermediateHost/Payments/Payments/SimpleAuthorizationInternetWithCustomHeaders.java b/src/main/java/samples/IntermediateHost/Payments/Payments/SimpleAuthorizationInternetWithCustomHeaders.java deleted file mode 100644 index 0bab3ce..0000000 --- a/src/main/java/samples/IntermediateHost/Payments/Payments/SimpleAuthorizationInternetWithCustomHeaders.java +++ /dev/null @@ -1,97 +0,0 @@ -package samples.IntermediateHost.Payments.Payments; - -import java.*; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.ConfigurationWithIntermediateHost; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SimpleAuthorizationInternetWithCustomHeaders { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - private static Map defaultHeaders; - public static boolean userCapture = false; - - public static void main(String args[]) throws Exception { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = ConfigurationWithIntermediateHost.getMerchantDetails(); - defaultHeaders = ConfigurationWithIntermediateHost.getDefaultHeaders(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp, defaultHeaders); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println(result); - - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/InvoiceSettings/GetInvoiceSettings.java b/src/main/java/samples/Invoicing/InvoiceSettings/GetInvoiceSettings.java deleted file mode 100644 index f1e27ae..0000000 --- a/src/main/java/samples/Invoicing/InvoiceSettings/GetInvoiceSettings.java +++ /dev/null @@ -1,60 +0,0 @@ -package samples.Invoicing.InvoiceSettings; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetInvoiceSettings { - 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 InvoicingV2InvoiceSettingsGet200Response run() { - InvoicingV2InvoiceSettingsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoiceSettingsApi apiInstance = new InvoiceSettingsApi(apiClient); - result = apiInstance.getInvoiceSettings(); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/InvoiceSettings/UpdateInvoiceSettings.java b/src/main/java/samples/Invoicing/InvoiceSettings/UpdateInvoiceSettings.java deleted file mode 100644 index 3a57999..0000000 --- a/src/main/java/samples/Invoicing/InvoiceSettings/UpdateInvoiceSettings.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.Invoicing.InvoiceSettings; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class UpdateInvoiceSettings { - 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 InvoicingV2InvoiceSettingsGet200Response run() { - - InvoiceSettingsRequest requestObj = new InvoiceSettingsRequest(); - - Invoicingv2invoiceSettingsInvoiceSettingsInformation invoiceSettingsInformation = new Invoicingv2invoiceSettingsInvoiceSettingsInformation(); - invoiceSettingsInformation.merchantLogo("/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAQCAwMDAgQDAwMEBAQEBQkGBQUFBQsICAYJDQsNDQ0LDAwOEBQRDg8TDwwMEhgSExUWFxcXDhEZGxkWGhQWFxb/2wBDAQQEBAUFBQoGBgoWDwwPFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhb/wAARCADHAM0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDlPBvhzU77xaYFVhHnIIPf3rp/il4d1+w0lFWRwi4PBPWvQtG0+LSv+Jj5e1gM9OteP/tCfFjUJPEUOl29q0kEOPMYD9K8aMYVpc0Y3kehgOIcfGrDC4jSLeunTubXwa0i4F95+s3DttwQGbPFeqa1rNnJY/ZUnIyMKoavEdD8R6nq+mK9hbMJFXCgHkmtjwB4P8Y6zqzahqly1uMYjXooFY+wrzbex9X7SjKvGFBuSv8Ah6m1d648OqtbeeyjHB3GuV1bTrrUdUkuGuHwx+XntXWeM/AesabD9uX/AEjbye9cm9/NCu1wc5wR6V14TCUormqfEfF8XZtmWGxCp01aO6Y7T9DkhufNW4kD/wC8ea6jwrosk10Lue4c+UOBmsXR5TOwfdxXRWOo2lvGyyyFePWtMRQwk99z8+jDEV63tK0bnX2+sSRxi1DOY8YIBrzn4w+ENO1q1e8hH+kAEqe+fers3iu1s5NoYSBugBq5Z6ot7A0giPTI+lcFOp9WqXjZo9SjhqsJRqRlb9D508UeHNQtLGRzDJujHYdaytHmm+yeTNCyseNx4r7A8F+HNM8QWckVxbrv52r6mq83wu0LT42k1ezijkJLRkjOeeK9hYnnjdo9+WZRp+9TnzL+up4D8OfDzuyzybhu5xmvQF0KytolkUfMeTz3rrp/DlrbttswqxgZOBTU0tJVVSQMnFcsqkXJts8jMcTiq0ISk7R6HP2pji27m2qPer9jr8aSeRFub1wTS+LfB995kAtH/dvjcPWgaNBp0KoXXzcc/WsKbbTaR5kK86CfVl+3mS9uIxc5K56Z7V07LHbRwy6Wm0DBYiuWsbaNrYmR8GrMl9PZRqI3O0HOetc/PTcrXO/D8U4jDrllBNHdate3F1o2+V3Qkd2rjtTvIbMFWuHY/wC8aNR8SG/0c20jkFRwcVx3iOW5it/PKs6qOWFb16kIWUNUYyzN4qXO46nQaTDZXF488srYPcsa7jQ9Bjn0Geeyuf3mOPnPpXjukX7v9wt83tXW6Tf6zp9kXt5ZI43HP0q6VXnjY0jUcp/DdeW5xvi+XxQNYmtbUXLMr/OyseOa7T4SXeuWS5nuLqJz1IkINVtO1K7juJJfKjmd85Zu5q9YXlyu+WYRruz8oFcdfFTo3cYo6f8AZlR5m2pdrfqdTDqb/wBoOzM8nPzMWJJrivFUl9LrUr2s7pGeg3GtSyvlKlvvNzXG+KLu6OrN5SSFdo6VjgMTXV3Ld9z5ydduNm9D1n48ar4V0v4dn+zdYt2vfKxFEjBmY++OnNeEeDfBHiHx9eb0sAEJz5hHHSqfi34fS7vtlrePJHjdnf0FXPhz8VNU8A3P2WL/AEiJPvR5yfzr0LVJx/cpep+sfWstlJc03fax1F54S8R+BbyHbYpNbqw3YHOK7v8A4Sm3/wCEbSSS2NvKV71wl/8AFTxF4zt55obKO3Vc7VJyWrk/EfiDxJNpLWjw4Kn7y1tSoYqfuOy+Z6FDM8Jhdb6PyPV7HxvPc2strs8whSBn0rgtQsxPeTNdoU3SE4/wryqx+JOp+G9YIuhuw2MkYrdl+K9rdyebdIDuHyqi55960+qVU7X1PNznE4TMaa3TV7HYXkT2kG60iZh61j6vaa/c2rXEVvJtxnFa2heMo59DV4rTeHwcba2tP8USvZeQ1gwD8A7KzVOMZ6q7PgpVnhq3u62PG9H1a7PjGO0uonyrcqT717DpPiTQrScQX1xHbybRhXOPaovCvh7Tzr8uv3NsqiFeXPCrn1PQV5r8V7zSNS8f+fEhaONvL3oOGPt69auVKhVrxTjsj0YTp5g3CcbWPZdK8W20OoL/AGVcKWJ4dTkVu6t4pvNcYNqMgkaNNqYGABXnfwz8PDT9JW7CCVJOUYNuC9OpHFaHijWIdIt3cjLAZCr3NYVJwU7Q1PnMRR9nN0sO3bqX/E3iGLSbFpJ7hYQ428ntUvw1lj1mN7iC+QxqeRur5t8YTeJfGnif/S7hre3jYiGFDwo9TVjwzf654VvxZRao4jY9AfwraWET66nr0MtpyoRVSTc157eR9SeLNbgtNGf7LL5kkakde9cF4VvbzUL6W5vmPLHH0qh4O1E3Vuq3ETkMOp7mt2Aqtwfl2rjoPSuGXLCLhfVnNi/Y0sOrL3+36mzMvnR/uXxjtWbPqaw3SwS7Xz2BqSbWrKwtT5zCJepZj2riNSMt9r39oafLmPHHvWdLAUvaKVN6+Zx4PD1Kt6k42Xc7aPyp3/fN5KNmtOW/0e30c21wu7APOO2K5yxkgms40vZv3/REXqasap4F17W7UzRTrBFt4UHkj1/Wuvka0irnp08Mov3VcTwrcaJdaxN5EirGnPPSoPjF8QovD2kpp+n2/wBoluMIrL0XPf8AlXP6b4NuIbiS2kunVh1YHrVLV9AtbGQ3GrztLHH90k1m5U6lXlvouhrRdLm5YO12aWg+JL6awjYrhzyQavnXLgzbZmx9K43XvGXhfT7BY7C58ycYG1OceuTVBdbnuYVurWBnyO9Kjh9HJQ+86c0yKra0aqb8noeq6XeTM2IZMKetXpHgJBldN2Oc15xofiy5XT3imtDDKVwpJ/lVR7/XpmLxFmXPXrW0qNSrpy2PDo5Go+9OdzrPg/40tNd06SwLKzlCoVjz0rlvFGljw9rrSTxZWdy3P1ryDwbrV74f8SR31o7FVYeYM8YzXs/jMS+OvCNvqGlMXuIAHkRDzjHNXSTw1W32X+DPsK+GdOoklftY0PB91HK/lQR7VkPQe9d5pEdhbws86K2ASSw6cVgfA/wyDo41TUQV2HADd6zvjtr40LSbmLTH3TXa7E4+5ngmvAzH63jMZDD0Z2jfWxhUyXGfVo42tor7dbPqed/EHT9P8ReJLqW2gxbmQhCDnOD1p3hjwVYHbDLgKOpIrmfCd5rNvtkCNNhsn3r23wr4P8a3ujpqsnhu4NrIu4MF6ivrKkvYRSUrerPOqLG1JNUNV6X0LOhaDa6Tp8cjXMflPhVGK0Nblt9Ps98AM8mVwqA4AJxuY9gOP88iO40O+ubqCI2ssENvjzVcdPWuyutH06XRYktIvLntZmQuUz5qsqkZ9FAJ+teLicdQoSVSu7ruj69cJ0KsIuEf3jSvro31Z47rEOp60iPrEs8sTNn7KvEYHXaqZwOACWPPNYM9h9lkUr5UXkhki/dhtiH2PVj6nmvZ49CtXkuFnmKpG5wpQKCgHJ78VheLNH0GDR3uJ7t4Y1YYbZvL+wVecnGMdfx4rD/WLL5TUIt39D0IcN4ylD4UkvM8Xe7uNOvVOnPcWcik4kjmZZHPqSpGee1WI/E+qyXKjWLprqLO3e/3l/x/GtaG48O+JINcu/DVvqkcmhywLdRXdt5TtHLkJMFySF3rjBwfmU96zZNKkvGzHbCRsfxYBP0B6V7EIxqLmcdV33R4GIoU+fVJ+a1/Ez/F2r29ncxyWkgLSdwa5t5b+XVUuIyZMc59/Sui1rwuJ7RcKDLDn2OPeq2h6bfLex21tbPIpP3guRXVF3drHLXoqFJOG5uaT4t1i2sxGtrllGFzUcnjfxIkzF4l57e1dtoXgbUbl4WkgG3gHiuouPh1o6Sxi7wzMcMqda86tXo0p25fuPElKnCTdVad+h4jq+tajrepRyanKfJhORGrYH/166XQfE0MIEYJRAccmvR/GnwP+3rDqHh5RFAynzRj2ritK8FPa+JBa2FsdQmhbEwI6H0HpWdPF0aq/du9uh6kaLrvVpL+tu52/wAN9e8GXWoxWsyO144+/gjmvTVv/C8kx0q01f8A0lVzJCH5Ue9cv4O+H1wL3N9py206puUqOTXLn4f3mlfEC+1bS/PdpARPI5+6e9EsY4xbS6fK53YTJ54lpVElC9n3+7/Mwv2kfHll4eW3m8Pzx3EivtkAbknP/wBauE8OfF7S9dQWWrw+WzjByO9R+LPAq3es3N3dXqxnzHOxz15PNcPrnhN9KuxNDaNcbuVC966aMMNOGmr7nAsppVnLk6M9Kg+H8eoXEmo6UiPHJyAK057L+w9HYzMsckK52Eda898C+LfF+jagreXKltCP9U3Tiu1j8a2viyykkubfy54/4SO9ctP6/SrNVPep91uvUqnh/Z1OX4ku+hTk8TNNC0n2XKqBnaK6bwv4u0FtJTzIm3AkHK15PrV5NHrE0cLFVzgjFdz4EvdJj0BUkRS/mHdx34r0cRU9lT5oxuejhsow+KqeznP2a3udNJ8H7C80+RtOnjdgv4k1v/CTwhqXhG6VfszPBcHZIg+b8am/aCE/hD46S+HtLZ7WwjgjkjjDfeB5zXeeGfiNZ6T4diM9lH5zfIrvzk/1rx8bjqnO8PUVl5K59ZRyejThTxrnZrbXS/z18jQn8PSSW62kSm3ibk8dc1y3ij4d6TfYhn3TMfx5rcvvGV826+uIiYx82FHQdeBWA3xv0CTVlt7RY/tQ42unOe/avPo0587lSv8AI9LF1KMoqNZRt0Urfqd78G/g34M8PwJruvQRvNvzBFKcqOnbua7Xxh8T9D8P25gGl3UkcK8CKIBQPauV8I6nHqGmw6rd+ZKznG1x07jA9KreNV/thGks4zJ5kfl4fgL15xVYitarGnUerW7PhqmOVHGulRprlTSsuvocj8RvilJrGjXr+AfDUNxrMgCRLqEZ8lf7zkD7xAPAOBnr6HwXw1pPxr13UtS1GWDWbl7GRDcva3UMbWTH7uxNyhQQBnaOmBX2t8LfBFjovhcS3UULyFPMk8teTgZ4z3qbw1pEcVvNIIFj+2ymWVcDn0B9cDArjlm8sLQcORO+10fV1KNOpUvGTSj5nzx4f0fxHcSLFrF7JDc3IBRHtB8uMkq2HCkkA8j8jUniD4ft4nsZtGu7t7OO8hGZo5fLlQA5BjPIDKVU89TxXuPjTRIlZWES/Kx2nA49P51yP2WUR+TchXiydrZ2lRXxsswq063PD3Wn0/Q+mopYihyt3TVtTxjwH8IbTwFpuqxRazd6xfalHGl3d3kWzckbbljVAW4BwSSxzgDgDlkegO0mPMV3Xk5XBA9vUV65NYW0nCXk0Mf/AC0z8w/Xmue8SW9nbK0Uf2Jo2OwyzR7sgg5GARzwa+oynOMVicR7z5pSt0PDzPKcNQw3uqyR5u2lhlEiFtzEjDDPrwc981c8I3MmgXc2+3S4s5uJEAy8J/vpnH4j+taWszWChY4iknGdwATntz2rHlm88N5aLhSCgc5YHPU//rr7mu4S90+C+r+0ptTWjPQdH13SnjBhufkfGGBqaLybW8mnkfzI5VOwk56148zOmpSCK58h93KsPkc57+n4Yp9l4p1aG7/s5ndPMxsWX7r5/ut0P0615dTB1ISUlK68zxcRlKk1FbHuHh3Xru2W6s2lZUdCIcng8VZ+EN5pWmXd9qU9hmZXbBI/1j/WuFtI7y505I1kLXD8q684PcCqd/eeNYLeOzsbOWRJOC6rjafcmt5YGNC1Wkt9dD3KeErUHyULXWmqvbs0ei+JPFGonUGvDerbbcui7vujrWXpPxO0uHS7yTEc0sisHkznnnmuCs/Cvim+uvN1plUzcAzS44/zmr+n/Dbw7pgYeIPiLoOkpIclGmBbHfA5/lWPLiKs2orT0PSyvB08thOvWquUpb301+Z4f45TWtX8WT6ilyfs7SblRW4UZ4qWCbUnjw0y/IPlyemK9UvfCfwG0iO4e9+Ld9evnKR2NkzD6A4ArOsdV/Zx0GA3Z0TxV4hlVvl8+ZYY2+uT/Svcp0VGCp209Dx6dbEczmmrt9H/AJXPMFv9RubgWzeW7M2CcdqxNWtdX8O6s64ZVlG88djXttt8YPCUrGLwl8LdH0qNT/x8XkrTSe3oK5/xRHqPibVE1G8tIpjJjiNMKB6AVTcY+6kayqvkcpv3vn+v+R5K89/qUu2GIl8/eA71c0ttVtIGhdG3ByTlfpXqWn2kVnJmPSfLZB6VIdLnuGaU2iruOcZrneIglZrQ462OpU0nKorvzPZPjdo0Pjr4oW2t2Lx7pIliuZmboB0qxqXin4T+BtGjttSt21nVLZD8sS7tp9fQV5+3iPS7VEtTfSGe4G6GFWOXGfQf1rgfjUz2d5HPFYzIlzGGMir97sQa8WlD22MXO9036nvVs3WIUJUYtQ6N7J+XmdtN8V5/EHipbTR9Ejgs5jtCSvzzXp3w18NaJp2uG91LSNPMj4JZzkgn0zXzT4BEl/J5aQSWgjG4zPwWxzxXbN4j1O2bzbe/mupI0KqCchTXRiMPClJKlZN9NTlxWcVZTjD2l7eVz6R8QeJtLns4rKzW3idJAdpAXIHoRU/g2SDxJ4iCyytHBDjcoP38Y4r5Yt/F2strdrFqYlZZm/d7R9456DjrX0j4BSTw/Z2esahprQRTxb40Y4L+9eTjsuVapCpVbSj9x3RqYOso4mUveW/+fkeyanHaWujqivt3Dy413fe9f0rNju7e3jUyuFAOBnvXG6Xqx13xpJqPnLJHHbbIUVspGDycD1+X9a1dQi+WRyc7Tx78f/Xr53OK8HUjGnqkj28t5MTR57uzb/yE8X6vYNC2ZlDKpwB3GDz+YrzbWtek8x0igYxc/OPwA4/OtzxFbBGXzCVJAI3NgZ7E+39awIdMillnLh5C8OMJIMjHceuOuD7YIr1Mg4boY6m8TX1XRX/MnM85qZfJYbD79W/0OH1PVdWu5jL5zW8RBU+Q/t09cZH86x7madpFlUvuiXudwA65zWvqdu8MjIiZVX+Yng4/pWVqimFkkJPqOK+ko4ahhbxowUTx6+Kr4qzrTbM0IdpJGC2dzKoIyevHaoLxTFJ8qhgDkgHhxT5JSDJtQ/NhlXd0wTkA1DcEYxv3Ryev8B7fj2rov2OXl7jpntpI23RKQ33WyeT2z9P6VkPaS/aB5F08YkwxRhuCOD0I6Ee/UVoKTHu6sDztYc4zms43DRagksb4bBB7b/8A64qoSsJwRcuvHfjWxFtpOj2lnE6OcbIwWYnuCTyKbrnjTxrDp7xeI9QutNaX7jxkRhjjpkVn3x8vUY54mba5G1u6t2bPY5rqv+E9vodOW7v/AA9p2t6eq+VdWc65YP3ZT75z+NdMK0E0mtGL2k0/Jeen9en3Hmei67pCTX1zrV7e6hqW0mzd7hnUN2JyelczrWoTa5q32q5dd68AqvQZr17wz4O+EfxKkmg0W8v/AA14gZyVtZUJt+/H0H4V6r8KP2U9I0zw+brxRfNqN27HY1qf3YHY1ljK+HwadatJ/m/uJljIxgoRimt9LWv59b+qPlu2st9n8xDYORnqeKoyW095q0MQfy4IT8yk8da+rtX+CXhnTdaEjTShVJKRk/4fSq114E8NQWNzF9igfzAcPt+bPbmvNocTZdWaVOb+45aGIw0p8krRfqfNOrR6jPiHTbLzRnkoOeO9em/BvVb64t47K/01lSFcBmXBzWvZ+ALfS1nu0l8qSbIQxk/KKgs/D93p1ldXWnaxcNPtLLFKc7sDOAK1ea4erNwjZr5nPisVhq1R00m5LtZ/g7Gv4mtEtw+pNIvlY+5j5uKwJdYt9w2eaRjshOK2/hNqHiLxPpd7catbx2+nae+2UzxYZz6L6966CTWdLjwtjoaNHj7zR43HpnFZ4iWHo1OWe/rc8upluUVHzzm438n/AJs5Y6Dp22LxW9/YW9rKqrbxLKDIFUY5HbvUusa94butOSO81aCSINgA/McegriZvD3hY3ULypLtC7mQzEAnPpXW+GtN8PR2s11/ZdpEIIzKMLubA6ZJ+lRUnSilNNrtoepSw+FrVbc7s+l3b8v1NCbwpp2s2ebW6m+woAUCpsb3BP8AnrVfTfCekabdJc2xeJIm4DNu3H3rX8O+K7CPTbiKGZpN6Z8p13BPxFea614n8T6j4hWx0yK3jWR+5wNufelSp4urUlryxXmYzwmL9uowjGMH13f6s9f8Ajw/ceLBdatBADb5e3BUbd30rR8ZfGrw1q8lvpd9dxrNYkqIYxk9ec49sVV8M+D9Mk8Jx6Tq99DdXbKWmmiYqCSM4HOa838ReCPB3w98SLeXmoRyJdK0iQyHLRgHqO55FL2eHqz5asm7fieo8pqYTDupWle+/wDXX5Hq/wALfEmn2GsXdxHqhls79oYbW1jXLQuzEMzHsAMfSvaZozGuJTtVl2sp7EZr4l1L4lQWcb/8Iv4fnuZgS8bLFgOw5HB/CvsmHXo9c8O6b4ih3NDqFlDdZ/2pFG9T6MjblPoRXgcQYOm19Yp03FaK3y/4HU97IsZzwVDlaS2v1MbV/Kub4q2ZVVtpU9Dx1rm9Wu4kYRND9lnt3z5iL+7IHHIHQdOe3NdRqMaS6dcS7CPnEaMDjJ6kjFcX4he4W43qSXQEHHU4r7Hh6Hscsgr6dDx83lz4yTOX8RXoXU5fPgaSO45jZF5UH7y4/i6Z9cEGssXGn3BJjYTKOGXPKfUHn/PNaN7cWSTL9pikZHYKywg8H146H3x65qp4y8F3Kaf/AMJNoN/Ff28P37m24kgJ/guI+qE/3vut2x0p1oJzbNqFWLppPcz7y00+eBtj7WUgg+nsf8ayZNJ4mjV1O5vmibg1c0WSKe233aTW0nzAhFDBjjoORgH8RUS+J7CzvhYN4f8AtcrQsu+4uCpH+5gHlcZyfX0rmk5JtJXsdHs4vd2uZ15p03kiaVtiiU85wSf6Vm3FpKJVLdFJ3ZHQGu7h18X+krpz2lqscZDTZgAnBwB8wOcqcDkZHvUN1Y2r26rEhhZQShRQQw9/UUU6nN0syJ0XHqcRrWnD7Ostu7vAeWCDJT8PSneGdT+wa00jRrNDIvlXMZYFSR91weh9/UH6Vqa5ps0TGbSZVs9RxwhOYrge2f5Vwsl48eqN9ttBaXDOfPjjY7C3qq4+Ud8cit6lJVKbT2ODEUY1YSg+p7j4XvNAsNSj1W206OO524dkAzivV/BXxK0m1VFjaaF2P3W5T8a+e/CyXeqaOJIZI1AUhyVO7I/yPzpbpdb0KwF815avDIdvlzEIxPtn6V8vLLa3trupr2u/1PiYVsfh6nLzxb7a/nY+hfHM3gr4gWb2T68/hvUXIEN9Ef3Mjddrdq+f/Hln448M6pqOnPrNtdTQSeXam3cOJRjhs/Qiud0nxnpevLqdvc3T28sdpIohz9zHVgfX39q2Phnpp1q4jt4rlp5GXPmvJkt7mu+caOHoWq0lzR3dj3HjowoP2tD3vTS/e5L4V1bxk2lsuuQ2q3BbAzwCPXFbl5rWgaDo0t34iu4vtQjzBBEeWPsPSnfG3RtQ8LeH7PUBNGUuX8lpGG7ymIOOOh6GvFNqxfbbvxFaf2h5qZiujKQWPbiuzC0FXp+3UVyvsc2Fw8azVZR/r8TvPEvxI1DVfDcNt4a0lpmRfmAbALepHeuej8T+LWiX7baSedjkINoHtiq3hBYreDzbORolHOFf7td5o/iVTYIJDp9wy8GQuOa0lShTk7QTfd7l4nEVJy5oqP3f5nNeHZ9O1C+mmu7IzEnKoW2iQ9h7Cu70mLT77Tprf7PDHJdEYjiZmWNR/DzWTd+HbaQAi3W3nAyjwnn8u9bPwusddj1Ce01KC3Syt9rb2U758nt9Mc/Wj2tKrHmXTozPD4yNaP7mXL01Wv6mv4U8K6VZaSJI7B1Z2JMqgjPPqawfGGgD7RnTLLzpnGVJj+YdeteleKobabS7m7sLvdJboii2UZVB0ypH1rzzWtZ1K1vjpmh6Tc6prGMSCMfJbg9DI3Yc9Kwq4qUWla7+5fNmuIlGhJQhNvzW33dPQ4RbXWtHZ5b61u1knYqoRmD5PGQO1Ub/AEtX1yOwv9RSS/uPlihuJvMYLjP+P617BpvhS+t4Tf8Aiy4RZ5kWVlkbaqDsQT0X3rh/G8nw30LUpPEOn3ovdQjj8sQ2Z85iT/dI4z1Gc11UMTGo23v5I9F51RppUqF5O27V9fIqWng67uIYvMns4DEMfu4yWA9c9K9p/ZS11bae9+H19qy3STXK3Omic7RGzKVmgX03Da6j+8rf3q8btfFkly1r9n0q/t47hSSLtNuAOvAzjjpTPDusSjxBPP4WsYWhiuInMk7kyRybuWUjoc8jmuyjhVXjOnVXuk4LG42rUdStPZ/jbyPrXxBoNxpeneUMNbSzFjKRkowHT2BH8q5HW9LkS/e52BlwPNj454HNdl8N/ES+O/CshLbL4R+TdQsOBMoOJU/2XGcjsVIqvqmgzRzqnmbGZeGKkAMB0P8ASu6OHjRoqNP4TpqTnKo/abnmGqaNCkDyGISxzZ3MB831xWJf6SJVkWIzR+bEI1mglMchX0bHJHHQ16LrmlSG1ljdlRlUlQh4fj9K4uSwuHgGYpF2ZJy3ysOenuK8isnGTfQ66VpLzOD8Q6fe6au+3TzfLAEkeAFf3U9FY+nQ84x0PFalqdvceILN4/MjuEuFDxyjBPOMEYJz9AfpXutxE01v5M8as3GYyMbh6+hrjvFHg2ZGN/YoNzKR5ToGV07owPDKfQ8fSs6VaKlqjq5nKKuU7iwQTBwhIX54/mwy9tyMDkemQfbr8tSQzS2tv++fzYef3ypjBzyHUfd+oGPUAc1jWWry2M3k3VtcFI2yIyWaSHjBKnrIoA9fMAGP3q8Vu77e4tEvLS4WTfys0YBUjn72DjrgZ6Z4+Q/LXHNuErSR6EeWavEi1CKOe3aJgWhYBiFb54iejKe49Ox7E9K4jx3FFDH9m1vahfiw1iMfKW7LJ/d9+30rsJom2MsYS3n3MBCpC89SUJHGe6kYPcd6x9Zkgms57G8RSssZ8yCTIjlbH8GfuuPT8iw5rqoV2nZnJXo3Whk/DPX7jSrG8JjeZ1JhntVcZWVe6n3BH1GKwfFFvr3jC88/WNQMNrFL/o9pGuFjXoST61F4fd9E1ZbMEG3mO62lJ/1ij+E+69MV1q6NJqeoRudUitYJEwGlUmPJ6DjkV1OUY1NN+54GKwTm/a04+9+Ji+GNDi0q6uokkh/f2roAw+Zxjkn9a7P4PWs+g+KLe9tLQNtUq6RnC4YDJOe9V9D8B6v9quG07W/D+pwwPtmZdTUMhIHy/OBg89M8VB468P8AxCght49Ok1K20tZCb3+ywsxfA6CRM5rnxOGnVcqbd1JanB9Xrqpyzi2uu9vvPRP2pB/wlngnR9Js5DHbLMbm6kHqvAXjvyf0rkPAPhnwpd/DfxHbeLDeM1jamTTnWFlKOMAE5xlCT1rnvBt9qnhrTrnUv7SmN1Fj7DFMSW+bjcyt6enrXo+j/F/VNU0u7g8RQWbRW1oSzvGMz/7G3HGeK8/CxxuBp+xguaC63s/u6/eaYaTp+5DZp/l6+XY8Y0HSILGzuYLW9t7gXQKhpUPyJnPHvx1q1HpRC4tiqRjoANo/Kuk+JGu+E9R1CxvNJ0RtIjb5b2ONsrI3UFQOg61zeuDw/pF99lg1T7cGUStJbFmRS3OzkA5HANehTqVaqVRppvy/yOapGUt3dI37jx1oN1p8ssAvIRbtiaX7OP3WT6H6VV0X4paF4YvI5JdX1TUI23M1rdoBvz0w689hXnfxO8DeKtD8RLpXiHQ9W03T2YD7VLbNErM2MK7DKsAeATjkmorrTbPTbW001NRdpAzmFJFEj79vy7cD5s9OCa9F4SEo8sndfL/I76eXwg4vmene2/oe3eFfjBDrGk3+mpcwWr30mBGM7o4gdww2MkjFVZfEXibVINWit7NdDsTMv2MWEjGe5A6mSQdC2OfTNcx8JfCGkeGbxtQ+JOm6pZ3GpQM2hHUA1qs0gA3EIw+cAMM5wBmuguNYsbO4uFgurBfLbY0UbABSRn6E9+PWuCeGoRbSTdtuy9DjzCM8Jy1FSUlK/wDTS27o4XXrtJtTmOp6Tqcl2YgJF1C4klLY6KNxOF9ulV18WzWHkW8ejWltngRn5QMehxXZ6hd2+oeJreS/eSxtBCsUOoKw23EwblcZ+ZRkZP5V2UPheKxuYrLWbG2mkj5e7tQsoVCN24sM7Tj+Hr7VtCpD4Zxd/VmUcPOcISVG7l01Vr9+3keX2vjq8+1GDULBFgkB8428nmSBfUA4qjHrdtpt3LdWGmXiOkuU+z/Kpzzkn+gr1S+g0uG8CS6RbvDKWFvI6CNiASPmyMg8dD7Vl65oaXOLWR9R0iFl4YBfJbPT1B/A1tzU46JtN+Z2KNPDO1Sm15rX9TS+GvxS8YJrh1U3mn6Hb6asbtBPCD/aYI/1QRcEkgcnjHDZyOPpT4TfEnw18Q9Kk1HSLpg6N5dza3cLLJayY4GGA3o3JSQcMAeh4HxLa+DdDtPF9n4smu7jVLayulknCSb8kH7hyflU479q7+6+Jo1bxpBquleNbrRDYylYYn0rzo5YSMiHy42yOQOvHAPFaQqTo1ORK8H+H53PXjGniaCmnaXrfm+/Y+kfFljeJeyTWMEe0A+bsl/1TDuARkD2rBuoJpLVYrgC3bqXIDAH+tSaH4mn1jSYbiS78m5kiBL+WFLr0DbG/IZ54x2rQh1HTr+2NrdskV7FJzvXCsPfsOv40VqXN8LMoT5dJIxLzTmh08ZAfzDhTs5T6DqawtSt7sR7oGhkVOjMcHcOo/KvSb6zgttNwGW4t9uVOM4+jCuA1S8sxdMhVoFDYBU5DfWvJrpR0vqdlJt+hz9zpNnq9rNaXCxKsi9Tg5NeVeMNMvPDusNdWTyq6g/6TCfn9/MHSQe5+b3r2i4VDGZCVMOcAYOTXG/EDTlVWnUmQMP4XPA9DWUak+xvG0djjNH8TQ6hCsF7aQMwbGYmwG75UdR344I7betSaklvfadJHchisinbNIpyAOz4+8M4Iccjqf71YN54cmfVA9rLbwtIeN8yoCRz3IFac9xFpultdaxrWi7EXIjN/G0knuioTk8cnj8+a6Y0o3XKrF+2clq9DzzXDdxeIItGkgkmnkkDWcifeZgOc44Py5ye4GeDXV6PdsjtaXij90SpBPBPp+NHibTF1K1t9X0C4jme3dbiBV+8hB3Aoe4PdemCce9A6xo1zrEU94/9lvelhukI8ssCAyE9DgkZB5wQe9dU1zRTtqcvtPZz8mbOtaNc6hpLWmn3Ez2MsgkmtUkI3t2LD+L0z14rlk1i90d20vw9e6no3kvk+XK0bscZwCD0zXoT+G9S0+3W+06SG7jODtjk3YHqPT8fzouodK8SbHuhFb6pbtuSaWEOrsP4ZVP3h+tTSxCulU27/wCZp7NSTlS/r0MTSfHPxE1bT2n1hNIvtPZRa+frEaTnpj5XX51bnPGTSXL2OoXcaPJZ2ETIHd4i+W28DhsnaT3PPtXOeLbO80HxVbaj4htppoYZ/NYIf9GlTpkKmMD/AHfxrtfAY8Oazo5vLTQbqSEqTK7zKqdThVUncOBmu1UHON47eRzfu6k2qq1Oba+0+73TvZSXKqCIx9qwwPY4Uf1qKLUrpV2weFLeQd3dXYk+5zXU+M9N0/w/4YfxF4cmFtdR3CqLGVBJ5iHqQe59sVztpr+r6nEbm11e6to92PKYlcNgZOO3NQsO4bK69TmVOdNtafcv1PWP2YPB/wARIdD1DXNQ+K0unaFp6nbptvcNeM7Kh5EU/wAgAbGB174wKy/Cfxz8ZwzW+l694Y0vxlrFxOv9mXJsYbZYguDKIjHHlpAvUnHOPxvfDzwR4r8HWc2n6lpc1prGtP8AZVinaKTy0MbMzoy7lzkqACT91jivLdc+GviDQ7+SLWfEBeXTpWfNvI+EViMnd2b3AH6V59Ct9YqVVJWirJeb67fd8jeOK5HzRUtOrWifU92+O3xW8Q63DoNz4N8J6Zf2vkXEmtQeINAS+fTWBXavzZCtgPnbxjBPavBfEfxF1G6njtIPDuhQ2rWrxQnTtNW2AbORKyryxBJGeuCB2rYsY7dLq0uBf/Z5CQGnQtJL838TAsSACR19aj8aeAtT0+zlkg1uymsGuY2mVI2DrDnqsmME9TjAA9eMnpwvsqdH2beidterepHtPrLnVcbaa27W6dTiHlW6upLNPNuIPNw0xhSL5go3gRgnGGLd+RjgZrq/CPi7W/CH2aHRLtpPslybpoZUGztyO+SAAVPHArR+D/gPSI/FKa1Ho7axbXV6YYrzz2aJn/jiUoxQlQN7A844NXvi5p8HiLxBbW/g+w0vRtPsX8q5u7mCeOR23EFj8h+QDoBuLE8ECvRji8HKk4NX9RYaNad6tJ6beZr+OPitoWt+GLF79rdtSu/N+1vMwiZHAGwj+8Of5isPT79r/S2s4p5WhuIS8sKMSkiY5yBwQB3rhby1uY7ORc295Es5gDIqyxu6nIOD8ykcHnGMit618bQ+HrXQzo1ppGpW0Max6tayWHlJFcgMuPlcmQbcEvkZbFYVsKlC9LWx1fWoO/t0ZFxc6PoWuXaaNqN3p8ckW2axnKzpcMR8rQso3Bef4hwQRmnaTF5dutw0lmdvzK0L7GbnkL0zx1HtxWrdeIdQuby2n8K6ToNlcgSsIYNNG0RFOry/fIX0zj29WWMF5dW8MVzb2t1dTPlVFrljJjO1MEYAPIzwO/SueVSa0a/E4JfV5PmjOzfSz/S/5Fy1+36ZeRaxpOo21ncX5MUMrgfNhd2CzN90A5yeMnHWtmw+J3xA8qB7ltOmubD5Zbpov3NxCp5MyhgVBwQrKc5OCCMY5e5sfEk0LLqOh+WI2kiNtNE6mNhyZODhlwfXsfWprhrafTW0k6KttbyY3mCaRDJgDJZueOCenoPeuqjVpRio1It+lv8AMmTs7e0SfmpL/wBtPefhX8XdO8Q+HxcQXsWnTNKsctnLN5kW8naAr9VLEfKMZx1NbWrXFnqJYh44pVfDyRsJY0b/AGiucV8z+H/C+neGLX/hMU0+/wBN1CQSR6XDeXSzNBFjDXWAo2MVJVDk4BLcEqaxvDdxqMPiu7hi8Q2tukame1ZpdvmycYiTjlyC3XjjrWMqMK0mktPPodSkoRXva+XXz2R9T3FoI4G8xCr7Cyk8Dpycnt/nNcXqWspJpsqXbHgkCeJgWH1HGR+tedeNvjV8U49ChhuNUkEZbELrborIFGADjnnGSrdzk+lZHwH8a6v4l+NWk6bq00bRXyyqVeNVUuELbwigfMMcCsp4RuD5NLG1GvDnUZu9+xd1jUbBry8tNYtLi6tVG3zYxvdO25ARwa1PDfgubU7P+1NC8Kva6f8AZ90Y1gou/qCFGd2CMHJA5z9Tg+Jr3WG+IFy50fT2S2u5Io7m4uHRp9shCu7A9cYGAMcfjWX4+8f+NbKOfQ2axW3mjPmpZNv3J/dD8k8V1W0iqauKKo8zVe9lt/w52fhvQmgsJdW1GQado9ncLbu8UvmSXMzZURW4QMSysRxwCSOaszeG00lrnVNa0CHxH4XupPL1HyG3G1kxtWWZF+46hx8w7cZ4FcX8O/it4m8P6T/Y9/e29tDb2slzpttbWqs4uN3CyYHy7gTyRwcGpvA/xLmv9J1ePXbr915dpm1trryfPdZGRpZN3DOEPpyoA7UO8E3a8gp0qDt72nZ9LF3xlZ6Lo93AnhPUryYjaYbiMqI5I8AZBYhmxjHI5q1p3iJ7y8it721M0CkrFqCwrDNnsHOdrDI68dx6Vzln4r0HxDqx0zR9F+23Dv5dijK6s7dTtAP3e5Jxx6VstoGs+FraYa5a20c19K0ltaW1ys/lIy52Er1Iw30GATms6snOPvRt8jphRhGblFppdmzsmlM9iNO1mzSe2uI96bzztORv4yVPB5Hp3rm9a0V9FVrvSWa4stuWTADxj0YA9MjqP0o8Ite6tqkF1Jdx2sEMeyGPzt5ZQcFymeTwQT2247Gu91u1ttL097w3UVuwAMrSFRBMD3YZ4z+dclOu8PNKPX7jxcbnGE+sOk4veyf+Z5vPB4m1yO1s9MtCDMRsljnO3aAzEEkYB4PGe1XtP+H1hJE0jeLNPkLOTmAuEX1ALY3YPfGM1ZuxqeiXklz4euLi3kfElxZI5USL94FfXsfWotN8XaRdxtNqC2S3DMS/2iJRJ16HjnHrXZXxlaylH8DDEYqNNJqDlfsd54israz0WPwA3hPxbqTaZAIUvILe5tUvF2KxdJRt8yORmkbcpIwO4riPiFZ2+l/2HL4E8MTxrKHS9EMZkaP5Uk3eax3McSL7Aqce/qHhG+TT0heHQtU0+7S8mubS4k8STQXjkSBdzKCbfkyAECL7pGeKl8Y+KfD1z4rt38Ryatot7bwMEsr3U1EcnmFtzCSO3QbGy2WbI4GOmK86hGNKMFG7te/nf/g6nuQoVowhCMkkuunT5nnvg/4j6/cXgs/GuieE4LedTa7PEFn9oUuoJQKSGkAIByQwAx68VzurfEDwPqF1BZan8KNPljbCyPofiKezgILYY4kWRD97oAM96sy3mm6d4ok07w5qNzrVrC7y3up3Yubgx/LuWCO8kjUun3UUBUPA5PU1fGmmeJV8uOPVPDGichYdN1DUmgmuYmRXEgQRFFT5gANwOQ2AcE16iope90OZ1Oa3LG8l1sv8j1v4OeLPAt78CYZrPSNetfDWkTyW6w311aXAhk2BGL4EAkXZIcp/FuPGea5L9or4keBp7iODwb4fl8yW2jcz3KC0dTjO14o33BQAuMnr9K47QYPE2mxSTxv4WSSG2ZTJDeeejsSyL1QrHkFvrhecmurvvD/h34lXF1r/AImtl0nVLmGD/iY6dbJawXUW4os0cG3hMDHKt7FjWMacYyftNj0PaSnTSpp81tf+AeUXEF4dWj18Wlxd2DLtt7tLN4LdsqFeMKeMg5Ulvvbcgmr664reGbjQb2zs7ix+0iZgI1ilZ9uzO4AMw2jbznA6Y613Pjzwv4i+Hfi618MeEvG2raXb3Fsk99pniy2D6aJGbACXESNCylB5gdcLtOPlIIqHxF4cg1bwnNdS/wDCE2GqOFaK+0vUJvImy2G3RFdxJ6Dhe55ArZ1Ka0uZRpVWuaOve6/pfeYXh+7h1Rb6GygWGQ754bKIssaRd41bBKqMjGcnt3qDQ/EGu3WoXFvJpq20McywySGT5S2eNu4ZHTt6++Krt4XsfB/iqZD8QIZryM7XWGFuFznGwsMg4yD6fWnalqFmt212ZxP5jGR1UkEsV65wQB2x1rnlyOVkr/ecuJw/LTVVQV/kaa65LcTW0E3mXMm+UBDd7duDnLKFHUnqe34VqaLp9prmrXc/iKwl0/S9GiEt9JHfM25jjy4M7RlpBkkDoASeozm+D7DXNWmaxsbmwS5edEmvU2Dliu93TfuO1chQB85UrkZBpfjh4t0ew0ldB8FfNZ6Y8by3RgIed3zmSRclSzsvOF4yB6Y1jQcUn1ZzU4zrLnrL3V5LXyJ/EWo2Wr60t/qNjqVzazIIJYLTUI4YY0ByqbDE2QOB1x8vbgVkySeCLLdJPZ6opQmRYbe5gTavRQziMkDpzt59q5ptR8by6CGuvDNzp1lJGGnupreUSTqTwApxlcjIyvGM56VNrl1aTw2d9c6KyXULbLRApV5ZeMbx02gckHjpnrSjT5dyK8v3mtpX62t/VjQ1Wa0g1JbWKxmDSQtNColEpgJJwGYoN/Q5wAenpz2Hwu1HQdP+J2haNaztLdvdQsjLY/Z3cNneCpycg5HXPTpXJ6Sl1e6fDcvsD7z/AK6UMVGehA+6p5yeAOTmuz+HngrWv7Y0TxrF4Furm1fUreRNcSEqtsiTbZSF3DkEEMcHH61UnBp6amVGdOWIjaNtSv4tu7QaxPpUjadp6Q6pdM9zdkJEoDEAO2Gyxw5wPvHAAzXPQ/EPwro2sR3mp2N3ckShhpcebN7yJQwTMgU7FJCk9wCeM1Z+IdrPf3GopJeXEcV7dySzpBCVE6LK3lMxZcEA7sN6nryaxYdK8I29jHLr0t/crM8iWmlaPPEJG2dfMnYcZx0QccfMTxUUfZWTd7r8f6/plckZVGr+8nu9EvIofEbx5D4v1L+0IvC1ppc+xUxbT4DhQAQxCgHpxx+dc9JqN3czeaNF0KGTADNFFtZwB/Fjqa9Gs9K8LC3mkf4ZFFjiBgXUPEdxMZ5CQFTEZHXJyxAAwevWtNbPwokjzW3w28CW88CJ5zXEcsvlDB+baXIYggA9TkjtkjWWKhGOkHb1X+Z1SVG/NOsvkpf/ACJ554T8WaroFvcLpP8AZunyzgLd3UMAWSQdADL1VRnpjmtmLwH4v8RXUd02t3T7oWkR5EbYwP8ACGHXccjp74rs4PEVxEIbCxuvDtmbe48/ZpmkWsKR4GCTkcnA45OTjiresePvEtto7XFjrd3qr3DOha8vBDGrAfMwMe1egwqZJJ7VhLEOUlaCv5/8N+pFXEU1Dkp1JfKOn/pSMXwr4U1nRdbV4dB1rUZrV40L/ZJY4JAc5CEDlecnrjHvXV694VurjULaK90oKED+ZeyX1uv2Z84V/Lc/MDngdfauUtfEj3ektcancXkl3O7BIo8vGFLEqB5jAKVX5ScNuPOahh1C8uNWSFf7Q0yCABSbp7V4fOkA2hkUrJ26/OAT0IrWVSs+y/r5HMlRkkrSv5SS/wDbX+ZqX17pllotva32rTWmqLKS6MjTAnAAO6MsijABwrY+mMVg6xF4QjulbUtT0triZBIxe5+bnnnaePoeaLixi1q3S31O+KxNKBNMl03k5V/mf5cRgEgg9BhiK7HwvaMNGW4eSz1lbiV3S6uobaQ4zjYrGPOFxjBJxzSjZ7u3oiKVKpG9r2v11/yNPxH4i8Yw/De/1fwb44uNcvodet4nvZruK3kRZwV/fo3yQ7XSMbwxRg+Q3BA4P4vTfFUR295488P6xp+n2zKj61qcaur5OFCSKMKmUbDZAbB5raXSPC+g3X9g6xqttEupWyy/YbmaSX7QPNV4pXYZcfPHxxtbBrrPF2t67c2+tX8fihdNF3c/apdjrFHfOqoyRwBw7FgST1+XLAAda4KVTkWkU1320foe9Ro1pRlztr8TivC/jD4gJ8O9RuPBHibQdUs9K2vJpFlN9jm08FgFk2KwWdchtxjLEDBHXI6bw/deH774eNruuRprlxZ3yadPNFFJcxKrGOTEHm5dVVSeBjcPMxzg07SdQ0zWoWfxH4F8JXniK1UNNaRRtps0aOztCUubfywGIOSZFbkHODyen8My6OfhnFr2lSx+HdLh1U280V3fRzyK7EysrsAhRCInjLEFgVA+YcjlzKpOnQdShHWLV7WWnW/fT59ip4qrTpcy95NeqW2qv9zXmW7f4F+CfEV5Ipj1uK1eTAurMRxxzozbVlTdHvUYJI3dQM4rkviFovw9+F/iWz03UdQ8SWsCTF9MlaGG5liKNn5SzqSCzAhQMd+ua7H+19a0XXdY8SaffXtxazW1u2RdfaLeCDyvMDGFQGgG5nTL4B2jDEMK4i61zQ/EeoW/jjxRDNq+oaY6pDZW5JgiZznKxNhmbaDliMcYAya48txOYVZx57uNr+t108k+uh1UcRg6uFdRwfPotU7X73WjXbqMsvFtong8/D/S/ih4i1HUpppJbFNU8EedcpDKXM8JUXDpLG+5WVvl8sglGUMQavgvSNPs4f8AhX1/8R9Yu5LK4W7Jm8EtJe+Hy8gYCBhKwhWXcQyysYgP4QTuHpdnpdrr3wwsvGOnXM8X9pWn9oR6bcWu1k80hljRRkMDGFIwMYIA5zm7+z9oz/C+71LU1SPVta8RIq6raIjLHO8eCSE3t+8dNwyTt5JI617MqkKMvfnZPyv+hX1dVIaR5n6tf8A828Z+EbfU5be48T+ObLzNPtTbJdT+HLtGKKTtJ8oyKAe+4krj5eCRXO6d4Gs9c1Q6Lo/xI0nUZwGcW0OkaluEa4BfP2cjCkjr69q7T4mfGHQ9Q8VXNnY6NdWSwaYEu55TFPJNvkcgsgOESMAAv1APyqO/jvjDUtP1W8tkg/tLSJHthtM92sCEdAGyNp4OQCy5HXrW/tZ8zV7rvYx+r0klbS/S57l8Kfhlfm6W007XvCV/ZJl5biz1MXV2fl4YQyiI8NnAXoR3JxXJ/Fjw54j8CXCm08KTxT3E8sYurrQpPMhUZzLlWkhIYZIOcjqQK8vTwzr2sX1vbWksUemMipaXxg823lJZkjIaMlljZwu9s/KGJAIXA6vx58RtU8MQnxD4Ya80e8is4bT+z4ryW3t9JuUdIpRJChPnSDytuGYY84udxK1jOVRyjyvmb6baeupjOcFzQjpy67floZeg+JrrxdZrctqsN8I2+03omxMEZWCkHBLYG8dOm4kdDjtvF3hbw/pmj6jq2i2d/p+oaFaxzE2Ya9W6gl8pZQY5WJKqGMhJOAAR6YxpPiprc99oOt+IvAPhDxVcatCt9FJe2C2upWrEkBPtEZjkYksdrMWyOSM4z2d94x+GcvhLV4tQuPE/g241Wzh069trpoL2O1kyokWJS0czLiNVJJG3GcA4FClLRqNovfr/AJk0VRrUZOT5pdOlvy/A8stRpsmkahbveXCswlVJ47ZVaZVwULk/d3Et0ORge+ex+DPi/wAR6Lav4Hmmjk0/XrmJvs14wZrUsU3SRDcvzMuCdw2kL69VsfCWh6nYJb+DvijoeoaisG2eS3s7mNmcsxUmxmQg/KUUmORiMFsHNc38NfB0i/EhtUudYtmm0eSdpbqzDuJZYwwa4dzykYOAu4ZJQ9ARnojHnlbp/kc0MHCn+8jJp9v+CWfHcWvWXxYnu9EuF0+GSwicypI3mRYbCyOeBsZmCFRx8vYVia9YTX+qKHgjWZZREryOZGEpbBaGNTnJYjr19a6jxLFZ+O9W8zRr4q1vbrClvJMIZJlBLF0LDB5YkKe2Kg1DQ9es7W7vbLSQ1np433sk8hhjZQrZXzVyyucEgYyc8A94c3pyf16nPjaNSck1d/j+RlxaDcXVw8qXMl4q5KOco7FCyhSpPyAYH1OemMFbMwPqa3VxpWrzzb2zI7bg0bMOZSpUMxGflUn096j8MnV31q30tZW2lFaSLT5ftDICpdBGV5Y7yFxxgk5xXTaxoOr6peNC3g7UnRGVWey2+bFMxOUucMygrjOXAYjgnIzRKUlO0jh+rzfexzen6fDI0htrBGtMv/oxt2SZiOAq7uikjuCQORnNZF5uuPs8c0m+OzixFasVSG3PzBljVjy3Xk/MSTnNeqWvw1/4lSzajE0H25R5S7lIGGG7zFQnoOOoK9R70PEnwb8PHT5tbm8cXrXPnQrLoq2awrcEBQJVlcOqZx353fNk5IpU6l5a7HVTwNe13on95x9hDaR+Hba/MevRaoGaKGMW6PG78ZKyZHy4z91XOT61iaw/2y1VhqMl35as1xczRlWViSyqqHlwMqM8ZyemK6uT4V3Nxr0I0/xVdMsjbrd5YUixxuBYptG7gEDHp65GX8SvC+ueGb2ytbvxB+8ktGkaV51HzI7BiFUsQchTtbDc5xjBOylHm0ev9eRtUw9TlVoJef8ATI9H07WLvSZpba1N9pb5AhkO2G4IBGdu4BiuSf8AZyBzS33gqeSfEehyyiNQpdXVQT9M+9ex/CXw3oWmeA9P0Nr5beWGz33zSAkvIw3SNyScs5bpwc9K53xZdaLp+uS2vhtrvULVVXzLl7kfvJNozgADpwPwrnrYj2dtTto5R7ZJt7fI2NL8BWMWmyTm7lvrBpjEk+r6SZAUAbYZZrSQMDlcBlTP0xVfxN4R13QY7HW9Pm0XVvCVup81rDxNLuhYrgMjXiggjpsIbJPOScDPbwd4dv4bf+2PFt3PHHu823ijZryWR2JLP0jC/KOgAChsYzzBd/DO/sfDSrDbabHBNcZhjvf3mwNyTEV3oJMZGSAfcHmkp3evp1RXLVUbpfl/w5qW+uXsulxapoEF/cWU8WI5tf06CNZmOCQoCqX4wMx4BOTk1Pa2/hy600Q618KtA1LcskzxaZPLpscjhfupEsm3cFB3SYJwx565paZH458GwPYN4g1SCG4tCxtBdLMbkAn9yIWIjyAQgYnA6j0qlJ4C8XIkl/4h8X2lveBpLiy0eEm4s52eMrIZWO0A7TtKqCBhjn7tKvFQm48yTFGjOrT5oxsd342n0hL6GSy8P3+h6taqSHtddyqWpiZHRTFGsgjA2cMWTr8uK5K60qw8faV5mpXfiCDVNLlKpevqcsiJI4ChlR2dBIudu5QuByQetc3rUq6JqunadoWn3Gual9gii1hnv5EW31AIHkkaRAhKmMgDDhVLDBAG2p/DPxKk07xtfWesQreafZ2kqwNAArXF1ztRpAfmXJYbgD/CeStYYOi40uWkrLsv8isJyU4qTdkr6bW/E9eW9Twz8NbHwxHDctFp9gtpdSW6h1eGKNstEoBYFgsYOBuOD0Brzbxn8bLOHw7YQ6b4evrM7UD3t26wrcW5+6qCQZzuxyBgbe+SBpaN8X9N17UpNPOjrpseobrbzDqBlVXKnYjHyxtDt8pbnGSTwM1prNqdtp9vFP4N0ucxv5TrLDDLBE4QuoDqWyNoY7V64GT3EV6LjK9ZP7+h69Ct7SF6TX/BPDpNWtNfvrIPZWNjILjbFKZizkn5V+cgKOSOg4wPWuttdFtltTYXv+rt70/2lMwSREdeRGHYlVO3ac9QTjcMYrd0Lw5ZWc15A+kWcT3UouHUSeXCHaMOigLxjlfmGAOepFGvy6r4ft9E0l9J0NdT1a5F7MljqSS2trGDtCyqE3Bjjjjkg59a2jO8UoK1u7PKxlKak5t69WtEc5q+tapF4Zj0jxG8LWkVuwjTT43Xyownyh2AYIOD04JJJNX/ABc1p4g8K2evaZZ3k1xaqNOvtFELOxmSJVju2dzgySxAozfKcwDIOc10lnptxqmvW+nWUyiSBvNvr1UhV51DH93CpYYcgYVivAywwQAeem0vV7e11DQL/Trzw9DPpM1y7tp8sixGAGczjJ+ZysDqcNnDn6FJqo1Ubs1+XU5J4hqC1u1+RhaLaWt7eJqd/wCHpIb7TQJIJmcxC3lX51dkYNu74xkVrWI164vr3UdNvbu7t7iDzJJrgoxWc4zgDJIGT6dhzziHQbTU38YSeG7rWruPUNLgSZJTZvJBJFgOsgkI2tEVZT2JBI4INdjqDaw+uhW8GW+lW8tx5NvFZooEkW7BleQthhydojz0Peun94naD07ip0uaHOp6/mchLH4zOqW8XhprILbwiMpHfSCW7Lc+Y4A4yTkqCSAByelct/Zviu08J3mlJDctZb1VWtljK6r+8Ls7gncxBIBDEA4yRxXqiwNNeTAF7NomCJJb3SpLGWXGBt+YEgDnPOcgCtuPTrS1037UbjTnRFMZIdkmRht4OOOd2FJPJJ6HbWXtppe9ubqjUcNWeLWPh6/nS6tP+EfWy3zxteXTXAmaVchZHijyQGxuIGAv5V7D4it/htH4fn8LeCZPFWn6dqaxJdlNk0l7CrgJE5bLKNzRnnkBeoA4rmOy09pbi7h1OR9LZXtbS0RnycFg0igjzVUEEqTzlfQ4wfCOvaBrWkxx6lDq+lzTRyebp8Vk2YGU/PsjCqzB3kKjJPTk1pySnBN21FRpyjJ2nb0KfxQ+H0OleVpemWN1ofyyxtJc3UTyzPjodkm4L6BjyeK7KG7t/B8K+Gpp/wCxdMs4FMupfapLl5BkhiGyjmR03EoQMYABOK5uxmuE8N32sah4etYrSWFLixXUrpttwpUYQui8SAj0bhlwRzVnxlqWiN8IltNV0aG/v9bupLW1jhJZp52YlpGLPu4wp8zdhcKOehqMpte+9f69ToVL2adnp/XyL+g/E2PX/Hj6d4T0HSNYKLPcltRXb5tsqlTcTbGxGqBN7c5GBljnmtqPipNb8J2/hzQLmxhuLH7R/aWpSXAnW5gz8qwAgBXIz2wRtPB4rG0m6m8JaFfaDoHlR6l4gkeGRQqSRTRH955JfBdoVWIM4z1yD1rKbUbfXNPuYoooYfL1AtPcQWrQxTiQLwrtliq88dcEZpqEZap3uL2rte+hueH9RvpdPVZpILeZYBIpnY446Ngncy5z0Han+EdOi1hpbrxZqFjrZsi6u8C7y0ucomN23aOeDzgjFXPh74D0TWNQ1Mya1qWmrZ2kk1lLbW4uFu33cbmkOEHpkbRn1xVfwUbDQvBNsbOGy8tLhwLaCYedK4bGCcfMxIOX6ciuiKpqXoZclWaV3oaSeIrHUrq6sLeG4nmZRDOU/diJXzysgGGHGCD3NeaXWm3Ed9cR22oTeUkzKvlEFcZ9e9dtYeOb6ZDAdHWS6MkoIXHlxNtJUSEdduByPXNeY3WuaxfXEk63ViFMjYEc4jXrzgH3PWuWvFSnojtjUUafxanostrL4W0S51C1Ms8lq4xIdoPVQSfUkn9aZ4i8Sa5bfDmHxJrUki2+q6nIIYTsBKqY93lJGNqKOBljuO48YGaKKxpSc+VSd02b4iKpX5NNDs/CNp/wsXS7bVV0WzhtX1m4trK5A/0+8ZGJaInISJfMcJ3ztLZFFv8Aa5tJmv8AwxMsd3aTfZzBej7VGpLFWjXzc4yQCWBH3RzjIJRWlWnGT18wptqm2ux53b+HTqviW+1+602zjk1Nla90uK5ljtWCOgSQhT97KkjAOCTnNbGpfDfwZafEa3utOmv9XszCJrxWH2ezjudxLR28ZYyBVULy5OWBK4BxRRVYeUo2SZ5/s4ypty11/Ux9DsfCmr+PtDvH8DX1zY2NtM+qPcX6wq8x4jmCxyEu3ylgpGBvIPAzXrWpeI/h/o3hRb6LSPEa2oQC4t11CNBGNxQYKpuA5PAYnpn1oorDGc1avG7t6HTg+WjRdlf1v+jRxcPxc+GmnqYNJ+H+pXD2dv5J+0avIBGgJRFj+bHCHvjGawPB3xP8J3jXt7P4DkPmXA3ytqk0sik8biWYEZB6AnFFFbRwkZQs5St6s5q2NktVBfdf8z0HwrrVtqcbJpPg/TJPJYsscssqCMbgDvPmHcW9gcZre1e9i8GaOuqv4H0e2t5I5YIWW9uHaSR0ZHXZ5m1FKu2T2B46UUVxfVacnZ3+9/5nVTrNwV4rXyRjal4iu7l7fXG8F6cBLGqeS8pMZLr94/vDwAcAYyM/jTLLxheXlnOYvB+hwJDE4n8+MyDAPQZZuD9PrRRU1qEYWUW0vV9PmebicwrUZKMFH/wFf5FPxP4x8Qatomn2lr4Y0TT4Uc3KyW8UcatncqswVQxOVbuevT0yPCOtg332jUtE03X7JVaW5t72zja2jmUERzGIn5ipPAwecZoorqpUoxp6fm/1KjiqlWqr2XorCy6hb3V1d+HmY2k2o2itOIYgkHlyJlf3YyAApjwOgyeK6Hwb8PHma1nW7uPJeBQ0ksolbk/MG3ckEnO3px3oorOcmoHbQipSfkbPx++DWsaz4fW7tJWt9BsbeISW8MqplYUIyMknPPcHIHrg15H4k8O+GtK0WKTQvCT6vrezyrdrgRJBCmwDJBkG75iTyOwoorPC1pyvc1qU4yV/OxH4ZnXw7cQLfwXT3a25MrQzKJrYhQJEjbhcMGGc5+7xiuw1HwtcavfwJatHpFjZuubSKFDBcBl5kG0gqQMLgjsfXNFFehTqS9mpExw8HJ0+hj+dqSLfWOkLNcC8Xyot1yIV24IbIAzgkDj2rl/Ffi2XwvrVstrYxveWMH2WV7tAV8w8kDYc4Gcg/nRRWdGtOa1FiqMaekTz/wAaala3EUU9lrFxfapeQtPqcywGBRKW+4P7w298CuUW8JGRa+d6uzYJP50UV0RVonFJv2trn//Z"); - invoiceSettingsInformation.merchantDisplayName("Custom Merchant Display Name"); - invoiceSettingsInformation.customEmailMessage("Custom merchant email message"); - invoiceSettingsInformation.enableReminders(true); - InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle invoiceSettingsInformationHeaderStyle = new InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle(); - invoiceSettingsInformationHeaderStyle.fontColor("#000001"); - invoiceSettingsInformationHeaderStyle.backgroundColor("#FFFFFF"); - invoiceSettingsInformation.headerStyle(invoiceSettingsInformationHeaderStyle); - - invoiceSettingsInformation.deliveryLanguage("en-US"); - invoiceSettingsInformation.defaultCurrencyCode("USD"); - invoiceSettingsInformation.payerAuthenticationInInvoicing("enable"); - requestObj.invoiceSettingsInformation(invoiceSettingsInformation); - - InvoicingV2InvoiceSettingsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoiceSettingsApi apiInstance = new InvoiceSettingsApi(apiClient); - result = apiInstance.updateInvoiceSettings(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/CancelInvoice.java b/src/main/java/samples/Invoicing/Invoices/CancelInvoice.java deleted file mode 100644 index 11db380..0000000 --- a/src/main/java/samples/Invoicing/Invoices/CancelInvoice.java +++ /dev/null @@ -1,57 +0,0 @@ -package samples.Invoicing.Invoices; - -import Api.InvoicesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.InvoicingV2InvoicesCancel200Response; -import com.cybersource.authsdk.core.ConfigException; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class CancelInvoice { - 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 { - run(); - } - - public static InvoicingV2InvoicesCancel200Response run() { - String invoiceId = CreateDraftInvoice.run().getId(); - - InvoicingV2InvoicesCancel200Response result = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.performCancelAction(invoiceId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/CreateAndSendInvoiceImmediately.java b/src/main/java/samples/Invoicing/Invoices/CreateAndSendInvoiceImmediately.java deleted file mode 100644 index 81f6680..0000000 --- a/src/main/java/samples/Invoicing/Invoices/CreateAndSendInvoiceImmediately.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Invoicing.Invoices; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateAndSendInvoiceImmediately { - 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 InvoicingV2InvoicesPost201Response run() { - - CreateInvoiceRequest requestObj = new CreateInvoiceRequest(); - - Invoicingv2invoicesCustomerInformation customerInformation = new Invoicingv2invoicesCustomerInformation(); - customerInformation.name("Tanya Lee"); - customerInformation.email("tanya.lee@my-email.world"); - requestObj.customerInformation(customerInformation); - - Invoicingv2invoicesInvoiceInformation invoiceInformation = new Invoicingv2invoicesInvoiceInformation(); - invoiceInformation.description("This is a test invoice"); - invoiceInformation.dueDate(new LocalDate("2019-07-11")); - invoiceInformation.sendImmediately(true); - invoiceInformation.allowPartialPayments(true); - invoiceInformation.deliveryMode("email"); - requestObj.invoiceInformation(invoiceInformation); - - Invoicingv2invoicesOrderInformation orderInformation = new Invoicingv2invoicesOrderInformation(); - Invoicingv2invoicesOrderInformationAmountDetails orderInformationAmountDetails = new Invoicingv2invoicesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2623.64"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.discountAmount("126.08"); - orderInformationAmountDetails.discountPercent(new BigDecimal(5.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.subAmount(new BigDecimal(2749.72).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.minimumPartialAmount(new BigDecimal(20.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails orderInformationAmountDetailsTaxDetails = new Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails(); - orderInformationAmountDetailsTaxDetails.type("State Tax"); - orderInformationAmountDetailsTaxDetails.amount("208.04"); - orderInformationAmountDetailsTaxDetails.rate("8.25"); - orderInformationAmountDetails.taxDetails(orderInformationAmountDetailsTaxDetails); - - Invoicingv2invoicesOrderInformationAmountDetailsFreight orderInformationAmountDetailsFreight = new Invoicingv2invoicesOrderInformationAmountDetailsFreight(); - orderInformationAmountDetailsFreight.amount("20.00"); - orderInformationAmountDetailsFreight.taxable(true); - orderInformationAmountDetails.freight(orderInformationAmountDetailsFreight); - - orderInformation.amountDetails(orderInformationAmountDetails); - - - List lineItems = new ArrayList (); - Invoicingv2invoicesOrderInformationLineItems lineItems1 = new Invoicingv2invoicesOrderInformationLineItems(); - lineItems1.productSku("P653727383"); - lineItems1.productName("First line item's name"); - lineItems1.quantity(21); - lineItems1.unitPrice("120.08"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - InvoicingV2InvoicesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.createInvoice(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/CreateDraftInvoice.java b/src/main/java/samples/Invoicing/Invoices/CreateDraftInvoice.java deleted file mode 100644 index 791d13e..0000000 --- a/src/main/java/samples/Invoicing/Invoices/CreateDraftInvoice.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Invoicing.Invoices; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateDraftInvoice { - 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 InvoicingV2InvoicesPost201Response run() { - - CreateInvoiceRequest requestObj = new CreateInvoiceRequest(); - - Invoicingv2invoicesCustomerInformation customerInformation = new Invoicingv2invoicesCustomerInformation(); - customerInformation.name("Tanya Lee"); - customerInformation.email("tanya.lee@my-email.world"); - requestObj.customerInformation(customerInformation); - - Invoicingv2invoicesInvoiceInformation invoiceInformation = new Invoicingv2invoicesInvoiceInformation(); - invoiceInformation.description("This is a test invoice"); - invoiceInformation.dueDate(new LocalDate("2019-07-11")); - invoiceInformation.sendImmediately(false); - invoiceInformation.allowPartialPayments(true); - invoiceInformation.deliveryMode("none"); - requestObj.invoiceInformation(invoiceInformation); - - Invoicingv2invoicesOrderInformation orderInformation = new Invoicingv2invoicesOrderInformation(); - Invoicingv2invoicesOrderInformationAmountDetails orderInformationAmountDetails = new Invoicingv2invoicesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2623.64"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.discountAmount("126.08"); - orderInformationAmountDetails.discountPercent(new BigDecimal(5.0).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.subAmount(new BigDecimal(2749.72).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.minimumPartialAmount(new BigDecimal(20.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails orderInformationAmountDetailsTaxDetails = new Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails(); - orderInformationAmountDetailsTaxDetails.type("State Tax"); - orderInformationAmountDetailsTaxDetails.amount("208.00"); - orderInformationAmountDetailsTaxDetails.rate("8.25"); - orderInformationAmountDetails.taxDetails(orderInformationAmountDetailsTaxDetails); - - Invoicingv2invoicesOrderInformationAmountDetailsFreight orderInformationAmountDetailsFreight = new Invoicingv2invoicesOrderInformationAmountDetailsFreight(); - orderInformationAmountDetailsFreight.amount("20.00"); - orderInformationAmountDetailsFreight.taxable(true); - orderInformationAmountDetails.freight(orderInformationAmountDetailsFreight); - - orderInformation.amountDetails(orderInformationAmountDetails); - - - List lineItems = new ArrayList (); - Invoicingv2invoicesOrderInformationLineItems lineItems1 = new Invoicingv2invoicesOrderInformationLineItems(); - lineItems1.productSku("P653727383"); - lineItems1.productName("First line item's name"); - lineItems1.quantity(21); - lineItems1.unitPrice("120.08"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - InvoicingV2InvoicesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.createInvoice(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/CreateInvoiceAndAssignItSpecificInvoiceNumber.java b/src/main/java/samples/Invoicing/Invoices/CreateInvoiceAndAssignItSpecificInvoiceNumber.java deleted file mode 100644 index 8f35ed1..0000000 --- a/src/main/java/samples/Invoicing/Invoices/CreateInvoiceAndAssignItSpecificInvoiceNumber.java +++ /dev/null @@ -1,111 +0,0 @@ -package samples.Invoicing.Invoices; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateInvoiceAndAssignItSpecificInvoiceNumber { - 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 InvoicingV2InvoicesPost201Response run() { - - CreateInvoiceRequest requestObj = new CreateInvoiceRequest(); - - Invoicingv2invoicesCustomerInformation customerInformation = new Invoicingv2invoicesCustomerInformation(); - customerInformation.name("Tanya Lee"); - customerInformation.email("tanya.lee@my-email.world"); - requestObj.customerInformation(customerInformation); - - Invoicingv2invoicesInvoiceInformation invoiceInformation = new Invoicingv2invoicesInvoiceInformation(); - invoiceInformation.invoiceNumber("A123"); - invoiceInformation.description("This is a test invoice"); - invoiceInformation.dueDate(new LocalDate("2019-07-11")); - invoiceInformation.sendImmediately(true); - invoiceInformation.allowPartialPayments(true); - invoiceInformation.deliveryMode("email"); - requestObj.invoiceInformation(invoiceInformation); - - Invoicingv2invoicesOrderInformation orderInformation = new Invoicingv2invoicesOrderInformation(); - Invoicingv2invoicesOrderInformationAmountDetails orderInformationAmountDetails = new Invoicingv2invoicesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2623.64"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.discountAmount("126.08"); - orderInformationAmountDetails.discountPercent(new BigDecimal(5.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.subAmount(new BigDecimal(2749.72).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.minimumPartialAmount(new BigDecimal(20.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails orderInformationAmountDetailsTaxDetails = new Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails(); - orderInformationAmountDetailsTaxDetails.type("State Tax"); - orderInformationAmountDetailsTaxDetails.amount("208.04"); - orderInformationAmountDetailsTaxDetails.rate("8.25"); - orderInformationAmountDetails.taxDetails(orderInformationAmountDetailsTaxDetails); - - Invoicingv2invoicesOrderInformationAmountDetailsFreight orderInformationAmountDetailsFreight = new Invoicingv2invoicesOrderInformationAmountDetailsFreight(); - orderInformationAmountDetailsFreight.amount("20.00"); - orderInformationAmountDetailsFreight.taxable(true); - orderInformationAmountDetails.freight(orderInformationAmountDetailsFreight); - - orderInformation.amountDetails(orderInformationAmountDetails); - - - List lineItems = new ArrayList (); - Invoicingv2invoicesOrderInformationLineItems lineItems1 = new Invoicingv2invoicesOrderInformationLineItems(); - lineItems1.productSku("P653727383"); - lineItems1.productName("First line item's name"); - lineItems1.quantity(21); - lineItems1.unitPrice("120.08"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - InvoicingV2InvoicesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.createInvoice(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/CreateInvoiceWithoutSendingIt.java b/src/main/java/samples/Invoicing/Invoices/CreateInvoiceWithoutSendingIt.java deleted file mode 100644 index 1b8953d..0000000 --- a/src/main/java/samples/Invoicing/Invoices/CreateInvoiceWithoutSendingIt.java +++ /dev/null @@ -1,111 +0,0 @@ -package samples.Invoicing.Invoices; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateInvoiceWithoutSendingIt { - 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 InvoicingV2InvoicesPost201Response run() { - - CreateInvoiceRequest requestObj = new CreateInvoiceRequest(); - - Invoicingv2invoicesCustomerInformation customerInformation = new Invoicingv2invoicesCustomerInformation(); - customerInformation.name("Tanya Lee"); - customerInformation.email("tanya.lee@my-email.world"); - requestObj.customerInformation(customerInformation); - - Invoicingv2invoicesInvoiceInformation invoiceInformation = new Invoicingv2invoicesInvoiceInformation(); - invoiceInformation.invoiceNumber("A123"); - invoiceInformation.description("This is a test invoice"); - invoiceInformation.dueDate(new LocalDate("2019-07-11")); - invoiceInformation.sendImmediately(true); - invoiceInformation.allowPartialPayments(true); - invoiceInformation.deliveryMode("none"); - requestObj.invoiceInformation(invoiceInformation); - - Invoicingv2invoicesOrderInformation orderInformation = new Invoicingv2invoicesOrderInformation(); - Invoicingv2invoicesOrderInformationAmountDetails orderInformationAmountDetails = new Invoicingv2invoicesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2623.64"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.discountAmount("126.08"); - orderInformationAmountDetails.discountPercent(new BigDecimal(5.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.subAmount(new BigDecimal(2749.72).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.minimumPartialAmount(new BigDecimal(20.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails orderInformationAmountDetailsTaxDetails = new Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails(); - orderInformationAmountDetailsTaxDetails.type("State Tax"); - orderInformationAmountDetailsTaxDetails.amount("208.04"); - orderInformationAmountDetailsTaxDetails.rate("8.25"); - orderInformationAmountDetails.taxDetails(orderInformationAmountDetailsTaxDetails); - - Invoicingv2invoicesOrderInformationAmountDetailsFreight orderInformationAmountDetailsFreight = new Invoicingv2invoicesOrderInformationAmountDetailsFreight(); - orderInformationAmountDetailsFreight.amount("20.00"); - orderInformationAmountDetailsFreight.taxable(true); - orderInformationAmountDetails.freight(orderInformationAmountDetailsFreight); - - orderInformation.amountDetails(orderInformationAmountDetails); - - - List lineItems = new ArrayList (); - Invoicingv2invoicesOrderInformationLineItems lineItems1 = new Invoicingv2invoicesOrderInformationLineItems(); - lineItems1.productSku("P653727383"); - lineItems1.productName("First line item's name"); - lineItems1.quantity(21); - lineItems1.unitPrice("120.08"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - InvoicingV2InvoicesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.createInvoice(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/GetInvoiceDetails.java b/src/main/java/samples/Invoicing/Invoices/GetInvoiceDetails.java deleted file mode 100644 index 144b248..0000000 --- a/src/main/java/samples/Invoicing/Invoices/GetInvoiceDetails.java +++ /dev/null @@ -1,61 +0,0 @@ -package samples.Invoicing.Invoices; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetInvoiceDetails { - 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 InvoicingV2InvoicesGet200Response run() { - String id = CreateDraftInvoice.run().getId(); - InvoicingV2InvoicesGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.getInvoice(id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/GetListOfInvoices.java b/src/main/java/samples/Invoicing/Invoices/GetListOfInvoices.java deleted file mode 100644 index 325e472..0000000 --- a/src/main/java/samples/Invoicing/Invoices/GetListOfInvoices.java +++ /dev/null @@ -1,59 +0,0 @@ -package samples.Invoicing.Invoices; - -import Api.InvoicesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.InvoicingV2InvoicesAllGet200Response; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class GetListOfInvoices { - private static String responseCode = null; - private static String responseStatus = 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 { - run(); - } - - public static InvoicingV2InvoicesAllGet200Response run() { - int offset = 0; - int limit = 10; - String status = null; - - InvoicingV2InvoicesAllGet200Response result = null; - - try - { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.getAllInvoices(offset, limit, status); - - responseCode = apiClient.responseCode; - responseStatus = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + responseStatus); - System.out.println(result); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/SendInvoice.java b/src/main/java/samples/Invoicing/Invoices/SendInvoice.java deleted file mode 100644 index d1fe194..0000000 --- a/src/main/java/samples/Invoicing/Invoices/SendInvoice.java +++ /dev/null @@ -1,56 +0,0 @@ -package samples.Invoicing.Invoices; - -import Api.InvoicesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.InvoicingV2InvoicesSend200Response; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class SendInvoice { - 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 { - run(); - } - - public static InvoicingV2InvoicesSend200Response run() { - String invoiceId = CreateDraftInvoice.run().getId(); - - InvoicingV2InvoicesSend200Response result = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.performSendAction(invoiceId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - - return result; - } -} diff --git a/src/main/java/samples/Invoicing/Invoices/UpdateInvoice.java b/src/main/java/samples/Invoicing/Invoices/UpdateInvoice.java deleted file mode 100644 index a30e231..0000000 --- a/src/main/java/samples/Invoicing/Invoices/UpdateInvoice.java +++ /dev/null @@ -1,104 +0,0 @@ -package samples.Invoicing.Invoices; - -import Api.InvoicesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import com.cybersource.authsdk.core.MerchantConfig; -import org.joda.time.LocalDate; - -import java.lang.invoke.MethodHandles; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -public class UpdateInvoice { - 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 { - run(); - } - public static InvoicingV2InvoicesPut200Response run() { - String invoiceId = CreateDraftInvoice.run().getId(); - UpdateInvoiceRequest requestObj = new UpdateInvoiceRequest(); - - Invoicingv2invoicesCustomerInformation customerInformation = new Invoicingv2invoicesCustomerInformation(); - customerInformation.name("New Customer Name"); - customerInformation.email("new_email@my-email.world"); - requestObj.customerInformation(customerInformation); - - Invoicingv2invoicesidInvoiceInformation invoiceInformation = new Invoicingv2invoicesidInvoiceInformation(); - invoiceInformation.description("This is after updating invoice"); - invoiceInformation.dueDate(new LocalDate("2019-07-11")); - invoiceInformation.allowPartialPayments(true); - invoiceInformation.deliveryMode("none"); - requestObj.invoiceInformation(invoiceInformation); - - Invoicingv2invoicesOrderInformation orderInformation = new Invoicingv2invoicesOrderInformation(); - Invoicingv2invoicesOrderInformationAmountDetails orderInformationAmountDetails = new Invoicingv2invoicesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2623.64"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.discountAmount("126.08"); - orderInformationAmountDetails.discountPercent(new BigDecimal(5.0).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.subAmount(new BigDecimal(2749.72).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - orderInformationAmountDetails.minimumPartialAmount(new BigDecimal(20.00).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails orderInformationAmountDetailsTaxDetails = new Invoicingv2invoicesOrderInformationAmountDetailsTaxDetails(); - orderInformationAmountDetailsTaxDetails.type("State Tax"); - orderInformationAmountDetailsTaxDetails.amount("208.00"); - orderInformationAmountDetailsTaxDetails.rate("8.25"); - orderInformationAmountDetails.taxDetails(orderInformationAmountDetailsTaxDetails); - - Invoicingv2invoicesOrderInformationAmountDetailsFreight orderInformationAmountDetailsFreight = new Invoicingv2invoicesOrderInformationAmountDetailsFreight(); - orderInformationAmountDetailsFreight.amount("20.00"); - orderInformationAmountDetailsFreight.taxable(true); - orderInformationAmountDetails.freight(orderInformationAmountDetailsFreight); - - orderInformation.amountDetails(orderInformationAmountDetails); - - List lineItems = new ArrayList<>(); - Invoicingv2invoicesOrderInformationLineItems lineItems1 = new Invoicingv2invoicesOrderInformationLineItems(); - lineItems1.productSku("P653727383"); - lineItems1.productName("First line item's name"); - lineItems1.quantity(21); - lineItems1.unitPrice("120.08"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - InvoicingV2InvoicesPut200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InvoicesApi apiInstance = new InvoicesApi(apiClient); - result = apiInstance.updateInvoice(invoiceId, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/MLEFeature/PaymentsWithMLE.java b/src/main/java/samples/MLEFeature/PaymentsWithMLE.java deleted file mode 100644 index 506093a..0000000 --- a/src/main/java/samples/MLEFeature/PaymentsWithMLE.java +++ /dev/null @@ -1,107 +0,0 @@ -package samples.MLEFeature; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.PaymentsApi; -import Data.ConfigurationWithMLE; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.CreatePaymentRequest; -import Model.PtsV2PaymentsPost201Response; -import Model.Ptsv2paymentsClientReferenceInformation; -import Model.Ptsv2paymentsOrderInformation; -import Model.Ptsv2paymentsOrderInformationAmountDetails; -import Model.Ptsv2paymentsOrderInformationBillTo; -import Model.Ptsv2paymentsPaymentInformation; -import Model.Ptsv2paymentsPaymentInformationCard; -import Model.Ptsv2paymentsProcessingInformation; - -public class PaymentsWithMLE { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = ConfigurationWithMLE.getMerchantDetailsWithMLE1(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMAPConfig.java b/src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMAPConfig.java deleted file mode 100644 index a1a1402..0000000 --- a/src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMAPConfig.java +++ /dev/null @@ -1,107 +0,0 @@ -package samples.MLEFeature; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.PaymentsApi; -import Data.ConfigurationWithMLE; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.CreatePaymentRequest; -import Model.PtsV2PaymentsPost201Response; -import Model.Ptsv2paymentsClientReferenceInformation; -import Model.Ptsv2paymentsOrderInformation; -import Model.Ptsv2paymentsOrderInformationAmountDetails; -import Model.Ptsv2paymentsOrderInformationBillTo; -import Model.Ptsv2paymentsPaymentInformation; -import Model.Ptsv2paymentsPaymentInformationCard; -import Model.Ptsv2paymentsProcessingInformation; - -public class PaymentsWithMLEControlFromMAPConfig { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = ConfigurationWithMLE.getMerchantDetailsWithMLE2(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMapConfigOnly.java b/src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMapConfigOnly.java deleted file mode 100644 index 5e3e181..0000000 --- a/src/main/java/samples/MLEFeature/PaymentsWithMLEControlFromMapConfigOnly.java +++ /dev/null @@ -1,107 +0,0 @@ -package samples.MLEFeature; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.PaymentsApi; -import Data.ConfigurationWithMLE; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.CreatePaymentRequest; -import Model.PtsV2PaymentsPost201Response; -import Model.Ptsv2paymentsClientReferenceInformation; -import Model.Ptsv2paymentsOrderInformation; -import Model.Ptsv2paymentsOrderInformationAmountDetails; -import Model.Ptsv2paymentsOrderInformationBillTo; -import Model.Ptsv2paymentsPaymentInformation; -import Model.Ptsv2paymentsPaymentInformationCard; -import Model.Ptsv2paymentsProcessingInformation; - -public class PaymentsWithMLEControlFromMapConfigOnly { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = ConfigurationWithMLE.getMerchantDetailsWithMLE3(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/MerchantBoarding/CreateRegistration.java b/src/main/java/samples/MerchantBoarding/CreateRegistration.java deleted file mode 100644 index ab07960..0000000 --- a/src/main/java/samples/MerchantBoarding/CreateRegistration.java +++ /dev/null @@ -1,229 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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("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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index 1ba6577..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingAmexDirect.java +++ /dev/null @@ -1,245 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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); - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index 3f0136b..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingBarclays.java +++ /dev/null @@ -1,254 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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"); - organizationInformation.type("MERCHANT"); - - 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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index be23356..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingBinLookup.java +++ /dev/null @@ -1,133 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index 02d38cc..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingCUP.java +++ /dev/null @@ -1,218 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index efef034..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingEFTPOS.java +++ /dev/null @@ -1,172 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index a507611..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingFDIGlobal.java +++ /dev/null @@ -1,211 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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("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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index e1e1d7a..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingGPX.java +++ /dev/null @@ -1,296 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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"); - organizationInformation.type("MERCHANT"); - 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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index 46e8bde..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingSmartFDC.java +++ /dev/null @@ -1,226 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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"); - organizationInformation.type("MERCHANT"); - 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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index 7273291..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingTSYS.java +++ /dev/null @@ -1,271 +0,0 @@ -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 InlineResponse2013 run() { - - PostRegistrationBody reqObj=new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation=new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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"); - organizationInformation.type("MERCHANT"); - 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("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); - - - InlineResponse2013 result=null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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 deleted file mode 100644 index e386b04..0000000 --- a/src/main/java/samples/MerchantBoarding/MerchantBoardingVPC.java +++ /dev/null @@ -1,296 +0,0 @@ -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 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 InlineResponse2013 run() { - - PostRegistrationBody reqObj = new PostRegistrationBody(); - - Boardingv1registrationsOrganizationInformation organizationInformation = new Boardingv1registrationsOrganizationInformation(); - organizationInformation.parentOrganizationId("apitester00"); - organizationInformation.type("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"); - organizationInformation.type("MERCHANT"); - common.masterCardAssignedId(null); - common.sicCode(null); - common.enablePartialAuth(false); - - common.enableInterchangeOptimization(false); - common.enableSplitShipment(false); - common.visaDelegatedAuthenticationId("123457"); - - //TBC - common.domesticMerchantId(true); - // - 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); - - - InlineResponse2013 result = null; - - try { - //Boarding API support only JWT Auth Type - merchantProp = MerchantBoardingConfiguration.getMerchantConfigForBoardingAPI(); - 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; - } -} \ No newline at end of file diff --git a/src/main/java/samples/PayerAuthentication/AuthenticationWithNORedirect.java b/src/main/java/samples/PayerAuthentication/AuthenticationWithNORedirect.java deleted file mode 100644 index d3638dc..0000000 --- a/src/main/java/samples/PayerAuthentication/AuthenticationWithNORedirect.java +++ /dev/null @@ -1,103 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthenticationWithNORedirect { - 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 RiskV1AuthenticationsPost201Response run() { - - CheckPayerAuthEnrollmentRequest requestObj = new CheckPayerAuthEnrollmentRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("7891234"); - clientReferenceInformationPartner.solutionId("89012345"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation(); - Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("10.99"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.postalCode("94105"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsetupsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformationCard.number("4000990000000004"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - RiskV1AuthenticationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.checkPayerAuthEnrollment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/AuthenticationWithNewAccount.java b/src/main/java/samples/PayerAuthentication/AuthenticationWithNewAccount.java deleted file mode 100644 index 77ada9d..0000000 --- a/src/main/java/samples/PayerAuthentication/AuthenticationWithNewAccount.java +++ /dev/null @@ -1,116 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthenticationWithNewAccount { - 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 RiskV1AuthenticationsPost201Response run() { - - CheckPayerAuthEnrollmentRequest requestObj = new CheckPayerAuthEnrollmentRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("New Account"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation(); - Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("10.99"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.postalCode("94105"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsetupsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformationCard.number("4000990000000004"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsConsumerAuthenticationInformation consumerAuthenticationInformation = new Riskv1decisionsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.transactionMode("MOTO"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - Riskv1authenticationsRiskInformation riskInformation = new Riskv1authenticationsRiskInformation(); - Ptsv2paymentsRiskInformationBuyerHistory riskInformationBuyerHistory = new Ptsv2paymentsRiskInformationBuyerHistory(); - Ptsv2paymentsRiskInformationBuyerHistoryCustomerAccount riskInformationBuyerHistoryCustomerAccount = new Ptsv2paymentsRiskInformationBuyerHistoryCustomerAccount(); - riskInformationBuyerHistoryCustomerAccount.creationHistory("NEW_ACCOUNT"); - riskInformationBuyerHistory.customerAccount(riskInformationBuyerHistoryCustomerAccount); - - Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory riskInformationBuyerHistoryAccountHistory = new Ptsv2paymentsRiskInformationBuyerHistoryAccountHistory(); - riskInformationBuyerHistoryAccountHistory.firstUseOfShippingAddress(false); - riskInformationBuyerHistory.accountHistory(riskInformationBuyerHistoryAccountHistory); - - riskInformation.buyerHistory(riskInformationBuyerHistory); - - requestObj.riskInformation(riskInformation); - - RiskV1AuthenticationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.checkPayerAuthEnrollment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/EnrollWithCustomerIdAsPaymentInformation.java b/src/main/java/samples/PayerAuthentication/EnrollWithCustomerIdAsPaymentInformation.java deleted file mode 100644 index 52244c5..0000000 --- a/src/main/java/samples/PayerAuthentication/EnrollWithCustomerIdAsPaymentInformation.java +++ /dev/null @@ -1,95 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class EnrollWithCustomerIdAsPaymentInformation { - 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 RiskV1AuthenticationsPost201Response run() { - - CheckPayerAuthEnrollmentRequest requestObj = new CheckPayerAuthEnrollmentRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("UNKNOWN"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation(); - Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("10.99"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.postalCode("94105"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation(); - Riskv1authenticationsPaymentInformationCustomer paymentInformationCustomer = new Riskv1authenticationsPaymentInformationCustomer(); - paymentInformationCustomer.customerId("AB695DA801DD1BB6E05341588E0A3BDC"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - RiskV1AuthenticationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.checkPayerAuthEnrollment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/EnrollWithPendingAuthentication.java b/src/main/java/samples/PayerAuthentication/EnrollWithPendingAuthentication.java deleted file mode 100644 index 4af707f..0000000 --- a/src/main/java/samples/PayerAuthentication/EnrollWithPendingAuthentication.java +++ /dev/null @@ -1,106 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class EnrollWithPendingAuthentication { - 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 RiskV1AuthenticationsPost201Response run() { - - CheckPayerAuthEnrollmentRequest requestObj = new CheckPayerAuthEnrollmentRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation(); - Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("10.99"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.postalCode("94105"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsetupsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformationCard.number("4000000000000101"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1authenticationsBuyerInformation buyerInformation = new Riskv1authenticationsBuyerInformation(); - buyerInformation.mobilePhone(1245789632); - requestObj.buyerInformation(buyerInformation); - - Riskv1decisionsConsumerAuthenticationInformation consumerAuthenticationInformation = new Riskv1decisionsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.transactionMode("MOTO"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - RiskV1AuthenticationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.checkPayerAuthEnrollment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/EnrollWithTransientToken.java b/src/main/java/samples/PayerAuthentication/EnrollWithTransientToken.java deleted file mode 100644 index ba04a8e..0000000 --- a/src/main/java/samples/PayerAuthentication/EnrollWithTransientToken.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class EnrollWithTransientToken { - 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 RiskV1AuthenticationsPost201Response run() { - - CheckPayerAuthEnrollmentRequest requestObj = new CheckPayerAuthEnrollmentRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("UNKNOWN"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation(); - Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("10.99"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.postalCode("94105"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationsetupsTokenInformation tokenInformation = new Riskv1authenticationsetupsTokenInformation(); - tokenInformation.transientToken("eyJraWQiOiIwOFRPcEh3YlFhQlpZRk9BY1dSZUpHb2ZNYUpvMk85USIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjp7Im51bWJlciI6IjQxMTExMVhYWFhYWDExMTEiLCJ0eXBlIjoiMDAxIn0sImlzcyI6IkZsZXgvMDgiLCJleHAiOjE1OTU5MjA0NDYsInR5cGUiOiJtZi0wLjExLjAiLCJpYXQiOjE1OTU5MTk1NDYsImp0aSI6IjFFNTM3NlhUR0Y4MjgwN0xERFhHODdaNVhZQ1NKRkNUMlhDMDNVSzgxRzAzWEVGN0xRRzg1RjFGRDAzRUI4NTYifQ.rxJOaTwfQLvElP43nZ7h60dx4-vTo6az-ej7owO1W_kGLixn6PlH7QTnpMZxc9RdDVRLcYwMs4fEYF1-D5Ua7iDeqKoCyA3uBGJ_G_zb1HMQlSK3K_KyWRiwNUbwFItHKIUonesJPajuauH_6GKI072_SZtnfnnQkToMRZtt379w_hP0eERztH-JNAMmwOPSc7Tq99QkaKXokfHinLk53tvI_NONyXcLf4Bthtwf-Li7_HbVLe28n-1HNPAoJX5VHdLOG9PhmsxMLQiAUbV41I810OXTxvHM6_VNSPE2xnfJV_yqU_GoI2E_zyeQkXB2w53qYOFa8n4LDhSEts3F8g"); - requestObj.tokenInformation(tokenInformation); - - RiskV1AuthenticationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.checkPayerAuthEnrollment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/EnrollWithTravelInformation.java b/src/main/java/samples/PayerAuthentication/EnrollWithTravelInformation.java deleted file mode 100644 index 82cbba5..0000000 --- a/src/main/java/samples/PayerAuthentication/EnrollWithTravelInformation.java +++ /dev/null @@ -1,139 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class EnrollWithTravelInformation { - 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 { - run(); - } - public static RiskV1AuthenticationsPost201Response run() { - - CheckPayerAuthEnrollmentRequest requestObj = new CheckPayerAuthEnrollmentRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation(); - Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("10.99"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.postalCode("94105"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsetupsPaymentInformationCard(); - paymentInformationCard.type("002"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformationCard.number("5200340000000015"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1authenticationsBuyerInformation buyerInformation = new Riskv1authenticationsBuyerInformation(); - buyerInformation.mobilePhone(1245789632); - requestObj.buyerInformation(buyerInformation); - - Riskv1decisionsConsumerAuthenticationInformation consumerAuthenticationInformation = new Riskv1decisionsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.transactionMode("MOTO"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - Riskv1authenticationsTravelInformation travelInformation = new Riskv1authenticationsTravelInformation(); - - List legs = new ArrayList (); - Riskv1decisionsTravelInformationLegs legs1 = new Riskv1decisionsTravelInformationLegs(); - legs1.destination("DEF"); - legs1.carrierCode("UA"); - legs1.departureDate("2019-01-01"); - legs.add(legs1); - - Riskv1decisionsTravelInformationLegs legs2 = new Riskv1decisionsTravelInformationLegs(); - legs2.destination("RES"); - legs2.carrierCode("AS"); - legs2.departureDate("2019-02-21"); - legs.add(legs2); - - travelInformation.legs(legs); - - travelInformation.numberOfPassengers(2); - - List passengers = new ArrayList (); - Riskv1decisionsTravelInformationPassengers passengers1 = new Riskv1decisionsTravelInformationPassengers(); - passengers1.firstName("Raj"); - passengers1.lastName("Charles"); - passengers.add(passengers1); - - Riskv1decisionsTravelInformationPassengers passengers2 = new Riskv1decisionsTravelInformationPassengers(); - passengers2.firstName("Potter"); - passengers2.lastName("Suhember"); - passengers.add(passengers2); - - travelInformation.passengers(passengers); - - requestObj.travelInformation(travelInformation); - - RiskV1AuthenticationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.checkPayerAuthEnrollment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/PendingAuthenticationWithUnknownPath.java b/src/main/java/samples/PayerAuthentication/PendingAuthenticationWithUnknownPath.java deleted file mode 100644 index f22c744..0000000 --- a/src/main/java/samples/PayerAuthentication/PendingAuthenticationWithUnknownPath.java +++ /dev/null @@ -1,98 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PendingAuthenticationWithUnknownPath { - 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 RiskV1AuthenticationsPost201Response run() { - - CheckPayerAuthEnrollmentRequest requestObj = new CheckPayerAuthEnrollmentRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("UNKNOWN"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsOrderInformation orderInformation = new Riskv1authenticationsOrderInformation(); - Riskv1authenticationsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("10.99"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1authenticationsOrderInformationBillTo orderInformationBillTo = new Riskv1authenticationsOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.postalCode("94105"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationsPaymentInformation paymentInformation = new Riskv1authenticationsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsetupsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformationCard.number("4012001037490014"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - RiskV1AuthenticationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.checkPayerAuthEnrollment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/SetupCompletionWithCardNumber.java b/src/main/java/samples/PayerAuthentication/SetupCompletionWithCardNumber.java deleted file mode 100644 index f7e97b8..0000000 --- a/src/main/java/samples/PayerAuthentication/SetupCompletionWithCardNumber.java +++ /dev/null @@ -1,81 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SetupCompletionWithCardNumber { - 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 { - run(); - } - public static RiskV1AuthenticationSetupsPost201Response run() { - - PayerAuthSetupRequest requestObj = new PayerAuthSetupRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("7891234"); - clientReferenceInformationPartner.solutionId("89012345"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsetupsPaymentInformation paymentInformation = new Riskv1authenticationsetupsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCard paymentInformationCard = new Riskv1authenticationsetupsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformationCard.number("4000000000000101"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - RiskV1AuthenticationSetupsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.payerAuthSetup(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/SetupCompletionWithFlexTransientToken.java b/src/main/java/samples/PayerAuthentication/SetupCompletionWithFlexTransientToken.java deleted file mode 100644 index b2da96b..0000000 --- a/src/main/java/samples/PayerAuthentication/SetupCompletionWithFlexTransientToken.java +++ /dev/null @@ -1,71 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SetupCompletionWithFlexTransientToken { - 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 RiskV1AuthenticationSetupsPost201Response run() { - - PayerAuthSetupRequest requestObj = new PayerAuthSetupRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsetupsTokenInformation tokenInformation = new Riskv1authenticationsetupsTokenInformation(); - tokenInformation.transientToken("eyJraWQiOiIwOFRPcEh3YlFhQlpZRk9BY1dSZUpHb2ZNYUpvMk85USIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjp7Im51bWJlciI6IjQxMTExMVhYWFhYWDExMTEiLCJ0eXBlIjoiMDAxIn0sImlzcyI6IkZsZXgvMDgiLCJleHAiOjE1OTU5MjA0NDYsInR5cGUiOiJtZi0wLjExLjAiLCJpYXQiOjE1OTU5MTk1NDYsImp0aSI6IjFFNTM3NlhUR0Y4MjgwN0xERFhHODdaNVhZQ1NKRkNUMlhDMDNVSzgxRzAzWEVGN0xRRzg1RjFGRDAzRUI4NTYifQ.rxJOaTwfQLvElP43nZ7h60dx4-vTo6az-ej7owO1W_kGLixn6PlH7QTnpMZxc9RdDVRLcYwMs4fEYF1-D5Ua7iDeqKoCyA3uBGJ_G_zb1HMQlSK3K_KyWRiwNUbwFItHKIUonesJPajuauH_6GKI072_SZtnfnnQkToMRZtt379w_hP0eERztH-JNAMmwOPSc7Tq99QkaKXokfHinLk53tvI_NONyXcLf4Bthtwf-Li7_HbVLe28n-1HNPAoJX5VHdLOG9PhmsxMLQiAUbV41I810OXTxvHM6_VNSPE2xnfJV_yqU_GoI2E_zyeQkXB2w53qYOFa8n4LDhSEts3F8g"); - requestObj.tokenInformation(tokenInformation); - - RiskV1AuthenticationSetupsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.payerAuthSetup(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/SetupCompletionWithFluidDataValueAndPaymentSolution.java b/src/main/java/samples/PayerAuthentication/SetupCompletionWithFluidDataValueAndPaymentSolution.java deleted file mode 100644 index e2bb464..0000000 --- a/src/main/java/samples/PayerAuthentication/SetupCompletionWithFluidDataValueAndPaymentSolution.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SetupCompletionWithFluidDataValueAndPaymentSolution { - 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 RiskV1AuthenticationSetupsPost201Response run() { - - PayerAuthSetupRequest requestObj = new PayerAuthSetupRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsetupsPaymentInformation paymentInformation = new Riskv1authenticationsetupsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationFluidData paymentInformationFluidData = new Riskv1authenticationsetupsPaymentInformationFluidData(); - paymentInformationFluidData.value("eyJkYXRhIjoiOFJTK2o1a2ZLRjZkTnkzNVwvOTluR3ZEVis0WUVlaStBb2VmUUNMXC9SNTN0TnVMeHJxTzh4b1g2SnBScm9WWUVUOUNvUkhIWFZMRjJNSVNIZlVtM25UczltdGFPTUdqcW1oeWdjTFpWVWI3OHhxYVVUT2JwWUxLelY0dFR1QmhvRkV4UVJ1d2lvTmo2bXJsRlRjUm5LNzdcL2lCR01yYVlZcXZTVnhGK3ViK1JXK3BGeTRDNUVUOVhmcHBkS2xHYXVpODdzcTBtYVlYVk9qOGFaNTFMWjZvS1NKZkR1clhvWEtLNHRqd1wvaDVRK1dcL0x2dnJxSUhmZmVhK21MZXVRY3RHK0k3UUN6MTRpVmdROUFEMW1oWFUrbVdwZXRUQWZ5WXhoVituZlh1NlpISGRDWFV1cUp6djQydHg4UlwvN0lvdld5OWx6Z0N3YnpuclVsY3pUcThkb3JtV3A4eXhYQklDNnJHRTdlTVJrS3oxZFwvUFFDXC9DS2J1NDhNK0R4XC9VejNoUFwvZ1NnRGoxakJNcUllUUZiRWFzcTRWTUV1ZG9FNUh1UjBcLzRQMXJmdG9EVlpwNnhFdnF1STY5dkt2YnZHcXpmTkpUNjVnPT0iLCJ2ZXJzaW9uIjoiRUNfdjEiLCJoZWFkZXIiOnsiYXBwbGljYXRpb25EYXRhIjoiNzQ2NTczNzQ2MTcwNzA2QzY5NjM2MTc0Njk2RjZFNjQ2MTc0NjEiLCJ0cmFuc2FjdGlvbklkIjoiNzQ2NTczNzQ3NDcyNjE2RTczNjE2Mzc0Njk2RjZFNjk2NCIsImVwaGVtZXJhbFB1YmxpY0tleSI6Ik1JSUJTekNDQVFNR0J5cUdTTTQ5QWdFd2dmY0NBUUV3TEFZSEtvWkl6ajBCQVFJaEFQXC9cL1wvXC84QUFBQUJBQUFBQUFBQUFBQUFBQUFBXC9cL1wvXC9cL1wvXC9cL1wvXC9cL1wvXC9cL1wvXC9NRnNFSVBcL1wvXC9cLzhBQUFBQkFBQUFBQUFBQUFBQUFBQUFcL1wvXC9cL1wvXC9cL1wvXC9cL1wvXC9cL1wvXC84QkNCYXhqWFlxanFUNTdQcnZWVjJtSWE4WlIwR3NNeFRzUFk3emp3K0o5SmdTd01WQU1TZE5naUc1d1NUYW1aNDRST2RKcmVCbjM2UUJFRUVheGZSOHVFc1FrZjR2T2JsWTZSQThuY0RmWUV0NnpPZzlLRTVSZGlZd3BaUDQwTGlcL2hwXC9tNDduNjBwOEQ1NFdLODR6VjJzeFhzN0x0a0JvTjc5UjlRSWhBUFwvXC9cL1wvOEFBQUFBXC9cL1wvXC9cL1wvXC9cL1wvXC8rODV2cXRweGVlaFBPNXlzTDhZeVZSQWdFQkEwSUFCQmJHK2xtTHJIWWtKSVwvSUUwcTU3dEN0bE5jK2pBWHNudVMrSnFlOFVcLzc0cSs5NVRnbzVFRjBZNks3b01LTUt5cTMwY3VQbmtIenkwMjVpU1BGdWczRT0iLCJwdWJsaWNLZXlIYXNoIjoieCtQbUhHMzdUNjdBWUFIenVqbGJyaW1JdzZZaFlYaVpjYjV3WnJCNGpRdz0ifSwic2lnbmF0dXJlIjoiTUlJRFFnWUpLb1pJaHZjTkFRY0NvSUlETXpDQ0F5OENBUUV4Q3pBSkJnVXJEZ01DR2dVQU1Bc0dDU3FHU0liM0RRRUhBYUNDQWlzd2dnSW5NSUlCbEtBREFnRUNBaEJjbCtQZjMrVTRwazEzblZEOW53UVFNQWtHQlNzT0F3SWRCUUF3SnpFbE1DTUdBMVVFQXg0Y0FHTUFhQUJ0QUdFQWFRQkFBSFlBYVFCekFHRUFMZ0JqQUc4QWJUQWVGdzB4TkRBeE1ERXdOakF3TURCYUZ3MHlOREF4TURFd05qQXdNREJhTUNjeEpUQWpCZ05WQkFNZUhBQmpBR2dBYlFCaEFHa0FRQUIyQUdrQWN3QmhBQzRBWXdCdkFHMHdnWjh3RFFZSktvWklodmNOQVFFQkJRQURnWTBBTUlHSkFvR0JBTkM4K2tndGdtdldGMU96amdETnJqVEVCUnVvXC81TUt2bE0xNDZwQWY3R3g0MWJsRTl3NGZJWEpBRDdGZk83UUtqSVhZTnQzOXJMeXk3eER3YlwvNUlrWk02MFRaMmlJMXBqNTVVYzhmZDRmek9wazNmdFphUUdYTkxZcHRHMWQ5VjdJUzgyT3VwOU1NbzFCUFZyWFRQSE5jc005OUVQVW5QcWRiZUdjODdtMHJBZ01CQUFHalhEQmFNRmdHQTFVZEFRUlJNRStBRUhaV1ByV3RKZDdZWjQzMWhDZzdZRlNoS1RBbk1TVXdJd1lEVlFRREhod0FZd0JvQUcwQVlRQnBBRUFBZGdCcEFITUFZUUF1QUdNQWJ3QnRnaEJjbCtQZjMrVTRwazEzblZEOW53UVFNQWtHQlNzT0F3SWRCUUFEZ1lFQWJVS1lDa3VJS1M5UVEybUZjTVlSRUltMmwrWGc4XC9KWHYrR0JWUUprT0tvc2NZNGlOREZBXC9iUWxvZ2Y5TExVODRUSHdOUm5zdlYzUHJ2N1JUWTgxZ3EwZHRDOHpZY0FhQWtDSElJM3lxTW5KNEFPdTZFT1c5a0prMjMyZ1NFN1dsQ3RIYmZMU0tmdVNnUVg4S1hRWXVaTGsyUnI2M044QXBYc1h3QkwzY0oweGdlQXdnZDBDQVFFd096QW5NU1V3SXdZRFZRUURIaHdBWXdCb0FHMEFZUUJwQUVBQWRnQnBBSE1BWVFBdUFHTUFid0J0QWhCY2wrUGYzK1U0cGsxM25WRDlud1FRTUFrR0JTc09Bd0lhQlFBd0RRWUpLb1pJaHZjTkFRRUJCUUFFZ1lBMG9MXC9KSWFTN0tra1RFNG1pOGRmU2tQVVwvdlp2cVwva2NYZ1pUdGJZbENtTFM4YzNuS2VZNVE0c2s4MXJnZkI1ampBMWJRZldhUHBKc05tVWNSS3gzS0FGUEtpNzE0WWVYdGUrcmc2V1k4MnVxcnlwRERiTkhqSWVpNjVqV0dvcGRZUEx6TEk5c1Z3NDh5OHlqSXY3SjFaQVlycnp6YjBwNzUzcUJUQ0ZEN1p3PT0ifQ=="); - paymentInformation.fluidData(paymentInformationFluidData); - - requestObj.paymentInformation(paymentInformation); - - Riskv1authenticationsetupsProcessingInformation processingInformation = new Riskv1authenticationsetupsProcessingInformation(); - processingInformation.paymentSolution("001"); - requestObj.processingInformation(processingInformation); - - RiskV1AuthenticationSetupsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.payerAuthSetup(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/SetupCompletionWithSecureStorageToken.java b/src/main/java/samples/PayerAuthentication/SetupCompletionWithSecureStorageToken.java deleted file mode 100644 index 5fd7074..0000000 --- a/src/main/java/samples/PayerAuthentication/SetupCompletionWithSecureStorageToken.java +++ /dev/null @@ -1,74 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SetupCompletionWithSecureStorageToken { - 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 RiskV1AuthenticationSetupsPost201Response run() { - - PayerAuthSetupRequest requestObj = new PayerAuthSetupRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsetupsPaymentInformation paymentInformation = new Riskv1authenticationsetupsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCustomer paymentInformationCustomer = new Riskv1authenticationsetupsPaymentInformationCustomer(); - paymentInformationCustomer.customerId("5795045921830181636348"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - RiskV1AuthenticationSetupsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.payerAuthSetup(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/SetupCompletionWithTMSToken.java b/src/main/java/samples/PayerAuthentication/SetupCompletionWithTMSToken.java deleted file mode 100644 index 0d6ca9c..0000000 --- a/src/main/java/samples/PayerAuthentication/SetupCompletionWithTMSToken.java +++ /dev/null @@ -1,74 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SetupCompletionWithTMSToken { - 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 RiskV1AuthenticationSetupsPost201Response run() { - - PayerAuthSetupRequest requestObj = new PayerAuthSetupRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsetupsPaymentInformation paymentInformation = new Riskv1authenticationsetupsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationCustomer paymentInformationCustomer = new Riskv1authenticationsetupsPaymentInformationCustomer(); - paymentInformationCustomer.customerId("AB695DA801DD1BB6E05341588E0A3BDC"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - RiskV1AuthenticationSetupsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.payerAuthSetup(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/SetupCompletionWithTokenizedCard.java b/src/main/java/samples/PayerAuthentication/SetupCompletionWithTokenizedCard.java deleted file mode 100644 index cd6fa5e..0000000 --- a/src/main/java/samples/PayerAuthentication/SetupCompletionWithTokenizedCard.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SetupCompletionWithTokenizedCard { - 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 RiskV1AuthenticationSetupsPost201Response run() { - - PayerAuthSetupRequest requestObj = new PayerAuthSetupRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("cybs_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationsetupsPaymentInformation paymentInformation = new Riskv1authenticationsetupsPaymentInformation(); - Riskv1authenticationsetupsPaymentInformationTokenizedCard paymentInformationTokenizedCard = new Riskv1authenticationsetupsPaymentInformationTokenizedCard(); - paymentInformationTokenizedCard.transactionType("1"); - paymentInformationTokenizedCard.type("001"); - paymentInformationTokenizedCard.expirationMonth("11"); - paymentInformationTokenizedCard.expirationYear("2025"); - paymentInformationTokenizedCard.number("4111111111111111"); - paymentInformation.tokenizedCard(paymentInformationTokenizedCard); - - requestObj.paymentInformation(paymentInformation); - - RiskV1AuthenticationSetupsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.payerAuthSetup(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/PayerAuthentication/ValidateAuthenticationResults.java b/src/main/java/samples/PayerAuthentication/ValidateAuthenticationResults.java deleted file mode 100644 index 2cfc8c9..0000000 --- a/src/main/java/samples/PayerAuthentication/ValidateAuthenticationResults.java +++ /dev/null @@ -1,93 +0,0 @@ -package samples.PayerAuthentication; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ValidateAuthenticationResults { - 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 RiskV1AuthenticationResultsPost201Response run() { - - ValidateRequest requestObj = new ValidateRequest(); - - Riskv1authenticationsetupsClientReferenceInformation clientReferenceInformation = new Riskv1authenticationsetupsClientReferenceInformation(); - clientReferenceInformation.code("pavalidatecheck"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("7891234"); - clientReferenceInformationPartner.solutionId("89012345"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1authenticationresultsOrderInformation orderInformation = new Riskv1authenticationresultsOrderInformation(); - Riskv1authenticationresultsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1authenticationresultsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("200.00"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Riskv1authenticationresultsPaymentInformation paymentInformation = new Riskv1authenticationresultsPaymentInformation(); - Riskv1authenticationresultsPaymentInformationCard paymentInformationCard = new Riskv1authenticationresultsPaymentInformationCard(); - paymentInformationCard.type("002"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformationCard.number("5200000000000007"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1authenticationresultsConsumerAuthenticationInformation consumerAuthenticationInformation = new Riskv1authenticationresultsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.authenticationTransactionId("PYffv9G3sa1e0CQr5fV0"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - RiskV1AuthenticationResultsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayerAuthenticationApi apiInstance = new PayerAuthenticationApi(apiClient); - result = apiInstance.validateAuthenticationResults(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Capture/CaptureOfAuthorizationThatUsedSwipedTrackData.java b/src/main/java/samples/Payments/Capture/CaptureOfAuthorizationThatUsedSwipedTrackData.java deleted file mode 100644 index 3d6a8cf..0000000 --- a/src/main/java/samples/Payments/Capture/CaptureOfAuthorizationThatUsedSwipedTrackData.java +++ /dev/null @@ -1,82 +0,0 @@ -package samples.Payments.Capture; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.AuthorizationUsingSwipedTrackData; - -public class CaptureOfAuthorizationThatUsedSwipedTrackData { - 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 PtsV2PaymentsCapturesPost201Response run() { - PtsV2PaymentsPost201Response paymentResponse = AuthorizationUsingSwipedTrackData.run(); - String id = paymentResponse.getId(); - - CapturePaymentRequest requestObj = new CapturePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("1234567890"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.thirdPartyCertificationNumber("123456789012"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidcapturesOrderInformation orderInformation = new Ptsv2paymentsidcapturesOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsCapturesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CaptureApi apiInstance = new CaptureApi(apiClient); - result = apiInstance.capturePayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Capture/CapturePayment.java b/src/main/java/samples/Payments/Capture/CapturePayment.java deleted file mode 100644 index c39821b..0000000 --- a/src/main/java/samples/Payments/Capture/CapturePayment.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.Payments.Capture; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.SimpleAuthorizationInternet; - -public class CapturePayment { - 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 { - run(); - } - - public static PtsV2PaymentsCapturesPost201Response run() { - PtsV2PaymentsPost201Response paymentResponse = SimpleAuthorizationInternet.run(); - String id = paymentResponse.getId(); - - CapturePaymentRequest requestObj = new CapturePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidcapturesOrderInformation orderInformation = new Ptsv2paymentsidcapturesOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsCapturesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CaptureApi apiInstance = new CaptureApi(apiClient); - result = apiInstance.capturePayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Capture/CapturePaymentServiceFee.java b/src/main/java/samples/Payments/Capture/CapturePaymentServiceFee.java deleted file mode 100644 index e816810..0000000 --- a/src/main/java/samples/Payments/Capture/CapturePaymentServiceFee.java +++ /dev/null @@ -1,88 +0,0 @@ -package samples.Payments.Capture; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.ServiceFeesWithCreditCardTransaction; - -public class CapturePaymentServiceFee { - 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 { - run(); - } - - public static PtsV2PaymentsCapturesPost201Response run() { - PtsV2PaymentsPost201Response paymentResponse = ServiceFeesWithCreditCardTransaction.run(); - String id = paymentResponse.getId(); - - CapturePaymentRequest requestObj = new CapturePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidcapturesOrderInformation orderInformation = new Ptsv2paymentsidcapturesOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2325.00"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.serviceFeeAmount("30.0"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsidcapturesMerchantInformation merchantInformation = new Ptsv2paymentsidcapturesMerchantInformation(); - Ptsv2paymentsMerchantInformationServiceFeeDescriptor merchantInformationServiceFeeDescriptor = new Ptsv2paymentsMerchantInformationServiceFeeDescriptor(); - merchantInformationServiceFeeDescriptor.name("Vacations Service Fee"); - merchantInformationServiceFeeDescriptor.contact("8009999999"); - merchantInformationServiceFeeDescriptor.state("CA"); - merchantInformation.serviceFeeDescriptor(merchantInformationServiceFeeDescriptor); - - requestObj.merchantInformation(merchantInformation); - - PtsV2PaymentsCapturesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CaptureApi apiInstance = new CaptureApi(apiClient); - result = apiInstance.capturePayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Capture/RestaurantCaptureWithGratuity.java b/src/main/java/samples/Payments/Capture/RestaurantCaptureWithGratuity.java deleted file mode 100644 index 830e2ab..0000000 --- a/src/main/java/samples/Payments/Capture/RestaurantCaptureWithGratuity.java +++ /dev/null @@ -1,87 +0,0 @@ -package samples.Payments.Capture; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.RestaurantAuthorization; - -public class RestaurantCaptureWithGratuity { - 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 PtsV2PaymentsCapturesPost201Response run() { - PtsV2PaymentsPost201Response paymentResponse = RestaurantAuthorization.run(); - String id = paymentResponse.getId(); - - CapturePaymentRequest requestObj = new CapturePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("1234567890"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.thirdPartyCertificationNumber("123456789012"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidcapturesProcessingInformation processingInformation = new Ptsv2paymentsidcapturesProcessingInformation(); - processingInformation.industryDataType("restaurant"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidcapturesOrderInformation orderInformation = new Ptsv2paymentsidcapturesOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.gratuityAmount("11.50"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsCapturesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CaptureApi apiInstance = new CaptureApi(apiClient); - result = apiInstance.capturePayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/Credit.java b/src/main/java/samples/Payments/Credit/Credit.java deleted file mode 100644 index b55c6c7..0000000 --- a/src/main/java/samples/Payments/Credit/Credit.java +++ /dev/null @@ -1,97 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class Credit { - 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 { - run(); - } - - public static PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("12345678"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("03"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("200"); - orderInformationAmountDetails.currency("usd"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("900 Metro Center Blvd"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("9321499232"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java b/src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java deleted file mode 100644 index 73ef3d7..0000000 --- a/src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreditUsingBluefinPCIP2PEForCardPresentEnabledAcquirer { - 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 PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("demomerchant"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2creditsProcessingInformation processingInformation = new Ptsv2creditsProcessingInformation(); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard(); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2050"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationFluidData paymentInformationFluidData = new Ptsv2paymentsPaymentInformationFluidData(); - paymentInformationFluidData.descriptor("Ymx1ZWZpbg=="); - paymentInformationFluidData.value("02d700801f3c20008383252a363031312a2a2a2a2a2a2a2a303030395e46444d53202020202020202020202020202020202020202020205e323231322a2a2a2a2a2a2a2a3f2a3b363031312a2a2a2a2a2a2a2a303030393d323231322a2a2a2a2a2a2a2a3f2a7a75ad15d25217290c54b3d9d1c3868602136c68d339d52d98423391f3e631511d548fff08b414feac9ff6c6dede8fb09bae870e4e32f6f462d6a75fa0a178c3bd18d0d3ade21bc7a0ea687a2eef64551751e502d97cb98dc53ea55162cdfa395431323439323830303762994901000001a000731a8003"); - paymentInformation.fluidData(paymentInformationFluidData); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("201 S. Division St."); - orderInformationBillTo.locality("Ann Arbor"); - orderInformationBillTo.administrativeArea("MI"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("999999999"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(2); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEWithVisaPlatformConnect.java deleted file mode 100644 index 9dda344..0000000 --- a/src/main/java/samples/Payments/Credit/CreditUsingBluefinPCIP2PEWithVisaPlatformConnect.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreditUsingBluefinPCIP2PEWithVisaPlatformConnect { - 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 PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("demomerchant"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2creditsProcessingInformation processingInformation = new Ptsv2creditsProcessingInformation(); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard(); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2050"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationFluidData paymentInformationFluidData = new Ptsv2paymentsPaymentInformationFluidData(); - paymentInformationFluidData.descriptor("Ymx1ZWZpbg=="); - paymentInformationFluidData.value("02d700801f3c20008383252a363031312a2a2a2a2a2a2a2a303030395e46444d53202020202020202020202020202020202020202020205e323231322a2a2a2a2a2a2a2a3f2a3b363031312a2a2a2a2a2a2a2a303030393d323231322a2a2a2a2a2a2a2a3f2a7a75ad15d25217290c54b3d9d1c3868602136c68d339d52d98423391f3e631511d548fff08b414feac9ff6c6dede8fb09bae870e4e32f6f462d6a75fa0a178c3bd18d0d3ade21bc7a0ea687a2eef64551751e502d97cb98dc53ea55162cdfa395431323439323830303762994901000001a000731a8003"); - paymentInformation.fluidData(paymentInformationFluidData); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("201 S. Division St."); - orderInformationBillTo.locality("Ann Arbor"); - orderInformationBillTo.administrativeArea("MI"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("999999999"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(2); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId.java b/src/main/java/samples/Payments/Credit/CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId.java deleted file mode 100644 index 1226dbb..0000000 --- a/src/main/java/samples/Payments/Credit/CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId.java +++ /dev/null @@ -1,90 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreditWithCustomerPaymentInstrumentAndShippingAddressTokenId { - 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 PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("12345678"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsPaymentInformationCustomer paymentInformationCustomer = new Ptsv2paymentsPaymentInformationCustomer(); - paymentInformationCustomer.id("AB695DA801DD1BB6E05341588E0A3BDC"); - paymentInformation.customer(paymentInformationCustomer); - - Ptsv2paymentsPaymentInformationPaymentInstrument paymentInformationPaymentInstrument = new Ptsv2paymentsPaymentInformationPaymentInstrument(); - paymentInformationPaymentInstrument.id("AB6A54B982A6FCB6E05341588E0A3935"); - paymentInformation.paymentInstrument(paymentInformationPaymentInstrument); - - Ptsv2paymentsPaymentInformationShippingAddress paymentInformationShippingAddress = new Ptsv2paymentsPaymentInformationShippingAddress(); - paymentInformationShippingAddress.id("AB6A54B97C00FCB6E05341588E0A3935"); - paymentInformation.shippingAddress(paymentInformationShippingAddress); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("200"); - orderInformationAmountDetails.currency("usd"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/CreditWithCustomerTokenId.java b/src/main/java/samples/Payments/Credit/CreditWithCustomerTokenId.java deleted file mode 100644 index 4b42ab8..0000000 --- a/src/main/java/samples/Payments/Credit/CreditWithCustomerTokenId.java +++ /dev/null @@ -1,82 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreditWithCustomerTokenId { - 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 PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("12345678"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsPaymentInformationCustomer paymentInformationCustomer = new Ptsv2paymentsPaymentInformationCustomer(); - paymentInformationCustomer.id("AB695DA801DD1BB6E05341588E0A3BDC"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("200"); - orderInformationAmountDetails.currency("usd"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/CreditWithInstrumentIdentifierTokenId.java b/src/main/java/samples/Payments/Credit/CreditWithInstrumentIdentifierTokenId.java deleted file mode 100644 index 1eafb32..0000000 --- a/src/main/java/samples/Payments/Credit/CreditWithInstrumentIdentifierTokenId.java +++ /dev/null @@ -1,100 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreditWithInstrumentIdentifierTokenId { - 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 PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("12345678"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard(); - paymentInformationCard.expirationMonth("03"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationInstrumentIdentifier paymentInformationInstrumentIdentifier = new Ptsv2paymentsPaymentInformationInstrumentIdentifier(); - paymentInformationInstrumentIdentifier.id("7010000000016241111"); - paymentInformation.instrumentIdentifier(paymentInformationInstrumentIdentifier); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("200"); - orderInformationAmountDetails.currency("usd"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("900 Metro Center Blvd"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("9321499232"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/EBTMerchandiseReturnCreditVoucherFromSNAP.java b/src/main/java/samples/Payments/Credit/EBTMerchandiseReturnCreditVoucherFromSNAP.java deleted file mode 100644 index 1bd94c8..0000000 --- a/src/main/java/samples/Payments/Credit/EBTMerchandiseReturnCreditVoucherFromSNAP.java +++ /dev/null @@ -1,113 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class EBTMerchandiseReturnCreditVoucherFromSNAP { - 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 { - run(); - } - - public static PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("Merchandise Return / Credit Voucher from SNAP"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2creditsProcessingInformation processingInformation = new Ptsv2creditsProcessingInformation(); - processingInformation.commerceIndicator("retail"); - Ptsv2creditsProcessingInformationPurchaseOptions processingInformationPurchaseOptions = new Ptsv2creditsProcessingInformationPurchaseOptions(); - processingInformationPurchaseOptions.isElectronicBenefitsTransfer(true); - processingInformation.purchaseOptions(processingInformationPurchaseOptions); - - Ptsv2creditsProcessingInformationElectronicBenefitsTransfer processingInformationElectronicBenefitsTransfer = new Ptsv2creditsProcessingInformationElectronicBenefitsTransfer(); - processingInformationElectronicBenefitsTransfer.category("FOOD"); - processingInformation.electronicBenefitsTransfer(processingInformationElectronicBenefitsTransfer); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsidrefundsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsidrefundsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("204.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsidrefundsMerchantInformation merchantInformation = new Ptsv2paymentsidrefundsMerchantInformation(); - merchantInformation.categoryCode(5411); - requestObj.merchantInformation(merchantInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(4); - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - pointOfSaleInformation.pinBlockEncodingFormat(1); - pointOfSaleInformation.encryptedPin("52F20658C04DB351"); - pointOfSaleInformation.encryptedKeySerialNumber("FFFF1B1D140000000005"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Credit/ElectronicCheckStandAloneCredits.java b/src/main/java/samples/Payments/Credit/ElectronicCheckStandAloneCredits.java deleted file mode 100644 index a53772c..0000000 --- a/src/main/java/samples/Payments/Credit/ElectronicCheckStandAloneCredits.java +++ /dev/null @@ -1,104 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ElectronicCheckStandAloneCredits { - 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 { - run(); - } - - public static PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC46125-1"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationBank paymentInformationBank = new Ptsv2paymentsidrefundsPaymentInformationBank(); - Ptsv2paymentsidrefundsPaymentInformationBankAccount paymentInformationBankAccount = new Ptsv2paymentsidrefundsPaymentInformationBankAccount(); - paymentInformationBankAccount.type("C"); - paymentInformationBankAccount.number("4100"); - paymentInformationBankAccount.checkNumber("123456"); - paymentInformationBank.account(paymentInformationBankAccount); - - paymentInformationBank.routingNumber("071923284"); - paymentInformation.bank(paymentInformationBank); - - Ptsv2paymentsidrefundsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsidrefundsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CHECK"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/PinDebitCreditUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Credit/PinDebitCreditUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java deleted file mode 100644 index 9ad7d1e..0000000 --- a/src/main/java/samples/Payments/Credit/PinDebitCreditUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java +++ /dev/null @@ -1,100 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PinDebitCreditUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect { - 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 PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("2.2 Credit"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2creditsProcessingInformation processingInformation = new Ptsv2creditsProcessingInformation(); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsidrefundsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("202.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsidrefundsMerchantInformation merchantInformation = new Ptsv2paymentsidrefundsMerchantInformation(); - requestObj.merchantInformation(merchantInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("contactless"); - pointOfSaleInformation.terminalCapability(4); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.tags("9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000"); - pointOfSaleInformationEmv.cardSequenceNumber("1"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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 (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/PinDebitCreditUsingSwipedTrackDataWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Credit/PinDebitCreditUsingSwipedTrackDataWithVisaPlatformConnect.java deleted file mode 100644 index 22ce202..0000000 --- a/src/main/java/samples/Payments/Credit/PinDebitCreditUsingSwipedTrackDataWithVisaPlatformConnect.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PinDebitCreditUsingSwipedTrackDataWithVisaPlatformConnect { - 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 PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("2.2 Credit"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2creditsProcessingInformation processingInformation = new Ptsv2creditsProcessingInformation(); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsidrefundsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("202.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsidrefundsMerchantInformation merchantInformation = new Ptsv2paymentsidrefundsMerchantInformation(); - requestObj.merchantInformation(merchantInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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 (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Credit/ServiceFeesCredit.java b/src/main/java/samples/Payments/Credit/ServiceFeesCredit.java deleted file mode 100644 index 000527d..0000000 --- a/src/main/java/samples/Payments/Credit/ServiceFeesCredit.java +++ /dev/null @@ -1,97 +0,0 @@ -package samples.Payments.Credit; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ServiceFeesCredit { - 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 { - run(); - } - - public static PtsV2CreditsPost201Response run() { - - CreateCreditRequest requestObj = new CreateCreditRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("12345678"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsidrefundsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("03"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2325.00"); - orderInformationAmountDetails.currency("usd"); - orderInformationAmountDetails.serviceFeeAmount("30.0"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsidcapturesOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsidcapturesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2CreditsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreditApi apiInstance = new CreditApi(apiClient); - result = apiInstance.createCredit(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AmericanExpressDirectEMVWithContactRead.java b/src/main/java/samples/Payments/Payments/AmericanExpressDirectEMVWithContactRead.java deleted file mode 100644 index a30a29f..0000000 --- a/src/main/java/samples/Payments/Payments/AmericanExpressDirectEMVWithContactRead.java +++ /dev/null @@ -1,115 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AmericanExpressDirectEMVWithContactRead { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.originalTransactionId("510be4aef90711e6acbc7d88388d803d"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("contact"); - pointOfSaleInformation.terminalCapability(4); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.tags("9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000"); - pointOfSaleInformationEmv.cardholderVerificationMethodUsed(2); - pointOfSaleInformationEmv.cardSequenceNumber("1"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B4111111111111111^TEST/CYBS ^2012121019761100 00868000000?;"); - - List cardholderVerificationMethod = new ArrayList (); - cardholderVerificationMethod.add("pin"); - cardholderVerificationMethod.add("signature"); - pointOfSaleInformation.cardholderVerificationMethod(cardholderVerificationMethod); - - - List terminalInputCapability = new ArrayList (); - terminalInputCapability.add("contact"); - terminalInputCapability.add("contactless"); - terminalInputCapability.add("keyed"); - terminalInputCapability.add("swiped"); - pointOfSaleInformation.terminalInputCapability(terminalInputCapability); - - pointOfSaleInformation.terminalCardCaptureCapability("1"); - pointOfSaleInformation.deviceId("123lkjdIOBK34981slviLI39bj"); - pointOfSaleInformation.encryptedKeySerialNumber("01043191"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationCaptureForTimeoutVoidFlow.java b/src/main/java/samples/Payments/Payments/AuthorizationCaptureForTimeoutVoidFlow.java deleted file mode 100644 index 7d7a5e7..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationCaptureForTimeoutVoidFlow.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Payments.Payments; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; -import java.util.concurrent.ThreadLocalRandom; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.PaymentsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.CreatePaymentRequest; -import Model.PtsV2PaymentsPost201Response; -import Model.Ptsv2paymentsClientReferenceInformation; -import Model.Ptsv2paymentsOrderInformation; -import Model.Ptsv2paymentsOrderInformationAmountDetails; -import Model.Ptsv2paymentsOrderInformationBillTo; -import Model.Ptsv2paymentsPaymentInformation; -import Model.Ptsv2paymentsPaymentInformationCard; -import Model.Ptsv2paymentsProcessingInformation; -import samples.core.SampleCodeRunner; - -public class AuthorizationCaptureForTimeoutVoidFlow { - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - SampleCodeRunner.timeoutVoidTransactionId = String.valueOf(ThreadLocalRandom.current().nextLong(1000, 1000000000 + 1)); - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - clientReferenceInformation.transactionId(SampleCodeRunner.timeoutVoidTransactionId); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - - processingInformation.commerceIndicator("internet"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationForIncrementalAuthorizationFlow.java b/src/main/java/samples/Payments/Payments/AuthorizationForIncrementalAuthorizationFlow.java deleted file mode 100644 index 367a8e0..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationForIncrementalAuthorizationFlow.java +++ /dev/null @@ -1,200 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationForIncrementalAuthorizationFlow { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.industryDataType("lodging"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationTokenizedCard paymentInformationTokenizedCard = new Ptsv2paymentsPaymentInformationTokenizedCard(); - paymentInformationTokenizedCard.securityCode("123"); - paymentInformation.tokenizedCard(paymentInformationTokenizedCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("20"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("201 S. Division St."); - orderInformationBillTo.address2("Suite 500"); - orderInformationBillTo.locality("Ann Arbor"); - orderInformationBillTo.administrativeArea("MI"); - orderInformationBillTo.postalCode("12345"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("null@cybersource.com"); - orderInformationBillTo.phoneNumber("514-670-8700"); - orderInformation.billTo(orderInformationBillTo); - - Ptsv2paymentsOrderInformationShipTo orderInformationShipTo = new Ptsv2paymentsOrderInformationShipTo(); - orderInformationShipTo.firstName("Olivia"); - orderInformationShipTo.lastName("White"); - orderInformationShipTo.address1("1295 Charleston Rd"); - orderInformationShipTo.address2("Cube 2386"); - orderInformationShipTo.locality("Mountain View"); - orderInformationShipTo.administrativeArea("CA"); - orderInformationShipTo.postalCode("94041"); - orderInformationShipTo.country("AE"); - orderInformationShipTo.phoneNumber("650-965-6000"); - orderInformation.shipTo(orderInformationShipTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsMerchantInformation merchantInformation = new Ptsv2paymentsMerchantInformation(); - Ptsv2paymentsMerchantInformationMerchantDescriptor merchantInformationMerchantDescriptor = new Ptsv2paymentsMerchantInformationMerchantDescriptor(); - merchantInformationMerchantDescriptor.contact("965-6000"); - merchantInformation.merchantDescriptor(merchantInformationMerchantDescriptor); - - requestObj.merchantInformation(merchantInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.cavv("ABCDEabcde12345678900987654321abcdeABCDE"); - consumerAuthenticationInformation.xid("12345678909876543210ABCDEabcdeABCDEF1234"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - Ptsv2paymentsInstallmentInformation installmentInformation = new Ptsv2paymentsInstallmentInformation(); - installmentInformation.amount("1200"); - installmentInformation.frequency("W"); - installmentInformation.sequence(34); - installmentInformation.totalAmount("2000"); - installmentInformation.totalCount(12); - requestObj.installmentInformation(installmentInformation); - - Ptsv2paymentsTravelInformation travelInformation = new Ptsv2paymentsTravelInformation(); - travelInformation.duration("3"); - Ptsv2paymentsTravelInformationLodging travelInformationLodging = new Ptsv2paymentsTravelInformationLodging(); - travelInformationLodging.checkInDate("11062019"); - travelInformationLodging.checkOutDate("11092019"); - - List room = new ArrayList (); - Ptsv2paymentsTravelInformationLodgingRoom room1 = new Ptsv2paymentsTravelInformationLodgingRoom(); - room1.dailyRate("1.50"); - room1.numberOfNights(5); - room.add(room1); - - Ptsv2paymentsTravelInformationLodgingRoom room2 = new Ptsv2paymentsTravelInformationLodgingRoom(); - room2.dailyRate("11.50"); - room2.numberOfNights(5); - room.add(room2); - - travelInformationLodging.room(room); - - travelInformationLodging.smokingPreference("yes"); - travelInformationLodging.numberOfRooms(1); - travelInformationLodging.numberOfGuests(3); - travelInformationLodging.roomBedType("king"); - travelInformationLodging.roomTaxType("tourist"); - travelInformationLodging.roomRateType("sr citizen"); - travelInformationLodging.guestName("Tulasi"); - travelInformationLodging.customerServicePhoneNumber("+13304026334"); - travelInformationLodging.corporateClientCode("HDGGASJDGSUY"); - travelInformationLodging.additionalDiscountAmount("99.123456781"); - travelInformationLodging.roomLocation("seaview"); - travelInformationLodging.specialProgramCode("2"); - travelInformationLodging.totalTaxAmount("99.1234567891"); - travelInformationLodging.prepaidCost("9999999999.99"); - travelInformationLodging.foodAndBeverageCost("9999999999.99"); - travelInformationLodging.roomTaxAmount("9999999999.99"); - travelInformationLodging.adjustmentAmount("9999999999.99"); - travelInformationLodging.phoneCost("9999999999.99"); - travelInformationLodging.restaurantCost("9999999999.99"); - travelInformationLodging.roomServiceCost("9999999999.99"); - travelInformationLodging.miniBarCost("9999999999.99"); - travelInformationLodging.laundryCost("9999999999.99"); - travelInformationLodging.miscellaneousCost("9999999999.99"); - travelInformationLodging.giftShopCost("9999999999.99"); - travelInformationLodging.movieCost("9999999999.99"); - travelInformationLodging.healthClubCost("9999999999.99"); - travelInformationLodging.valetParkingCost("9999999999.99"); - travelInformationLodging.cashDisbursementCost("9999999999.99"); - travelInformationLodging.nonRoomCost("9999999999.99"); - travelInformationLodging.businessCenterCost("9999999999.99"); - travelInformationLodging.loungeBarCost("9999999999.99"); - travelInformationLodging.transportationCost("9999999999.99"); - travelInformationLodging.gratuityAmount("9999999999.99"); - travelInformationLodging.conferenceRoomCost("9999999999.99"); - travelInformationLodging.audioVisualCost("9999999999.99"); - travelInformationLodging.nonRoomTaxAmount("9999999999.99"); - travelInformationLodging.earlyCheckOutCost("9999999999.99"); - travelInformationLodging.internetAccessCost("9999999999.99"); - travelInformation.lodging(travelInformationLodging); - - requestObj.travelInformation(travelInformation); - - Ptsv2paymentsPromotionInformation promotionInformation = new Ptsv2paymentsPromotionInformation(); - promotionInformation.additionalCode("999999.99"); - requestObj.promotionInformation(promotionInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationForTimeoutReversalFlow.java b/src/main/java/samples/Payments/Payments/AuthorizationForTimeoutReversalFlow.java deleted file mode 100644 index 448111f..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationForTimeoutReversalFlow.java +++ /dev/null @@ -1,114 +0,0 @@ -package samples.Payments.Payments; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; -import java.util.concurrent.ThreadLocalRandom; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.PaymentsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.CreatePaymentRequest; -import Model.PtsV2PaymentsPost201Response; -import Model.Ptsv2paymentsClientReferenceInformation; -import Model.Ptsv2paymentsOrderInformation; -import Model.Ptsv2paymentsOrderInformationAmountDetails; -import Model.Ptsv2paymentsOrderInformationBillTo; -import Model.Ptsv2paymentsPaymentInformation; -import Model.Ptsv2paymentsPaymentInformationCard; -import Model.Ptsv2paymentsProcessingInformation; -import samples.core.SampleCodeRunner; - -public class AuthorizationForTimeoutReversalFlow { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - SampleCodeRunner.timeoutReversalTransactionId = String.valueOf(ThreadLocalRandom.current().nextLong(1000, 1000000000 + 1)); - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - clientReferenceInformation.transactionId(SampleCodeRunner.timeoutReversalTransactionId); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - processingInformation.commerceIndicator("internet"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.address2("Address 2"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationSkipDecisionManagerForSingleTransaction.java b/src/main/java/samples/Payments/Payments/AuthorizationSkipDecisionManagerForSingleTransaction.java deleted file mode 100644 index aa57c30..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationSkipDecisionManagerForSingleTransaction.java +++ /dev/null @@ -1,105 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationSkipDecisionManagerForSingleTransaction { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_16"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("DECISION_SKIP"); - processingInformation.actionList(actionList); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("11"); - paymentInformationCard.expirationYear("2025"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("10"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java b/src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java deleted file mode 100644 index 0e41ef0..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer.java +++ /dev/null @@ -1,112 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationUsingBluefinPCIP2PEForCardPresentEnabledAcquirer { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("demomerchant"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2050"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationFluidData paymentInformationFluidData = new Ptsv2paymentsPaymentInformationFluidData(); - paymentInformationFluidData.descriptor("Ymx1ZWZpbg=="); - paymentInformationFluidData.value("02d700801f3c20008383252a363031312a2a2a2a2a2a2a2a303030395e46444d53202020202020202020202020202020202020202020205e323231322a2a2a2a2a2a2a2a3f2a3b363031312a2a2a2a2a2a2a2a303030393d323231322a2a2a2a2a2a2a2a3f2a7a75ad15d25217290c54b3d9d1c3868602136c68d339d52d98423391f3e631511d548fff08b414feac9ff6c6dede8fb09bae870e4e32f6f462d6a75fa0a178c3bd18d0d3ade21bc7a0ea687a2eef64551751e502d97cb98dc53ea55162cdfa395431323439323830303762994901000001a000731a8003"); - paymentInformation.fluidData(paymentInformationFluidData); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("201 S. Division St."); - orderInformationBillTo.locality("Ann Arbor"); - orderInformationBillTo.administrativeArea("MI"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.district("MI"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("999999999"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(2); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect.java deleted file mode 100644 index f416957..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect.java +++ /dev/null @@ -1,118 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationUsingBluefinPCIP2PEWithVisaPlatformConnect { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("demomerchant"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(true); - processingInformationAuthorizationOptions.ignoreCvResult(true); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2050"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationFluidData paymentInformationFluidData = new Ptsv2paymentsPaymentInformationFluidData(); - paymentInformationFluidData.descriptor("Ymx1ZWZpbg=="); - paymentInformationFluidData.value("02d700801f3c20008383252a363031312a2a2a2a2a2a2a2a303030395e46444d53202020202020202020202020202020202020202020205e323231322a2a2a2a2a2a2a2a3f2a3b363031312a2a2a2a2a2a2a2a303030393d323231322a2a2a2a2a2a2a2a3f2a7a75ad15d25217290c54b3d9d1c3868602136c68d339d52d98423391f3e631511d548fff08b414feac9ff6c6dede8fb09bae870e4e32f6f462d6a75fa0a178c3bd18d0d3ade21bc7a0ea687a2eef64551751e502d97cb98dc53ea55162cdfa395431323439323830303762994901000001a000731a8003"); - paymentInformation.fluidData(paymentInformationFluidData); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("201 S. Division St."); - orderInformationBillTo.locality("Ann Arbor"); - orderInformationBillTo.administrativeArea("MI"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.district("MI"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("999999999"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(2); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationUsingSwipedTrackData.java b/src/main/java/samples/Payments/Payments/AuthorizationUsingSwipedTrackData.java deleted file mode 100644 index 349c6c3..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationUsingSwipedTrackData.java +++ /dev/null @@ -1,96 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationUsingSwipedTrackData { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("ABC123"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.thirdPartyCertificationNumber("123456789012"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(2); - pointOfSaleInformation.trackData("%B38000000000006^TEST/CYBS ^2012121019761100 00868000000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithCaptureSale.java b/src/main/java/samples/Payments/Payments/AuthorizationWithCaptureSale.java deleted file mode 100644 index 62325b5..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithCaptureSale.java +++ /dev/null @@ -1,100 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithCaptureSale { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId.java b/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId.java deleted file mode 100644 index 92c0d18..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId.java +++ /dev/null @@ -1,90 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithCustomerPaymentInstrumentAndShippingAddressTokenId { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCustomer paymentInformationCustomer = new Ptsv2paymentsPaymentInformationCustomer(); - paymentInformationCustomer.id("AB695DA801DD1BB6E05341588E0A3BDC"); - paymentInformation.customer(paymentInformationCustomer); - - Ptsv2paymentsPaymentInformationPaymentInstrument paymentInformationPaymentInstrument = new Ptsv2paymentsPaymentInformationPaymentInstrument(); - paymentInformationPaymentInstrument.id("AB6A54B982A6FCB6E05341588E0A3935"); - paymentInformation.paymentInstrument(paymentInformationPaymentInstrument); - - Ptsv2paymentsPaymentInformationShippingAddress paymentInformationShippingAddress = new Ptsv2paymentsPaymentInformationShippingAddress(); - paymentInformationShippingAddress.id("AB6A54B97C00FCB6E05341588E0A3935"); - paymentInformation.shippingAddress(paymentInformationShippingAddress); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenCreation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenCreation.java deleted file mode 100644 index 490bf13..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenCreation.java +++ /dev/null @@ -1,123 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithCustomerTokenCreation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("TOKEN_CREATE"); - processingInformation.actionList(actionList); - - - List actionTokenTypes = new ArrayList (); - actionTokenTypes.add("customer"); - actionTokenTypes.add("paymentInstrument"); - actionTokenTypes.add("shippingAddress"); - processingInformation.actionTokenTypes(actionTokenTypes); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - Ptsv2paymentsOrderInformationShipTo orderInformationShipTo = new Ptsv2paymentsOrderInformationShipTo(); - orderInformationShipTo.firstName("John"); - orderInformationShipTo.lastName("Doe"); - orderInformationShipTo.address1("1 Market St"); - orderInformationShipTo.locality("san francisco"); - orderInformationShipTo.administrativeArea("CA"); - orderInformationShipTo.postalCode("94105"); - orderInformationShipTo.country("US"); - orderInformation.shipTo(orderInformationShipTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation.java deleted file mode 100644 index b328682..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation.java +++ /dev/null @@ -1,137 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithCustomerTokenDefaultPaymentInstrumentAndShippingAddressCreation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("TOKEN_CREATE"); - processingInformation.actionList(actionList); - - - List actionTokenTypes = new ArrayList (); - actionTokenTypes.add("paymentInstrument"); - actionTokenTypes.add("shippingAddress"); - processingInformation.actionTokenTypes(actionTokenTypes); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationCustomer paymentInformationCustomer = new Ptsv2paymentsPaymentInformationCustomer(); - paymentInformationCustomer.id("AB695DA801DD1BB6E05341588E0A3BDC"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - Ptsv2paymentsOrderInformationShipTo orderInformationShipTo = new Ptsv2paymentsOrderInformationShipTo(); - orderInformationShipTo.firstName("John"); - orderInformationShipTo.lastName("Doe"); - orderInformationShipTo.address1("1 Market St"); - orderInformationShipTo.locality("san francisco"); - orderInformationShipTo.administrativeArea("CA"); - orderInformationShipTo.postalCode("94105"); - orderInformationShipTo.country("US"); - orderInformation.shipTo(orderInformationShipTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsTokenInformation tokenInformation = new Ptsv2paymentsTokenInformation(); - Ptsv2paymentsTokenInformationPaymentInstrument tokenInformationPaymentInstrument = new Ptsv2paymentsTokenInformationPaymentInstrument(); - tokenInformationPaymentInstrument._default(true); - tokenInformation.paymentInstrument(tokenInformationPaymentInstrument); - - Ptsv2paymentsTokenInformationShippingAddress tokenInformationShippingAddress = new Ptsv2paymentsTokenInformationShippingAddress(); - tokenInformationShippingAddress._default(true); - tokenInformation.shippingAddress(tokenInformationShippingAddress); - - requestObj.tokenInformation(tokenInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenId.java b/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenId.java deleted file mode 100644 index e531348..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithCustomerTokenId.java +++ /dev/null @@ -1,82 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithCustomerTokenId { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCustomer paymentInformationCustomer = new Ptsv2paymentsPaymentInformationCustomer(); - paymentInformationCustomer.id("AB695DA801DD1BB6E05341588E0A3BDC"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDMAcceptPAEnroll.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDMAcceptPAEnroll.java deleted file mode 100644 index e811894..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDMAcceptPAEnroll.java +++ /dev/null @@ -1,106 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDMAcceptPAEnroll { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("cbys_test"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("CONSUMER_AUTHENTICATION"); - processingInformation.actionList(actionList); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("340000000001007"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("1234"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("1.00"); - orderInformationAmountDetails.currency("usd"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("accept@cybersource.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDMRejectPAEnroll.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDMRejectPAEnroll.java deleted file mode 100644 index 724d03a..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDMRejectPAEnroll.java +++ /dev/null @@ -1,106 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDMRejectPAEnroll { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("CONSUMER_AUTHENTICATION"); - processingInformation.actionList(actionList); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("372425119311008"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("1234"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("reject@domain.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDMReviewPAEnroll.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDMReviewPAEnroll.java deleted file mode 100644 index e22a760..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDMReviewPAEnroll.java +++ /dev/null @@ -1,106 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDMReviewPAEnroll { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("CONSUMER_AUTHENTICATION"); - processingInformation.actionList(actionList); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("372425119311008"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("1234"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("review@domain.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManager.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManager.java deleted file mode 100644 index 1a79cd7..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManager.java +++ /dev/null @@ -1,96 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDecisionManager { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TSYS_Eh_FE_01"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("11"); - paymentInformationCard.expirationYear("2025"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("10"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("JSON"); - orderInformationBillTo.lastName("RTS"); - orderInformationBillTo.address1("201 S. Division St._1"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94404"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("beforeauth@cybersource.com"); - orderInformationBillTo.phoneNumber("6504327113"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerBuyerInformation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerBuyerInformation.java deleted file mode 100644 index 6274d1d..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerBuyerInformation.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDecisionManagerBuyerInformation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.postalCode("03055"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsBuyerInformation buyerInformation = new Ptsv2paymentsBuyerInformation(); - buyerInformation.dateOfBirth("19980505"); - - List personalIdentification = new ArrayList (); - Ptsv2paymentsBuyerInformationPersonalIdentification personalIdentification1 = new Ptsv2paymentsBuyerInformationPersonalIdentification(); - personalIdentification1.type("CPF"); - personalIdentification1.id("1a23apwe98"); - personalIdentification.add(personalIdentification1); - - buyerInformation.personalIdentification(personalIdentification); - - buyerInformation.hashedPassword(""); - requestObj.buyerInformation(buyerInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerCustomSetup.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerCustomSetup.java deleted file mode 100644 index fd9ebe6..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerCustomSetup.java +++ /dev/null @@ -1,105 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDecisionManagerCustomSetup { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_16"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("DECISION"); - processingInformation.actionList(actionList); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("11"); - paymentInformationCard.expirationYear("2025"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("10"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerDeviceInformation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerDeviceInformation.java deleted file mode 100644 index 6d59da8..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerDeviceInformation.java +++ /dev/null @@ -1,103 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDecisionManagerDeviceInformation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.postalCode("03055"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsDeviceInformation deviceInformation = new Ptsv2paymentsDeviceInformation(); - deviceInformation.hostName("host.com"); - deviceInformation.ipAddress("64.124.61.215"); - deviceInformation.userAgent("Chrome"); - deviceInformation.httpBrowserEmail("xyz@gmail.com"); - requestObj.deviceInformation(deviceInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerMerchantDefinedInformation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerMerchantDefinedInformation.java deleted file mode 100644 index 64a762e..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerMerchantDefinedInformation.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDecisionManagerMerchantDefinedInformation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.postalCode("03055"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - - List merchantDefinedInformation = new ArrayList (); - Ptsv2paymentsMerchantDefinedInformation merchantDefinedInformation1 = new Ptsv2paymentsMerchantDefinedInformation(); - merchantDefinedInformation1.key("1"); - merchantDefinedInformation1.value("Test"); - merchantDefinedInformation.add(merchantDefinedInformation1); - - Ptsv2paymentsMerchantDefinedInformation merchantDefinedInformation2 = new Ptsv2paymentsMerchantDefinedInformation(); - merchantDefinedInformation2.key("2"); - merchantDefinedInformation2.value("Test2"); - merchantDefinedInformation.add(merchantDefinedInformation2); - - requestObj.merchantDefinedInformation(merchantDefinedInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerShippingInformation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerShippingInformation.java deleted file mode 100644 index 6a30eea..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerShippingInformation.java +++ /dev/null @@ -1,107 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDecisionManagerShippingInformation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.postalCode("03055"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformation.billTo(orderInformationBillTo); - - Ptsv2paymentsOrderInformationShipTo orderInformationShipTo = new Ptsv2paymentsOrderInformationShipTo(); - orderInformationShipTo.firstName("James"); - orderInformationShipTo.lastName("Smith"); - orderInformationShipTo.address1("96, powers street"); - orderInformationShipTo.locality("Clearwater milford"); - orderInformationShipTo.administrativeArea("KA"); - orderInformationShipTo.postalCode("560056"); - orderInformationShipTo.country("IN"); - orderInformationShipTo.phoneNumber("7606160717"); - orderInformation.shipTo(orderInformationShipTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerTravelInformation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerTravelInformation.java deleted file mode 100644 index 35c2318..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithDecisionManagerTravelInformation.java +++ /dev/null @@ -1,99 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithDecisionManagerTravelInformation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.postalCode("03055"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsTravelInformation travelInformation = new Ptsv2paymentsTravelInformation(); - requestObj.travelInformation(travelInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenCreation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenCreation.java deleted file mode 100644 index 9d04a50..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenCreation.java +++ /dev/null @@ -1,122 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithInstrumentIdentifierTokenCreation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("TOKEN_CREATE"); - processingInformation.actionList(actionList); - - - List actionTokenTypes = new ArrayList (); - actionTokenTypes.add("instrumentIdentifier"); - processingInformation.actionTokenTypes(actionTokenTypes); - - processingInformation.capture(false); - processingInformation.commerceIndicator("internet"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - Ptsv2paymentsOrderInformationShipTo orderInformationShipTo = new Ptsv2paymentsOrderInformationShipTo(); - orderInformationShipTo.firstName("John"); - orderInformationShipTo.lastName("Doe"); - orderInformationShipTo.address1("1 Market St"); - orderInformationShipTo.locality("san francisco"); - orderInformationShipTo.administrativeArea("CA"); - orderInformationShipTo.postalCode("94105"); - orderInformationShipTo.country("US"); - orderInformation.shipTo(orderInformationShipTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenId.java b/src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenId.java deleted file mode 100644 index 9dad71f..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithInstrumentIdentifierTokenId.java +++ /dev/null @@ -1,105 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithInstrumentIdentifierTokenId { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("internet"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.expirationMonth("03"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationInstrumentIdentifier paymentInformationInstrumentIdentifier = new Ptsv2paymentsPaymentInformationInstrumentIdentifier(); - paymentInformationInstrumentIdentifier.id("7010000000016241111"); - paymentInformation.instrumentIdentifier(paymentInformationInstrumentIdentifier); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("200"); - orderInformationAmountDetails.currency("usd"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("900 Metro Center Blvd"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("9321499232"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithLegacyToken.java b/src/main/java/samples/Payments/Payments/AuthorizationWithLegacyToken.java deleted file mode 100644 index 5b71d26..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithLegacyToken.java +++ /dev/null @@ -1,94 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithLegacyToken { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationLegacyToken paymentInformationLegacyToken = new Ptsv2paymentsPaymentInformationLegacyToken(); - paymentInformationLegacyToken.id("7010000000016241111"); - paymentInformation.legacyToken(paymentInformationLegacyToken); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("22"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithPAEnrollAuthenticationNeeded.java b/src/main/java/samples/Payments/Payments/AuthorizationWithPAEnrollAuthenticationNeeded.java deleted file mode 100644 index 05621fc..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithPAEnrollAuthenticationNeeded.java +++ /dev/null @@ -1,111 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithPAEnrollAuthenticationNeeded { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("CONSUMER_AUTHENTICATION"); - processingInformation.actionList(actionList); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4000000000001091"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2023"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("usd"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("201 S. Division St._1"); - orderInformationBillTo.address2("Suite 500"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94404"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("accept@cybersource.com"); - orderInformationBillTo.phoneNumber("6504327113"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.requestorId("123123197675"); - consumerAuthenticationInformation.referenceId("CybsCruiseTester-8ac0b02f"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithPayerAuthValidation.java b/src/main/java/samples/Payments/Payments/AuthorizationWithPayerAuthValidation.java deleted file mode 100644 index 242cb5c..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithPayerAuthValidation.java +++ /dev/null @@ -1,105 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithPayerAuthValidation { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("VALIDATE_CONSUMER_AUTHENTICATION"); - processingInformation.actionList(actionList); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4000000000001091"); - paymentInformationCard.expirationMonth("01"); - paymentInformationCard.expirationYear("2023"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.address1("201 S. Division St._1"); - orderInformationBillTo.address2("Suite 500"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94404"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("accept@cybs.com"); - orderInformationBillTo.phoneNumber("6504327113"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.authenticationTransactionId("OiCtXA1j1AxtSNDh5lt1"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/AuthorizationWithTMSTokenBypassingNetworkToken.java b/src/main/java/samples/Payments/Payments/AuthorizationWithTMSTokenBypassingNetworkToken.java deleted file mode 100644 index 7984d7c..0000000 --- a/src/main/java/samples/Payments/Payments/AuthorizationWithTMSTokenBypassingNetworkToken.java +++ /dev/null @@ -1,86 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AuthorizationWithTMSTokenBypassingNetworkToken { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationInstrumentIdentifier paymentInformationInstrumentIdentifier = new Ptsv2paymentsPaymentInformationInstrumentIdentifier(); - paymentInformationInstrumentIdentifier.id("7010000000016241111"); - paymentInformation.instrumentIdentifier(paymentInformationInstrumentIdentifier); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsTokenInformation tokenInformation = new Ptsv2paymentsTokenInformation(); - tokenInformation.networkTokenOption("ignore"); - requestObj.tokenInformation(tokenInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/CITInitiatingInstalmentSubscriptionUK.java b/src/main/java/samples/Payments/Payments/CITInitiatingInstalmentSubscriptionUK.java deleted file mode 100644 index 84be2ac..0000000 --- a/src/main/java/samples/Payments/Payments/CITInitiatingInstalmentSubscriptionUK.java +++ /dev/null @@ -1,120 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CITInitiatingInstalmentSubscriptionUK { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("vbv"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.credentialStoredOnFile(true); - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - Ptsv2paymentsProcessingInformationRecurringOptions processingInformationRecurringOptions = new Ptsv2paymentsProcessingInformationRecurringOptions(); - processingInformationRecurringOptions.loanPayment(false); - processingInformationRecurringOptions.firstRecurringPayment(true); - processingInformation.recurringOptions(processingInformationRecurringOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.cavv("EHuWW9PiBkWvqE5juRwDzAUFBAk="); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/CITInitiatingRecurringSubscription.java b/src/main/java/samples/Payments/Payments/CITInitiatingRecurringSubscription.java deleted file mode 100644 index b7446e4..0000000 --- a/src/main/java/samples/Payments/Payments/CITInitiatingRecurringSubscription.java +++ /dev/null @@ -1,120 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CITInitiatingRecurringSubscription { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("vbv"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.credentialStoredOnFile(true); - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - Ptsv2paymentsProcessingInformationRecurringOptions processingInformationRecurringOptions = new Ptsv2paymentsProcessingInformationRecurringOptions(); - processingInformationRecurringOptions.loanPayment(false); - processingInformationRecurringOptions.firstRecurringPayment(true); - processingInformation.recurringOptions(processingInformationRecurringOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.cavv("EHuWW9PiBkWvqE5juRwDzAUFBAk="); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/CITPlacingCredentialOnFile.java b/src/main/java/samples/Payments/Payments/CITPlacingCredentialOnFile.java deleted file mode 100644 index 8f65fc8..0000000 --- a/src/main/java/samples/Payments/Payments/CITPlacingCredentialOnFile.java +++ /dev/null @@ -1,115 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CITPlacingCredentialOnFile { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("vbv"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.credentialStoredOnFile(true); - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.cavv("EHuWW9PiBkWvqE5juRwDzAUFBAk="); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/DigitalPaymentGooglePay.java b/src/main/java/samples/Payments/Payments/DigitalPaymentGooglePay.java deleted file mode 100644 index c805564..0000000 --- a/src/main/java/samples/Payments/Payments/DigitalPaymentGooglePay.java +++ /dev/null @@ -1,108 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DigitalPaymentGooglePay { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC_1231223"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - processingInformation.paymentSolution("012"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationTokenizedCard paymentInformationTokenizedCard = new Ptsv2paymentsPaymentInformationTokenizedCard(); - paymentInformationTokenizedCard.number("4111111111111111"); - paymentInformationTokenizedCard.expirationMonth("12"); - paymentInformationTokenizedCard.expirationYear("2020"); - paymentInformationTokenizedCard.cryptogram("EHuWW9PiBkWvqE5juRwDzAUFBAk="); - paymentInformationTokenizedCard.transactionType("1"); - paymentInformation.tokenizedCard(paymentInformationTokenizedCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("20"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("901 Metro Center Blvd"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94404"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("6504327113"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/DigitalPaymentsApplePay.java b/src/main/java/samples/Payments/Payments/DigitalPaymentsApplePay.java deleted file mode 100644 index 051d905..0000000 --- a/src/main/java/samples/Payments/Payments/DigitalPaymentsApplePay.java +++ /dev/null @@ -1,108 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DigitalPaymentsApplePay { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC_1231223"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - processingInformation.paymentSolution("001"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationTokenizedCard paymentInformationTokenizedCard = new Ptsv2paymentsPaymentInformationTokenizedCard(); - paymentInformationTokenizedCard.number("4111111111111111"); - paymentInformationTokenizedCard.expirationMonth("12"); - paymentInformationTokenizedCard.expirationYear("2031"); - paymentInformationTokenizedCard.cryptogram("AceY+igABPs3jdwNaDg3MAACAAA="); - paymentInformationTokenizedCard.transactionType("1"); - paymentInformation.tokenizedCard(paymentInformationTokenizedCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("10"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Deo"); - orderInformationBillTo.address1("901 Metro Center Blvd"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94404"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("6504327113"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/EBTElectronicVoucherPurchaseFromSNAPAccountWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/EBTElectronicVoucherPurchaseFromSNAPAccountWithVisaPlatformConnect.java deleted file mode 100644 index a94cebb..0000000 --- a/src/main/java/samples/Payments/Payments/EBTElectronicVoucherPurchaseFromSNAPAccountWithVisaPlatformConnect.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class EBTElectronicVoucherPurchaseFromSNAPAccountWithVisaPlatformConnect { - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("EBT - Voucher Purchase From SNAP Account"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationPurchaseOptions processingInformationPurchaseOptions = new Ptsv2paymentsProcessingInformationPurchaseOptions(); - processingInformationPurchaseOptions.isElectronicBenefitsTransfer(true); - processingInformation.purchaseOptions(processingInformationPurchaseOptions); - - Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer processingInformationElectronicBenefitsTransfer = new Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer(); - processingInformationElectronicBenefitsTransfer.category("FOOD"); - processingInformationElectronicBenefitsTransfer.voucherSerialNumber("123451234512345"); - processingInformation.electronicBenefitsTransfer(processingInformationElectronicBenefitsTransfer); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4012002000013007"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("25"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("103.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(4); - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/EBTPurchaseFromCashBenefitsAccountWithCashback.java b/src/main/java/samples/Payments/Payments/EBTPurchaseFromCashBenefitsAccountWithCashback.java deleted file mode 100644 index 787c8c8..0000000 --- a/src/main/java/samples/Payments/Payments/EBTPurchaseFromCashBenefitsAccountWithCashback.java +++ /dev/null @@ -1,111 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class EBTPurchaseFromCashBenefitsAccountWithCashback { - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("EBT - Purchase from Cash Benefits Account with CB"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationPurchaseOptions processingInformationPurchaseOptions = new Ptsv2paymentsProcessingInformationPurchaseOptions(); - processingInformationPurchaseOptions.isElectronicBenefitsTransfer(true); - processingInformation.purchaseOptions(processingInformationPurchaseOptions); - - Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer processingInformationElectronicBenefitsTransfer = new Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer(); - processingInformationElectronicBenefitsTransfer.category("CASH"); - processingInformation.electronicBenefitsTransfer(processingInformationElectronicBenefitsTransfer); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - Ptsv2paymentsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("702.00"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.cashbackAmount("45.00"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(4); - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - pointOfSaleInformation.pinBlockEncodingFormat(1); - pointOfSaleInformation.encryptedPin("52F20658C04DB351"); - pointOfSaleInformation.encryptedKeySerialNumber("FFFF1B1D140000000005"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/EBTPurchaseFromSNAPAccountWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/EBTPurchaseFromSNAPAccountWithVisaPlatformConnect.java deleted file mode 100644 index 63e56af..0000000 --- a/src/main/java/samples/Payments/Payments/EBTPurchaseFromSNAPAccountWithVisaPlatformConnect.java +++ /dev/null @@ -1,106 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class EBTPurchaseFromSNAPAccountWithVisaPlatformConnect { - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("EBT - Purchase From SNAP Account"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationPurchaseOptions processingInformationPurchaseOptions = new Ptsv2paymentsProcessingInformationPurchaseOptions(); - processingInformationPurchaseOptions.isElectronicBenefitsTransfer(true); - processingInformation.purchaseOptions(processingInformationPurchaseOptions); - - Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer processingInformationElectronicBenefitsTransfer = new Ptsv2paymentsProcessingInformationElectronicBenefitsTransfer(); - processingInformationElectronicBenefitsTransfer.category("FOOD"); - processingInformation.electronicBenefitsTransfer(processingInformationElectronicBenefitsTransfer); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("101.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(4); - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - pointOfSaleInformation.pinBlockEncodingFormat(1); - pointOfSaleInformation.encryptedPin("52F20658C04DB351"); - pointOfSaleInformation.encryptedKeySerialNumber("FFFF1B1D140000000005"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/ElectronicCheckDebits.java b/src/main/java/samples/Payments/Payments/ElectronicCheckDebits.java deleted file mode 100644 index 4e11a15..0000000 --- a/src/main/java/samples/Payments/Payments/ElectronicCheckDebits.java +++ /dev/null @@ -1,102 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ElectronicCheckDebits { - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationBank paymentInformationBank = new Ptsv2paymentsPaymentInformationBank(); - Ptsv2paymentsPaymentInformationBankAccount paymentInformationBankAccount = new Ptsv2paymentsPaymentInformationBankAccount(); - paymentInformationBankAccount.type("C"); - paymentInformationBankAccount.number("4100"); - paymentInformationBank.account(paymentInformationBankAccount); - - paymentInformationBank.routingNumber("071923284"); - paymentInformation.bank(paymentInformationBank); - - Ptsv2paymentsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CHECK"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/ElectronicCheckDebitsWithLegacyToken.java b/src/main/java/samples/Payments/Payments/ElectronicCheckDebitsWithLegacyToken.java deleted file mode 100644 index 83e0b66..0000000 --- a/src/main/java/samples/Payments/Payments/ElectronicCheckDebitsWithLegacyToken.java +++ /dev/null @@ -1,97 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ElectronicCheckDebitsWithLegacyToken { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationLegacyToken paymentInformationLegacyToken = new Ptsv2paymentsPaymentInformationLegacyToken(); - paymentInformationLegacyToken.id("AB7C01E66529EA42E05341588E0A22AD"); - paymentInformation.legacyToken(paymentInformationLegacyToken); - - Ptsv2paymentsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CHECK"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/IncrementalAuthorization.java b/src/main/java/samples/Payments/Payments/IncrementalAuthorization.java deleted file mode 100644 index ab9cd60..0000000 --- a/src/main/java/samples/Payments/Payments/IncrementalAuthorization.java +++ /dev/null @@ -1,94 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class IncrementalAuthorization { - 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 PtsV2IncrementalAuthorizationPatch201Response run() { - String id = AuthorizationForIncrementalAuthorizationFlow.run().getId(); - IncrementAuthRequest requestObj = new IncrementAuthRequest(); - - Ptsv2paymentsidClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidProcessingInformation processingInformation = new Ptsv2paymentsidProcessingInformation(); - Ptsv2paymentsidProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsidProcessingInformationAuthorizationOptions(); - Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsidProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.storedCredentialUsed(true); - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidOrderInformation orderInformation = new Ptsv2paymentsidOrderInformation(); - Ptsv2paymentsidOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidOrderInformationAmountDetails(); - orderInformationAmountDetails.additionalAmount("22.49"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsidMerchantInformation merchantInformation = new Ptsv2paymentsidMerchantInformation(); - merchantInformation.transactionLocalDateTime("20191002080000"); - requestObj.merchantInformation(merchantInformation); - - Ptsv2paymentsidTravelInformation travelInformation = new Ptsv2paymentsidTravelInformation(); - travelInformation.duration("4"); - requestObj.travelInformation(travelInformation); - - PtsV2IncrementalAuthorizationPatch201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.incrementAuth(id, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/LevelIIData.java b/src/main/java/samples/Payments/Payments/LevelIIData.java deleted file mode 100644 index 93e33ec..0000000 --- a/src/main/java/samples/Payments/Payments/LevelIIData.java +++ /dev/null @@ -1,102 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class LevelIIData { - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_12"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("112.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - Ptsv2paymentsOrderInformationInvoiceDetails orderInformationInvoiceDetails = new Ptsv2paymentsOrderInformationInvoiceDetails(); - orderInformationInvoiceDetails.purchaseOrderNumber("LevelII Auth Po"); - orderInformation.invoiceDetails(orderInformationInvoiceDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/LevelIIIData.java b/src/main/java/samples/Payments/Payments/LevelIIIData.java deleted file mode 100644 index 19f033d..0000000 --- a/src/main/java/samples/Payments/Payments/LevelIIIData.java +++ /dev/null @@ -1,125 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class LevelIIIData { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_14"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - processingInformation.purchaseLevel("3"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - - List lineItems = new ArrayList (); - Ptsv2paymentsOrderInformationLineItems lineItems1 = new Ptsv2paymentsOrderInformationLineItems(); - lineItems1.productCode("default"); - lineItems1.quantity(10); - lineItems1.unitPrice("10.00"); - lineItems1.totalAmount("100"); - lineItems1.amountIncludesTax(false); - lineItems1.discountApplied(false); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - Ptsv2paymentsOrderInformationInvoiceDetails orderInformationInvoiceDetails = new Ptsv2paymentsOrderInformationInvoiceDetails(); - orderInformationInvoiceDetails.purchaseOrderNumber("LevelIII Auth Po"); - orderInformation.invoiceDetails(orderInformationInvoiceDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/MITIndustryPracticeDelayedCharge3RIVisa.java b/src/main/java/samples/Payments/Payments/MITIndustryPracticeDelayedCharge3RIVisa.java deleted file mode 100644 index 4ba22a2..0000000 --- a/src/main/java/samples/Payments/Payments/MITIndustryPracticeDelayedCharge3RIVisa.java +++ /dev/null @@ -1,123 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class MITIndustryPracticeDelayedCharge3RIVisa { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("vbv"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.type("merchant"); - processingInformationAuthorizationOptionsInitiator.storedCredentialUsed(true); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction(); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.reason("2"); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.previousTransactionId("123456789012345"); - processingInformationAuthorizationOptionsInitiator.merchantInitiatedTransaction(processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction); - - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.cavv("EHuWW9PiBkWvqE5juRwDzAUFBAk="); - consumerAuthenticationInformation.paresStatus("Y"); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/MITIndustryPracticeResubmission.java b/src/main/java/samples/Payments/Payments/MITIndustryPracticeResubmission.java deleted file mode 100644 index 7dc43e7..0000000 --- a/src/main/java/samples/Payments/Payments/MITIndustryPracticeResubmission.java +++ /dev/null @@ -1,118 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class MITIndustryPracticeResubmission { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("moto"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.type("merchant"); - processingInformationAuthorizationOptionsInitiator.storedCredentialUsed(true); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction(); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.reason("1"); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.previousTransactionId("123456789012345"); - processingInformationAuthorizationOptionsInitiator.merchantInitiatedTransaction(processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction); - - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/MITInstalment.java b/src/main/java/samples/Payments/Payments/MITInstalment.java deleted file mode 100644 index 1b02b87..0000000 --- a/src/main/java/samples/Payments/Payments/MITInstalment.java +++ /dev/null @@ -1,117 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class MITInstalment { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("install"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.type("merchant"); - processingInformationAuthorizationOptionsInitiator.storedCredentialUsed(true); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction(); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.previousTransactionId("123456789012345"); - processingInformationAuthorizationOptionsInitiator.merchantInitiatedTransaction(processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction); - - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/MITRecurring.java b/src/main/java/samples/Payments/Payments/MITRecurring.java deleted file mode 100644 index 40f34e7..0000000 --- a/src/main/java/samples/Payments/Payments/MITRecurring.java +++ /dev/null @@ -1,117 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class MITRecurring { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("recurring"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.type("merchant"); - processingInformationAuthorizationOptionsInitiator.storedCredentialUsed(true); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction(); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.previousTransactionId("123456789012345"); - processingInformationAuthorizationOptionsInitiator.merchantInitiatedTransaction(processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction); - - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/MITUnscheduledCredentialOnFile.java b/src/main/java/samples/Payments/Payments/MITUnscheduledCredentialOnFile.java deleted file mode 100644 index 0f02972..0000000 --- a/src/main/java/samples/Payments/Payments/MITUnscheduledCredentialOnFile.java +++ /dev/null @@ -1,117 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class MITUnscheduledCredentialOnFile { - 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) { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("internet"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.type("merchant"); - processingInformationAuthorizationOptionsInitiator.storedCredentialUsed(true); - Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction = new Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction(); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.previousTransactionId("123456789012345"); - processingInformationAuthorizationOptionsInitiator.merchantInitiatedTransaction(processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction); - - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.type("001"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("GBP"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Payments/PartialAuthorization.java b/src/main/java/samples/Payments/Payments/PartialAuthorization.java deleted file mode 100644 index f4351b6..0000000 --- a/src/main/java/samples/Payments/Payments/PartialAuthorization.java +++ /dev/null @@ -1,107 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PartialAuthorization { - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("1234567890"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("7012.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(6); - pointOfSaleInformation.terminalCapability(4); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformationEmv.fallbackCondition(1); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/PaymentNetworkTokenization.java b/src/main/java/samples/Payments/Payments/PaymentNetworkTokenization.java deleted file mode 100644 index 64ed182..0000000 --- a/src/main/java/samples/Payments/Payments/PaymentNetworkTokenization.java +++ /dev/null @@ -1,112 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PaymentNetworkTokenization { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC_123122"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - processingInformation.commerceIndicator("vbv"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationTokenizedCard paymentInformationTokenizedCard = new Ptsv2paymentsPaymentInformationTokenizedCard(); - paymentInformationTokenizedCard.number("4111111111111111"); - paymentInformationTokenizedCard.expirationMonth("12"); - paymentInformationTokenizedCard.expirationYear("2031"); - paymentInformationTokenizedCard.transactionType("1"); - paymentInformation.tokenizedCard(paymentInformationTokenizedCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsConsumerAuthenticationInformation consumerAuthenticationInformation = new Ptsv2paymentsConsumerAuthenticationInformation(); - consumerAuthenticationInformation.cavv("AAABCSIIAAAAAAACcwgAEMCoNh+="); - consumerAuthenticationInformation.xid("T1Y0OVcxMVJJdkI0WFlBcXptUzE="); - requestObj.consumerAuthenticationInformation(consumerAuthenticationInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/PaymentWithFlexToken.java b/src/main/java/samples/Payments/Payments/PaymentWithFlexToken.java deleted file mode 100644 index b52cba5..0000000 --- a/src/main/java/samples/Payments/Payments/PaymentWithFlexToken.java +++ /dev/null @@ -1,93 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PaymentWithFlexToken { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("RTS"); - orderInformationBillTo.lastName("VDP"); - orderInformationBillTo.address1("201 S. Division St."); - orderInformationBillTo.locality("Ann Arbor"); - orderInformationBillTo.administrativeArea("MI"); - orderInformationBillTo.postalCode("48104-2201"); - orderInformationBillTo.country("US"); - orderInformationBillTo.district("MI"); - orderInformationBillTo.buildingNumber("123"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("999999999"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsTokenInformation tokenInformation = new Ptsv2paymentsTokenInformation(); - tokenInformation.transientTokenJwt("eyJraWQiOiIwOGNtNFp2emU5UVpqb00zZ2NlVlpaRGVPb0xma242ZiIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjp7Im51bWJlciI6IjQxMTExMVhYWFhYWDExMTEiLCJ0eXBlIjoiMDAxIn0sImlzcyI6IkZsZXgvMDgiLCJleHAiOjE1OTU5MjAwNTksInR5cGUiOiJtZi0wLjExLjAiLCJpYXQiOjE1OTU5MTkxNTksImp0aSI6IjFFM1pRVVpKWlRLVVZJNkNNSVdSOFRUT0pDU0pVNTFUSTlHSFhaSkE3MTQwWlZVTFVGWDY1RjFGQ0VCQkIwMUIifQ.ZY5ZRntWhr0HXBm6sBB0JsXK0Nwt92gos74V9HCDOgHcgBFgGNA-SVDG4o2pSXruMtlBkLKAN_xmRdx0wsFUyz_AKasLNbGBiNZiltgN1UJpRju54h2A91NzQhZdWTz69mpfLkD8bxiCxCUTvjgsrqDxVijm5ebmUlacVzbAOICZlLPR21IJv6pAUdKucW62-aH42hIqYaBwJJulDUjWAGCsBTxQF_j13s1aHtRWFYN9Ks5smAfiojIUqweT3zvjrylFJk_uoPw9v40ODp-8TiUjtY9Oz_XRGLdZgOEolA2zaB8itpVouK8-8ystCrQGakA8qbxHjcFIaoeiKapxDQ"); - requestObj.tokenInformation(tokenInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/PaymentWithFlexTokenCreatePermanentTMSToken.java b/src/main/java/samples/Payments/Payments/PaymentWithFlexTokenCreatePermanentTMSToken.java deleted file mode 100644 index 873be91..0000000 --- a/src/main/java/samples/Payments/Payments/PaymentWithFlexTokenCreatePermanentTMSToken.java +++ /dev/null @@ -1,117 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PaymentWithFlexTokenCreatePermanentTMSToken { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - - List actionList = new ArrayList (); - actionList.add("TOKEN_CREATE"); - processingInformation.actionList(actionList); - - - List actionTokenTypes = new ArrayList (); - actionTokenTypes.add("customer"); - actionTokenTypes.add("paymentInstrument"); - actionTokenTypes.add("shippingAddress"); - processingInformation.actionTokenTypes(actionTokenTypes); - - processingInformation.capture(false); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - Ptsv2paymentsOrderInformationShipTo orderInformationShipTo = new Ptsv2paymentsOrderInformationShipTo(); - orderInformationShipTo.firstName("John"); - orderInformationShipTo.lastName("Doe"); - orderInformationShipTo.address1("1 Market St"); - orderInformationShipTo.locality("san francisco"); - orderInformationShipTo.administrativeArea("CA"); - orderInformationShipTo.postalCode("94105"); - orderInformationShipTo.country("US"); - orderInformation.shipTo(orderInformationShipTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsTokenInformation tokenInformation = new Ptsv2paymentsTokenInformation(); - tokenInformation.transientTokenJwt("eyJraWQiOiIwODVLd3ZiZHVqZW1DZDN3UnNxVFg3RG5nZzlZVk04NiIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjp7Im51bWJlciI6IjQxMTExMVhYWFhYWDExMTEiLCJ0eXBlIjoiMDAxIn0sImlzcyI6IkZsZXgvMDgiLCJleHAiOjE1OTU2MjAxNTQsInR5cGUiOiJtZi0wLjExLjAiLCJpYXQiOjE1OTU2MTkyNTQsImp0aSI6IjFFMTlWWVlBUEFEUllPSzREUUM1NFhRN1hUVTlYN01YSzBCNTc5UFhCUU1HUUExVU1MOFI1RjFCM0IzQTU4MkIifQ.NKSM8zuT9TQC2OIUxIFJQk4HKeHhj_RGWmEqOQhBi0TIynt_kCIup1UVtAlhPzUfPWLwRrUVXnA9dyjLt_Q-pFZnvZ2lVANbiOq_R0us88MkM_mqaELuInCwxFeFZKA4gl8XmDFARgX1aJttC19Le6NYOhK2gpMrV4i0yz-IkbScsk0_vCH3raayNacFU2Wy9xei6H_V0yw2GeOs7kF6wdtMvBNw_uoLXd77LGE3LmV7z1TpJcG1SXy2s0bwYhEvkQGnrq6FfY8w7-UkDBWT1GhU3ZVP4y7h0l1WEX2xqf_ze25ZiYJQfWrEWPBHXRubOpAuaf4rfeZei0mRwPU-sQ"); - requestObj.tokenInformation(tokenInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java deleted file mode 100644 index 704a751..0000000 --- a/src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PinDebitPurchaseUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("2.2 Purchase"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("202.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("contactless"); - pointOfSaleInformation.terminalCapability(4); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.tags("9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000"); - pointOfSaleInformationEmv.cardSequenceNumber("1"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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 (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingSwipedTrackDataWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingSwipedTrackDataWithVisaPlatformConnect.java deleted file mode 100644 index b9475ac..0000000 --- a/src/main/java/samples/Payments/Payments/PinDebitPurchaseUsingSwipedTrackDataWithVisaPlatformConnect.java +++ /dev/null @@ -1,90 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PinDebitPurchaseUsingSwipedTrackDataWithVisaPlatformConnect { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("2.2 Purchase"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("202.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.trackData("%B4111111111111111^JONES/JONES ^3112101976110000868000000?;4111111111111111=16121019761186800000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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 (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/RestaurantAuthorization.java b/src/main/java/samples/Payments/Payments/RestaurantAuthorization.java deleted file mode 100644 index fa0a84c..0000000 --- a/src/main/java/samples/Payments/Payments/RestaurantAuthorization.java +++ /dev/null @@ -1,96 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RestaurantAuthorization { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("demomerchant"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.thirdPartyCertificationNumber("123456789012"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(2); - pointOfSaleInformation.trackData("%B38000000000006^TEST/CYBS ^2012121019761100 00868000000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer.java b/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer.java deleted file mode 100644 index 7e6e550..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingEMVTechnologyWithContactReadOneForCardPresentEnabledAcquirer { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("contact"); - pointOfSaleInformation.terminalCapability(1); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.cardSequenceNumber("0"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B4111111111111111^TEST/CYBS ^2012121019761100 00868000000?;"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer.java b/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer.java deleted file mode 100644 index 21f1491..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer.java +++ /dev/null @@ -1,115 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingEMVTechnologyWithContactReadTwoForCardPresentEnabledAcquirer { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.originalTransactionId("510be4aef90711e6acbc7d88388d803d"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("contact"); - pointOfSaleInformation.terminalCapability(4); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.tags("9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000"); - pointOfSaleInformationEmv.cardholderVerificationMethodUsed(2); - pointOfSaleInformationEmv.cardSequenceNumber("1"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B4111111111111111^TEST/CYBS ^2012121019761100 00868000000?;"); - - List cardholderVerificationMethod = new ArrayList (); - cardholderVerificationMethod.add("pin"); - cardholderVerificationMethod.add("signature"); - pointOfSaleInformation.cardholderVerificationMethod(cardholderVerificationMethod); - - - List terminalInputCapability = new ArrayList (); - terminalInputCapability.add("contact"); - terminalInputCapability.add("contactless"); - terminalInputCapability.add("keyed"); - terminalInputCapability.add("swiped"); - pointOfSaleInformation.terminalInputCapability(terminalInputCapability); - - pointOfSaleInformation.terminalCardCaptureCapability("1"); - pointOfSaleInformation.deviceId("123lkjdIOBK34981slviLI39bj"); - pointOfSaleInformation.encryptedKeySerialNumber("01043191"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect.java deleted file mode 100644 index ebf2222..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect.java +++ /dev/null @@ -1,99 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingEMVTechnologyWithContactReadWithVisaPlatformConnect { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("contact"); - pointOfSaleInformation.terminalCapability(4); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.tags("9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000"); - pointOfSaleInformationEmv.cardSequenceNumber("1"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B4111111111111111^TEST/CYBS ^2012121019761100 00868000000?;"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactless.java b/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactless.java deleted file mode 100644 index f3d4b9a..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactless.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingEMVTechnologyWithContactless { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(2); - pointOfSaleInformation.entryMode("contactless"); - pointOfSaleInformation.terminalCapability(2); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.cardSequenceNumber("999"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B38000000000006^TEST/CYBS ^2012121019761100 00868000000?;38000000000006=20121210197611868000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer.java b/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer.java deleted file mode 100644 index 080b827..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer.java +++ /dev/null @@ -1,115 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingEMVTechnologyWithContactlessReadForCardPresentEnabledAcquirer { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.originalTransactionId("510be4aef90711e6acbc7d88388d803d"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(1); - pointOfSaleInformation.entryMode("contactless"); - pointOfSaleInformation.terminalCapability(5); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.tags("9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000"); - pointOfSaleInformationEmv.cardholderVerificationMethodUsed(2); - pointOfSaleInformationEmv.cardSequenceNumber("1"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B4111111111111111^TEST/CYBS ^2012121019761100 00868000000?;"); - - List cardholderVerificationMethod = new ArrayList (); - cardholderVerificationMethod.add("pin"); - cardholderVerificationMethod.add("signature"); - pointOfSaleInformation.cardholderVerificationMethod(cardholderVerificationMethod); - - - List terminalInputCapability = new ArrayList (); - terminalInputCapability.add("contact"); - terminalInputCapability.add("contactless"); - terminalInputCapability.add("keyed"); - terminalInputCapability.add("swiped"); - pointOfSaleInformation.terminalInputCapability(terminalInputCapability); - - pointOfSaleInformation.terminalCardCaptureCapability("1"); - pointOfSaleInformation.deviceId("123lkjdIOBK34981slviLI39bj"); - pointOfSaleInformation.encryptedKeySerialNumber("01043191"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java deleted file mode 100644 index 9f442ee..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect.java +++ /dev/null @@ -1,99 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingEMVTechnologyWithContactlessReadWithVisaPlatformConnect { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.catLevel(2); - pointOfSaleInformation.entryMode("contactless"); - pointOfSaleInformation.terminalCapability(5); - Ptsv2paymentsPointOfSaleInformationEmv pointOfSaleInformationEmv = new Ptsv2paymentsPointOfSaleInformationEmv(); - pointOfSaleInformationEmv.tags("9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000"); - pointOfSaleInformationEmv.cardSequenceNumber("1"); - pointOfSaleInformationEmv.fallback(false); - pointOfSaleInformation.emv(pointOfSaleInformationEmv); - - pointOfSaleInformation.trackData("%B38000000000006^TEST/CYBS ^2012121019761100 00868000000?;38000000000006=20121210197611868000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataForCardPresentEnabledAcquirer.java b/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataForCardPresentEnabledAcquirer.java deleted file mode 100644 index ce87f82..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataForCardPresentEnabledAcquirer.java +++ /dev/null @@ -1,95 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingKeyedDataForCardPresentEnabledAcquirer { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(2); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithBalanceInquiry.java b/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithBalanceInquiry.java deleted file mode 100644 index 9cb8ebb..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithBalanceInquiry.java +++ /dev/null @@ -1,105 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingKeyedDataWithBalanceInquiry { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - Ptsv2paymentsClientReferenceInformationPartner clientReferenceInformationPartner = new Ptsv2paymentsClientReferenceInformationPartner(); - clientReferenceInformationPartner.thirdPartyCertificationNumber("123456789012"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(true); - processingInformationAuthorizationOptions.ignoreCvResult(true); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(2); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithVisaPlatformConnect.java deleted file mode 100644 index ee5a359..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingKeyedDataWithVisaPlatformConnect.java +++ /dev/null @@ -1,101 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingKeyedDataWithVisaPlatformConnect { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(true); - processingInformationAuthorizationOptions.ignoreCvResult(true); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("keyed"); - pointOfSaleInformation.terminalCapability(2); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer.java b/src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer.java deleted file mode 100644 index c5eda11..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer.java +++ /dev/null @@ -1,86 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingSwipedTrackDataForCardPresentEnabledAcquirer { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(2); - pointOfSaleInformation.trackData("%B38000000000006^TEST/CYBS ^2012121019761100 00868000000?;38000000000006=20121210197611868000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataWithVisaPlatformConnect.java b/src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataWithVisaPlatformConnect.java deleted file mode 100644 index a233bd7..0000000 --- a/src/main/java/samples/Payments/Payments/SaleUsingSwipedTrackDataWithVisaPlatformConnect.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SaleUsingSwipedTrackDataWithVisaPlatformConnect { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(true); - processingInformation.commerceIndicator("retail"); - Ptsv2paymentsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Ptsv2paymentsProcessingInformationAuthorizationOptions(); - processingInformationAuthorizationOptions.partialAuthIndicator(true); - processingInformationAuthorizationOptions.ignoreAvsResult(false); - processingInformationAuthorizationOptions.ignoreCvResult(false); - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(2); - pointOfSaleInformation.trackData("%B38000000000006^TEST/CYBS ^2012121019761100 00868000000?;38000000000006=20121210197611868000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/ServiceFeesWithCreditCardTransaction.java b/src/main/java/samples/Payments/Payments/ServiceFeesWithCreditCardTransaction.java deleted file mode 100644 index 5e624fb..0000000 --- a/src/main/java/samples/Payments/Payments/ServiceFeesWithCreditCardTransaction.java +++ /dev/null @@ -1,116 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ServiceFeesWithCreditCardTransaction { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("2325.00"); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.serviceFeeAmount("30.0"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsMerchantInformation merchantInformation = new Ptsv2paymentsMerchantInformation(); - Ptsv2paymentsMerchantInformationServiceFeeDescriptor merchantInformationServiceFeeDescriptor = new Ptsv2paymentsMerchantInformationServiceFeeDescriptor(); - merchantInformationServiceFeeDescriptor.name("Vacations Service Fee"); - merchantInformationServiceFeeDescriptor.contact("8009999999"); - merchantInformationServiceFeeDescriptor.state("CA"); - merchantInformation.serviceFeeDescriptor(merchantInformationServiceFeeDescriptor); - - requestObj.merchantInformation(merchantInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/SimpleAuthorizationInternet.java b/src/main/java/samples/Payments/Payments/SimpleAuthorizationInternet.java deleted file mode 100644 index 9269a43..0000000 --- a/src/main/java/samples/Payments/Payments/SimpleAuthorizationInternet.java +++ /dev/null @@ -1,105 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class SimpleAuthorizationInternet { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/Swiped.java b/src/main/java/samples/Payments/Payments/Swiped.java deleted file mode 100644 index 08d26bd..0000000 --- a/src/main/java/samples/Payments/Payments/Swiped.java +++ /dev/null @@ -1,86 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class Swiped { - 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 PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("123456"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - processingInformation.commerceIndicator("retail"); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2paymentsPointOfSaleInformation pointOfSaleInformation = new Ptsv2paymentsPointOfSaleInformation(); - pointOfSaleInformation.entryMode("swiped"); - pointOfSaleInformation.terminalCapability(2); - pointOfSaleInformation.trackData("%B38000000000006^TEST/CYBS ^2012121019761100 00868000000?;38000000000006=20121210197611868000?"); - requestObj.pointOfSaleInformation(pointOfSaleInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Payments/ZeroDollarAuthorization.java b/src/main/java/samples/Payments/Payments/ZeroDollarAuthorization.java deleted file mode 100644 index b82835f..0000000 --- a/src/main/java/samples/Payments/Payments/ZeroDollarAuthorization.java +++ /dev/null @@ -1,106 +0,0 @@ -package samples.Payments.Payments; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ZeroDollarAuthorization { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static boolean userCapture = false; - - 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 { - run(); - } - - public static PtsV2PaymentsPost201Response run() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("1234567890"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - if (userCapture) { - processingInformation.capture(true); - } - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("5555555555554444"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformationCard.securityCode("123"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("0"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Refund/ElectronicCheckFollowonRefund.java b/src/main/java/samples/Payments/Refund/ElectronicCheckFollowonRefund.java deleted file mode 100644 index 339ae39..0000000 --- a/src/main/java/samples/Payments/Refund/ElectronicCheckFollowonRefund.java +++ /dev/null @@ -1,87 +0,0 @@ -package samples.Payments.Refund; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.ElectronicCheckDebits; - -public class ElectronicCheckFollowonRefund { - 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 PtsV2PaymentsRefundPost201Response run() { - String id = ElectronicCheckDebits.run().getId(); - - RefundPaymentRequest requestObj = new RefundPaymentRequest(); - - Ptsv2paymentsidrefundsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidrefundsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsProcessingInformation processingInformation = new Ptsv2paymentsidrefundsProcessingInformation(); - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsidrefundsPaymentInformation paymentInformation = new Ptsv2paymentsidrefundsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsidrefundsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CHECK"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsRefundPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - RefundApi apiInstance = new RefundApi(apiClient); - result = apiInstance.refundPayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Refund/RefundCapture.java b/src/main/java/samples/Payments/Refund/RefundCapture.java deleted file mode 100644 index 6a65692..0000000 --- a/src/main/java/samples/Payments/Refund/RefundCapture.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.Payments.Refund; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Capture.CapturePayment; - -public class RefundCapture { - 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 { - run(); - } - - public static PtsV2PaymentsRefundPost201Response run() { - PtsV2PaymentsCapturesPost201Response captureResponse = CapturePayment.run(); - String id = captureResponse.getId(); - - RefundCaptureRequest requestObj = new RefundCaptureRequest(); - - Ptsv2paymentsidrefundsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidrefundsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsRefundPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - RefundApi apiInstance = new RefundApi(apiClient); - result = apiInstance.refundCapture(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Refund/RefundPayment.java b/src/main/java/samples/Payments/Refund/RefundPayment.java deleted file mode 100644 index 0ce293f..0000000 --- a/src/main/java/samples/Payments/Refund/RefundPayment.java +++ /dev/null @@ -1,79 +0,0 @@ -package samples.Payments.Refund; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.SimpleAuthorizationInternet; - -public class RefundPayment { - 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 { - run(); - } - - public static PtsV2PaymentsRefundPost201Response run() { - SimpleAuthorizationInternet.userCapture = true; - PtsV2PaymentsPost201Response paymentResponse = SimpleAuthorizationInternet.run(); - String id = paymentResponse.getId(); - - RefundPaymentRequest requestObj = new RefundPaymentRequest(); - - Ptsv2paymentsidrefundsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidrefundsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidrefundsOrderInformation orderInformation = new Ptsv2paymentsidrefundsOrderInformation(); - Ptsv2paymentsidcapturesOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidcapturesOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("10"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsRefundPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - RefundApi apiInstance = new RefundApi(apiClient); - result = apiInstance.refundPayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Reversal/ProcessAuthorizationReversal.java b/src/main/java/samples/Payments/Reversal/ProcessAuthorizationReversal.java deleted file mode 100644 index 1f7035f..0000000 --- a/src/main/java/samples/Payments/Reversal/ProcessAuthorizationReversal.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.Payments.Reversal; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.SimpleAuthorizationInternet; - -public class ProcessAuthorizationReversal { - 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 { - run(); - } - - public static PtsV2PaymentsReversalsPost201Response run() { - PtsV2PaymentsPost201Response paymentResponse = SimpleAuthorizationInternet.run(); - String id = paymentResponse.getId(); - - AuthReversalRequest requestObj = new AuthReversalRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidreversalsReversalInformation reversalInformation = new Ptsv2paymentsidreversalsReversalInformation(); - Ptsv2paymentsidreversalsReversalInformationAmountDetails reversalInformationAmountDetails = new Ptsv2paymentsidreversalsReversalInformationAmountDetails(); - reversalInformationAmountDetails.totalAmount("102.21"); - reversalInformation.amountDetails(reversalInformationAmountDetails); - - reversalInformation.reason("testing"); - requestObj.reversalInformation(reversalInformation); - - PtsV2PaymentsReversalsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReversalApi apiInstance = new ReversalApi(apiClient); - result = apiInstance.authReversal(id, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Reversal/ServiceFeesAuthorizationReversal.java b/src/main/java/samples/Payments/Reversal/ServiceFeesAuthorizationReversal.java deleted file mode 100644 index 59f6cf2..0000000 --- a/src/main/java/samples/Payments/Reversal/ServiceFeesAuthorizationReversal.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.Payments.Reversal; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.ServiceFeesWithCreditCardTransaction; - -public class ServiceFeesAuthorizationReversal { - 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 { - run(); - } - - public static PtsV2PaymentsReversalsPost201Response run() { - PtsV2PaymentsPost201Response paymentResponse = ServiceFeesWithCreditCardTransaction.run(); - String id = paymentResponse.getId(); - - AuthReversalRequest requestObj = new AuthReversalRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidreversalsReversalInformation reversalInformation = new Ptsv2paymentsidreversalsReversalInformation(); - Ptsv2paymentsidreversalsReversalInformationAmountDetails reversalInformationAmountDetails = new Ptsv2paymentsidreversalsReversalInformationAmountDetails(); - reversalInformationAmountDetails.totalAmount("2325.00"); - reversalInformation.amountDetails(reversalInformationAmountDetails); - - reversalInformation.reason("34"); - requestObj.reversalInformation(reversalInformation); - - PtsV2PaymentsReversalsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReversalApi apiInstance = new ReversalApi(apiClient); - result = apiInstance.authReversal(id, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Reversal/TimeoutReversal.java b/src/main/java/samples/Payments/Reversal/TimeoutReversal.java deleted file mode 100644 index 869b3bc..0000000 --- a/src/main/java/samples/Payments/Reversal/TimeoutReversal.java +++ /dev/null @@ -1,78 +0,0 @@ -package samples.Payments.Reversal; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.AuthorizationForTimeoutReversalFlow; -import samples.core.SampleCodeRunner; - -public class TimeoutReversal { - 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 PtsV2PaymentsReversalsPost201Response run() { - AuthorizationForTimeoutReversalFlow.run(); - MitReversalRequest requestObj = new MitReversalRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - clientReferenceInformation.transactionId(SampleCodeRunner.timeoutReversalTransactionId); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidreversalsReversalInformation reversalInformation = new Ptsv2paymentsidreversalsReversalInformation(); - Ptsv2paymentsidreversalsReversalInformationAmountDetails reversalInformationAmountDetails = new Ptsv2paymentsidreversalsReversalInformationAmountDetails(); - reversalInformationAmountDetails.totalAmount("102.21"); - reversalInformation.amountDetails(reversalInformationAmountDetails); - - reversalInformation.reason("testing"); - requestObj.reversalInformation(reversalInformation); - - PtsV2PaymentsReversalsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReversalApi apiInstance = new ReversalApi(apiClient); - result = apiInstance.mitReversal(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Void/EBTReversalOfPurchaseFromSNAPAccount.java b/src/main/java/samples/Payments/Void/EBTReversalOfPurchaseFromSNAPAccount.java deleted file mode 100644 index bfdc39e..0000000 --- a/src/main/java/samples/Payments/Void/EBTReversalOfPurchaseFromSNAPAccount.java +++ /dev/null @@ -1,88 +0,0 @@ -package samples.Payments.Void; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; -import samples.Payments.Credit.EBTMerchandiseReturnCreditVoucherFromSNAP; - -public class EBTReversalOfPurchaseFromSNAPAccount { - 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 { - run(); - } - - public static PtsV2PaymentsVoidsPost201Response run() { - - PtsV2CreditsPost201Response creditResponse = EBTMerchandiseReturnCreditVoucherFromSNAP.run(); - String id = creditResponse.getId(); - - VoidPaymentRequest requestObj = new VoidPaymentRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("Reversal of Purchase from SNAP Account"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidvoidsPaymentInformation paymentInformation = new Ptsv2paymentsidvoidsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsidrefundsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidvoidsOrderInformation orderInformation = new Ptsv2paymentsidvoidsOrderInformation(); - Ptsv2paymentsidreversalsReversalInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsidreversalsReversalInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("204.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsVoidsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VoidApi apiInstance = new VoidApi(apiClient); - result = apiInstance.voidPayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Payments/Void/PinDebitPurchaseReversalVoid.java b/src/main/java/samples/Payments/Void/PinDebitPurchaseReversalVoid.java deleted file mode 100644 index 4a6b202..0000000 --- a/src/main/java/samples/Payments/Void/PinDebitPurchaseReversalVoid.java +++ /dev/null @@ -1,82 +0,0 @@ -package samples.Payments.Void; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.PinDebitPurchaseUsingSwipedTrackDataWithVisaPlatformConnect; - -public class PinDebitPurchaseReversalVoid { - 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 PtsV2PaymentsVoidsPost201Response run() { - - PtsV2PaymentsPost201Response purchaseResponse = PinDebitPurchaseUsingSwipedTrackDataWithVisaPlatformConnect.run(); - String id = purchaseResponse.getId(); - - VoidPaymentRequest requestObj = new VoidPaymentRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("Pin Debit Purchase Reversal(Void)"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsidvoidsPaymentInformation paymentInformation = new Ptsv2paymentsidvoidsPaymentInformation(); - Ptsv2paymentsidrefundsPaymentInformationPaymentType paymentInformationPaymentType = new Ptsv2paymentsidrefundsPaymentInformationPaymentType(); - paymentInformationPaymentType.name("CARD"); - paymentInformationPaymentType.subTypeName("DEBIT"); - paymentInformation.paymentType(paymentInformationPaymentType); - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsidvoidsOrderInformation orderInformation = new Ptsv2paymentsidvoidsOrderInformation(); - Ptsv2paymentsidreversalsReversalInformationAmountDetails amountDetails = new Ptsv2paymentsidreversalsReversalInformationAmountDetails(); - amountDetails.currency("USD"); - amountDetails.totalAmount("202.00"); - orderInformation.amountDetails(amountDetails); - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsVoidsPost201Response result = null; - try { - merchantProp = Configuration.getAlternativeMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VoidApi apiInstance = new VoidApi(apiClient); - result = apiInstance.voidPayment(requestObj, id); - - 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 (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Void/TimeoutVoid.java b/src/main/java/samples/Payments/Void/TimeoutVoid.java deleted file mode 100644 index 940f168..0000000 --- a/src/main/java/samples/Payments/Void/TimeoutVoid.java +++ /dev/null @@ -1,71 +0,0 @@ -package samples.Payments.Void; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.AuthorizationCaptureForTimeoutVoidFlow; -import samples.Payments.Payments.AuthorizationForIncrementalAuthorizationFlow; -import samples.core.SampleCodeRunner; - -public class TimeoutVoid { - 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 PtsV2PaymentsVoidsPost201Response run() { - AuthorizationCaptureForTimeoutVoidFlow.run(); - MitVoidRequest requestObj = new MitVoidRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - clientReferenceInformation.transactionId(SampleCodeRunner.timeoutVoidTransactionId); - requestObj.clientReferenceInformation(clientReferenceInformation); - - PtsV2PaymentsVoidsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VoidApi apiInstance = new VoidApi(apiClient); - result = apiInstance.mitVoid(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Void/VoidCapture.java b/src/main/java/samples/Payments/Void/VoidCapture.java deleted file mode 100644 index f47996e..0000000 --- a/src/main/java/samples/Payments/Void/VoidCapture.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Payments.Void; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Capture.CapturePayment; - -public class VoidCapture { - 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 { - run(); - } - - public static PtsV2PaymentsVoidsPost201Response run() { - PtsV2PaymentsCapturesPost201Response captureResponse = CapturePayment.run(); - String id = captureResponse.getId(); - - VoidCaptureRequest requestObj = new VoidCaptureRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("test_void"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - PtsV2PaymentsVoidsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VoidApi apiInstance = new VoidApi(apiClient); - result = apiInstance.voidCapture(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Void/VoidCredit.java b/src/main/java/samples/Payments/Void/VoidCredit.java deleted file mode 100644 index b47b578..0000000 --- a/src/main/java/samples/Payments/Void/VoidCredit.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Payments.Void; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Credit.Credit; - -public class VoidCredit { - 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 { - run(); - } - - public static PtsV2PaymentsVoidsPost201Response run() { - PtsV2CreditsPost201Response creditResponse = Credit.run(); - String id = creditResponse.getId(); - - VoidCreditRequest requestObj = new VoidCreditRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("test_void"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - PtsV2PaymentsVoidsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VoidApi apiInstance = new VoidApi(apiClient); - result = apiInstance.voidCredit(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Void/VoidPayment.java b/src/main/java/samples/Payments/Void/VoidPayment.java deleted file mode 100644 index b144fc6..0000000 --- a/src/main/java/samples/Payments/Void/VoidPayment.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Payments.Void; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.SimpleAuthorizationInternet; - -public class VoidPayment { - 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 { - run(); - } - - public static PtsV2PaymentsVoidsPost201Response run() { - PtsV2PaymentsPost201Response paymentResponse = SimpleAuthorizationInternet.run(); - String id = paymentResponse.getId(); - - VoidPaymentRequest requestObj = new VoidPaymentRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("test_void"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - PtsV2PaymentsVoidsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VoidApi apiInstance = new VoidApi(apiClient); - result = apiInstance.voidPayment(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payments/Void/VoidRefund.java b/src/main/java/samples/Payments/Void/VoidRefund.java deleted file mode 100644 index 7251986..0000000 --- a/src/main/java/samples/Payments/Void/VoidRefund.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Payments.Void; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Refund.RefundPayment; - -public class VoidRefund { - 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 { - run(); - } - - public static PtsV2PaymentsVoidsPost201Response run() { - PtsV2PaymentsRefundPost201Response refundResponse = RefundPayment.run(); - String id = refundResponse.getId(); - - VoidRefundRequest requestObj = new VoidRefundRequest(); - - Ptsv2paymentsidreversalsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsidreversalsClientReferenceInformation(); - clientReferenceInformation.code("test_void"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - PtsV2PaymentsVoidsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VoidApi apiInstance = new VoidApi(apiClient); - result = apiInstance.voidRefund(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payouts/PayoutCardNotToken.java b/src/main/java/samples/Payouts/PayoutCardNotToken.java deleted file mode 100644 index d11da82..0000000 --- a/src/main/java/samples/Payouts/PayoutCardNotToken.java +++ /dev/null @@ -1,126 +0,0 @@ -package samples.Payouts; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PayoutCardNotToken { - 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 { - run(); - } - - public static PtsV2PayoutsPost201Response run() { - - OctCreatePaymentRequest requestObj = new OctCreatePaymentRequest(); - - Ptsv2payoutsClientReferenceInformation clientReferenceInformation = new Ptsv2payoutsClientReferenceInformation(); - clientReferenceInformation.code("33557799"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2payoutsOrderInformation orderInformation = new Ptsv2payoutsOrderInformation(); - Ptsv2payoutsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2payoutsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("100.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2payoutsMerchantInformation merchantInformation = new Ptsv2payoutsMerchantInformation(); - Ptsv2payoutsMerchantInformationMerchantDescriptor merchantInformationMerchantDescriptor = new Ptsv2payoutsMerchantInformationMerchantDescriptor(); - merchantInformationMerchantDescriptor.name("Sending Company Name"); - merchantInformationMerchantDescriptor.locality("FC"); - merchantInformationMerchantDescriptor.country("US"); - merchantInformationMerchantDescriptor.administrativeArea("CA"); - merchantInformationMerchantDescriptor.postalCode("94440"); - merchantInformation.merchantDescriptor(merchantInformationMerchantDescriptor); - - requestObj.merchantInformation(merchantInformation); - - Ptsv2payoutsRecipientInformation recipientInformation = new Ptsv2payoutsRecipientInformation(); - recipientInformation.firstName("John"); - recipientInformation.lastName("Doe"); - recipientInformation.address1("Paseo Padre Boulevard"); - recipientInformation.locality("Foster City"); - recipientInformation.administrativeArea("CA"); - recipientInformation.country("US"); - recipientInformation.postalCode("94400"); - recipientInformation.phoneNumber("6504320556"); - requestObj.recipientInformation(recipientInformation); - - Ptsv2payoutsSenderInformation senderInformation = new Ptsv2payoutsSenderInformation(); - senderInformation.referenceNumber("1234567890"); - Ptsv2payoutsSenderInformationAccount senderInformationAccount = new Ptsv2payoutsSenderInformationAccount(); - senderInformationAccount.fundsSource("05"); - senderInformation.account(senderInformationAccount); - - senderInformation.name("Company Name"); - senderInformation.address1("900 Metro Center Blvd.900"); - senderInformation.locality("Foster City"); - senderInformation.administrativeArea("CA"); - senderInformation.countryCode("US"); - requestObj.senderInformation(senderInformation); - - Ptsv2payoutsProcessingInformation processingInformation = new Ptsv2payoutsProcessingInformation(); - processingInformation.businessApplicationId("FD"); - processingInformation.networkRoutingOrder("V8"); - processingInformation.commerceIndicator("internet"); - requestObj.processingInformation(processingInformation); - - Ptsv2payoutsPaymentInformation paymentInformation = new Ptsv2payoutsPaymentInformation(); - Ptsv2payoutsPaymentInformationCard paymentInformationCard = new Ptsv2payoutsPaymentInformationCard(); - paymentInformationCard.type("001"); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2025"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - PtsV2PayoutsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayoutsApi apiInstance = new PayoutsApi(apiClient); - result = apiInstance.octCreatePayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Payouts/PayoutToken.java b/src/main/java/samples/Payouts/PayoutToken.java deleted file mode 100644 index e68adb8..0000000 --- a/src/main/java/samples/Payouts/PayoutToken.java +++ /dev/null @@ -1,124 +0,0 @@ -package samples.Payouts; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class PayoutToken { - 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 { - run(); - } - - public static PtsV2PayoutsPost201Response run() { - - OctCreatePaymentRequest requestObj = new OctCreatePaymentRequest(); - - Ptsv2payoutsClientReferenceInformation clientReferenceInformation = new Ptsv2payoutsClientReferenceInformation(); - clientReferenceInformation.code("111111113"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2payoutsOrderInformation orderInformation = new Ptsv2payoutsOrderInformation(); - Ptsv2payoutsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2payoutsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("111.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Ptsv2payoutsMerchantInformation merchantInformation = new Ptsv2payoutsMerchantInformation(); - Ptsv2payoutsMerchantInformationMerchantDescriptor merchantInformationMerchantDescriptor = new Ptsv2payoutsMerchantInformationMerchantDescriptor(); - merchantInformationMerchantDescriptor.name("Sending Company Name"); - merchantInformationMerchantDescriptor.locality("FC"); - merchantInformationMerchantDescriptor.country("US"); - merchantInformationMerchantDescriptor.administrativeArea("CA"); - merchantInformationMerchantDescriptor.postalCode("94440"); - merchantInformation.merchantDescriptor(merchantInformationMerchantDescriptor); - - requestObj.merchantInformation(merchantInformation); - - Ptsv2payoutsRecipientInformation recipientInformation = new Ptsv2payoutsRecipientInformation(); - recipientInformation.firstName("John"); - recipientInformation.lastName("Doe"); - recipientInformation.address1("Paseo Padre Boulevard"); - recipientInformation.locality("Foster City"); - recipientInformation.administrativeArea("CA"); - recipientInformation.country("US"); - recipientInformation.postalCode("94400"); - recipientInformation.phoneNumber("6504320556"); - requestObj.recipientInformation(recipientInformation); - - Ptsv2payoutsSenderInformation senderInformation = new Ptsv2payoutsSenderInformation(); - senderInformation.referenceNumber("1234567890"); - Ptsv2payoutsSenderInformationAccount senderInformationAccount = new Ptsv2payoutsSenderInformationAccount(); - senderInformationAccount.fundsSource("05"); - senderInformationAccount.number("1234567890123456789012345678901234"); - senderInformation.account(senderInformationAccount); - - senderInformation.name("Company Name"); - senderInformation.address1("900 Metro Center Blvd.900"); - senderInformation.locality("Foster City"); - senderInformation.administrativeArea("CA"); - senderInformation.countryCode("US"); - requestObj.senderInformation(senderInformation); - - Ptsv2payoutsProcessingInformation processingInformation = new Ptsv2payoutsProcessingInformation(); - processingInformation.businessApplicationId("FD"); - processingInformation.networkRoutingOrder("V8"); - processingInformation.commerceIndicator("internet"); - requestObj.processingInformation(processingInformation); - - Ptsv2payoutsPaymentInformation paymentInformation = new Ptsv2payoutsPaymentInformation(); - Ptsv2paymentsPaymentInformationCustomer paymentInformationCustomer = new Ptsv2paymentsPaymentInformationCustomer(); - paymentInformationCustomer.customerId("7500BB199B4270EFE05340588D0AFCAD"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - PtsV2PayoutsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PayoutsApi apiInstance = new PayoutsApi(apiClient); - result = apiInstance.octCreatePayment(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/ActivatePlan.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/ActivatePlan.java deleted file mode 100644 index b9a1bb7..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/ActivatePlan.java +++ /dev/null @@ -1,55 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import Api.PlansApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.ActivateDeactivatePlanResponse; -import Model.InlineResponse2004; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class ActivatePlan { - 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 { - run(); - } - - public static ActivateDeactivatePlanResponse run() { - String planId = CreatePlan.run().getId(); - ActivateDeactivatePlanResponse result = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - result = apiInstance.activatePlan(planId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/CreatePlan.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/CreatePlan.java deleted file mode 100644 index 1e66618..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/CreatePlan.java +++ /dev/null @@ -1,91 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreatePlan { - 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 { - run(); - } - - public static CreatePlanResponse run() { - // Required to make the sample code ActivatePlan.java work - String planStatus = "DRAFT"; - - CreatePlanRequest requestObj = new CreatePlanRequest(); - - Rbsv1plansPlanInformation planInformation = new Rbsv1plansPlanInformation(); - planInformation.name("Gold Plan"); - planInformation.description("New Gold Plan"); - planInformation.setStatus(planStatus); - GetAllPlansResponsePlanInformationBillingPeriod planInformationBillingPeriod = new GetAllPlansResponsePlanInformationBillingPeriod(); - planInformationBillingPeriod.length("1"); - planInformationBillingPeriod.unit("M"); - planInformation.billingPeriod(planInformationBillingPeriod); - - Rbsv1plansPlanInformationBillingCycles planInformationBillingCycles = new Rbsv1plansPlanInformationBillingCycles(); - planInformationBillingCycles.total("12"); - planInformation.billingCycles(planInformationBillingCycles); - - requestObj.planInformation(planInformation); - - Rbsv1plansOrderInformation orderInformation = new Rbsv1plansOrderInformation(); - Rbsv1plansOrderInformationAmountDetails orderInformationAmountDetails = new Rbsv1plansOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.billingAmount("10"); - orderInformationAmountDetails.setupFee("2"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - CreatePlanResponse result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - result = apiInstance.createPlan(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - - } -} \ No newline at end of file diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/DeactivatePlan.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/DeactivatePlan.java deleted file mode 100644 index 40d7bcc..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/DeactivatePlan.java +++ /dev/null @@ -1,55 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import Api.PlansApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.ActivateDeactivatePlanResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class DeactivatePlan { - 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 { - run(); - } - - public static ActivateDeactivatePlanResponse run() { - String planId = ActivatePlan.run().getId(); - ActivateDeactivatePlanResponse result = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - result = apiInstance.deactivatePlan(planId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} - diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/DeletePlan.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/DeletePlan.java deleted file mode 100644 index ff71d22..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/DeletePlan.java +++ /dev/null @@ -1,62 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class DeletePlan { - 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 { - run(); - } - - public static void run() { - - String id = CreatePlan.run().getId(); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - apiInstance.deletePlan(id); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetListOfPlans.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetListOfPlans.java deleted file mode 100644 index 9e222b4..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetListOfPlans.java +++ /dev/null @@ -1,59 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import Api.PlansApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.GetAllPlansResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class GetListOfPlans { - private static String responseCode = null; - private static String responseStatus = 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 { - run(); - } - - private static GetAllPlansResponse run() { - int offset = 0; - int limit = 100; - String code = null; - String status = null; - String name = null; - - GetAllPlansResponse result = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - result = apiInstance.getPlans(null, null, null, null, null); - - responseCode = apiClient.responseCode; - responseStatus = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + responseStatus); - System.out.println(result); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlan.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlan.java deleted file mode 100644 index 4800a9b..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlan.java +++ /dev/null @@ -1,63 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class GetPlan { - 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 { - run(); - } - - public static GetPlanResponse run() { - String planId = CreatePlan.run().getId(); - GetPlanResponse result = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - result = apiInstance.getPlan(planId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlanCode.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlanCode.java deleted file mode 100644 index 4d6ce72..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/GetPlanCode.java +++ /dev/null @@ -1,53 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import Api.PlansApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.GetPlanCodeResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class GetPlanCode { - 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 { - run(); - } - - public static GetPlanCodeResponse run() { - GetPlanCodeResponse result = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - result = apiInstance.getPlanCode(); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Plans/UpdatePlan.java b/src/main/java/samples/RecurringBillingSubscriptions/Plans/UpdatePlan.java deleted file mode 100644 index 945b46e..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Plans/UpdatePlan.java +++ /dev/null @@ -1,86 +0,0 @@ -package samples.RecurringBillingSubscriptions.Plans; - -import Api.PlansApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class UpdatePlan { - 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 { - run(); - } - - public static void run() { - - String id = CreatePlan.run().getId(); - - UpdatePlanRequest requestObj = new UpdatePlanRequest(); - - Rbsv1plansidPlanInformation planInformation = new Rbsv1plansidPlanInformation(); - planInformation.name("Gold Plan NA"); - planInformation.description("Updated Gold Plan"); - GetAllPlansResponsePlanInformationBillingPeriod planInformationBillingPeriod = new GetAllPlansResponsePlanInformationBillingPeriod(); - planInformationBillingPeriod.length("2"); - planInformationBillingPeriod.unit("W"); - planInformation.billingPeriod(planInformationBillingPeriod); - - Rbsv1plansPlanInformationBillingCycles planInformationBillingCycles = new Rbsv1plansPlanInformationBillingCycles(); - planInformationBillingCycles.total("11"); - planInformation.billingCycles(planInformationBillingCycles); - - requestObj.planInformation(planInformation); - - Rbsv1plansidProcessingInformation processingInformation = new Rbsv1plansidProcessingInformation(); - Rbsv1plansidProcessingInformationSubscriptionBillingOptions processingInformationSubscriptionBillingOptions = new Rbsv1plansidProcessingInformationSubscriptionBillingOptions(); - processingInformationSubscriptionBillingOptions.applyTo("ALL"); - processingInformation.subscriptionBillingOptions(processingInformationSubscriptionBillingOptions); - - requestObj.processingInformation(processingInformation); - - GetAllPlansResponseOrderInformation orderInformation = new GetAllPlansResponseOrderInformation(); - GetAllPlansResponseOrderInformationAmountDetails orderInformationAmountDetails = new GetAllPlansResponseOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.billingAmount("11"); - orderInformationAmountDetails.setupFee("2"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PlansApi apiInstance = new PlansApi(apiClient); - apiInstance.updatePlan(id, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/ActivateSubscription.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/ActivateSubscription.java deleted file mode 100644 index c0e7aaa..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/ActivateSubscription.java +++ /dev/null @@ -1,52 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import Api.SubscriptionsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.ActivateSubscriptionResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class ActivateSubscription { - 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 { - run(); - } - - public static ActivateSubscriptionResponse run() { - ActivateSubscriptionResponse response = null; - try { - String subscriptionId = CancelSubscription.run().getId(); - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - response = apiInstance.activateSubscription(subscriptionId, null); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return response; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CancelSubscription.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CancelSubscription.java deleted file mode 100644 index 964bbee..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CancelSubscription.java +++ /dev/null @@ -1,52 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import Api.SubscriptionsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.CancelSubscriptionResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class CancelSubscription { - 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 { - run(); - } - - public static CancelSubscriptionResponse run() { - CancelSubscriptionResponse response = null; - try { - String subscriptionId = CreateSubscription.run().getId(); - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - response = apiInstance.cancelSubscription(subscriptionId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return response; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.java deleted file mode 100644 index 433da23..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.java +++ /dev/null @@ -1,98 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateSubscription { - 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 { - run(); - } - - public static CreateSubscriptionResponse run() { - - CreateSubscriptionRequest requestObj = new CreateSubscriptionRequest(); - - Rbsv1subscriptionsClientReferenceInformation clientReferenceInformation = new Rbsv1subscriptionsClientReferenceInformation(); - clientReferenceInformation.code("TC501713"); - Rbsv1subscriptionsClientReferenceInformationPartner clientReferenceInformationPartner = new Rbsv1subscriptionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("ABCD1234"); - clientReferenceInformationPartner.solutionId("GEF1234"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - clientReferenceInformation.applicationName("CYBS-SDK"); - clientReferenceInformation.applicationVersion("v1"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Rbsv1subscriptionsProcessingInformation processingInformation = new Rbsv1subscriptionsProcessingInformation(); - processingInformation.commerceIndicator("recurring"); - Rbsv1subscriptionsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Rbsv1subscriptionsProcessingInformationAuthorizationOptions(); - Rbsv1subscriptionsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Rbsv1subscriptionsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.type("merchant"); - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Rbsv1subscriptionsSubscriptionInformation subscriptionInformation = new Rbsv1subscriptionsSubscriptionInformation(); - subscriptionInformation.planId("6868912495476705603955"); - subscriptionInformation.name("Subscription with PlanId"); - subscriptionInformation.startDate("2024-06-11"); - requestObj.subscriptionInformation(subscriptionInformation); - - Rbsv1subscriptionsPaymentInformation paymentInformation = new Rbsv1subscriptionsPaymentInformation(); - Rbsv1subscriptionsPaymentInformationCustomer paymentInformationCustomer = new Rbsv1subscriptionsPaymentInformationCustomer(); - paymentInformationCustomer.id("C24F5921EB870D99E053AF598E0A4105"); - paymentInformation.customer(paymentInformationCustomer); - - requestObj.paymentInformation(paymentInformation); - - CreateSubscriptionResponse response = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - response = apiInstance.createSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return response; - } -} \ No newline at end of file diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetListOfSubscriptions.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetListOfSubscriptions.java deleted file mode 100644 index e6216f5..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetListOfSubscriptions.java +++ /dev/null @@ -1,56 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import Api.SubscriptionsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.GetAllSubscriptionsResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class GetListOfSubscriptions { - private static String responseCode = null; - private static String responseStatus = 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 { - run(); - } - - public static GetAllSubscriptionsResponse run() { - int offset = 0; - int limit = 100; - String code = null; - String status = null; - - GetAllSubscriptionsResponse response = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - response = apiInstance.getAllSubscriptions(offset, limit, code, status); - - responseCode = apiClient.responseCode; - responseStatus = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + responseStatus); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return response; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscription.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscription.java deleted file mode 100644 index a6c1acd..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscription.java +++ /dev/null @@ -1,61 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class GetSubscription { - 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 { - run(); - } - - public static void run() { - - String id = CreateSubscription.run().getId(); - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - apiInstance.getSubscription(id); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscriptionCode.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscriptionCode.java deleted file mode 100644 index bf93c54..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/GetSubscriptionCode.java +++ /dev/null @@ -1,51 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import Api.SubscriptionsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.GetSubscriptionCodeResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class GetSubscriptionCode { - 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 { - run(); - } - - public static GetSubscriptionCodeResponse run() { - GetSubscriptionCodeResponse response = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - response = apiInstance.getSubscriptionCode(); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return response; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/SuspendSubscription.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/SuspendSubscription.java deleted file mode 100644 index 505aa09..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/SuspendSubscription.java +++ /dev/null @@ -1,53 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import Api.SubscriptionsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.CancelSubscriptionResponse; -import Model.SuspendSubscriptionResponse; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class SuspendSubscription { - 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 { - run(); - } - - public static SuspendSubscriptionResponse run() { - SuspendSubscriptionResponse response = null; - try { - String subscriptionId = CreateSubscription.run().getId(); - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - response = apiInstance.suspendSubscription(subscriptionId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - return response; - } -} diff --git a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.java b/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.java deleted file mode 100644 index 7507cd8..0000000 --- a/src/main/java/samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.java +++ /dev/null @@ -1,98 +0,0 @@ -package samples.RecurringBillingSubscriptions.Subscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class UpdateSubscription { - 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 { - run(); - } - - public static void run() { - - String id = CreateSubscription.run().getId(); - - Model.UpdateSubscription requestObj = new Model.UpdateSubscription(); - - Rbsv1subscriptionsClientReferenceInformation clientReferenceInformation = new Rbsv1subscriptionsClientReferenceInformation(); - clientReferenceInformation.code("APGHU"); - Rbsv1subscriptionsClientReferenceInformationPartner clientReferenceInformationPartner = new Rbsv1subscriptionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("ABCD1234"); - clientReferenceInformationPartner.solutionId("GEF1234"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Rbsv1subscriptionsProcessingInformation processingInformation = new Rbsv1subscriptionsProcessingInformation(); - Rbsv1subscriptionsProcessingInformationAuthorizationOptions processingInformationAuthorizationOptions = new Rbsv1subscriptionsProcessingInformationAuthorizationOptions(); - Rbsv1subscriptionsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Rbsv1subscriptionsProcessingInformationAuthorizationOptionsInitiator(); - processingInformationAuthorizationOptionsInitiator.type("merchant"); - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - Rbsv1subscriptionsidSubscriptionInformation subscriptionInformation = new Rbsv1subscriptionsidSubscriptionInformation(); - subscriptionInformation.planId("6868912495476705603955"); - subscriptionInformation.name("Subscription with PlanId"); - subscriptionInformation.startDate("2024-06-11"); - requestObj.subscriptionInformation(subscriptionInformation); - - Rbsv1subscriptionsidOrderInformation orderInformation = new Rbsv1subscriptionsidOrderInformation(); - Rbsv1subscriptionsidOrderInformationAmountDetails orderInformationAmountDetails = new Rbsv1subscriptionsidOrderInformationAmountDetails(); - orderInformationAmountDetails.billingAmount("10"); - orderInformationAmountDetails.setupFee("5"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - apiInstance.updateSubscription(id, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Reporting/ChargebackDetails/GetChargebackDetails.java b/src/main/java/samples/Reporting/ChargebackDetails/GetChargebackDetails.java deleted file mode 100644 index fb8880a..0000000 --- a/src/main/java/samples/Reporting/ChargebackDetails/GetChargebackDetails.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.Reporting.ChargebackDetails; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetChargebackDetails { - 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 { - run(); - } - - public static ReportingV3ChargebackDetailsGet200Response run() { - - // QUERY PARAMETERS - String organizationId = "testrest"; - DateTime startTime = new DateTime("2021-08-01T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2021-09-01T23:59:59Z").withZone(DateTimeZone.forID("GMT")); - ReportingV3ChargebackDetailsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ChargebackDetailsApi apiInstance = new ChargebackDetailsApi(apiClient); - result = apiInstance.getChargebackDetails(startTime, endTime, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Reporting/ChargebackSummaries/GetChargebackSummaries.java b/src/main/java/samples/Reporting/ChargebackSummaries/GetChargebackSummaries.java deleted file mode 100644 index 7057e76..0000000 --- a/src/main/java/samples/Reporting/ChargebackSummaries/GetChargebackSummaries.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.Reporting.ChargebackSummaries; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetChargebackSummaries { - 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 { - run(); - } - - public static ReportingV3ChargebackSummariesGet200Response run() { - - // QUERY PARAMETERS - String organizationId = "testrest"; - DateTime startTime = new DateTime("2021-08-01T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2021-09-01T23:59:59Z").withZone(DateTimeZone.forID("GMT")); - ReportingV3ChargebackSummariesGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ChargebackSummariesApi apiInstance = new ChargebackSummariesApi(apiClient); - result = apiInstance.getChargebackSummaries(startTime, endTime, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Reporting/ConversionDetails/GetConversionDetailTransactions.java b/src/main/java/samples/Reporting/ConversionDetails/GetConversionDetailTransactions.java deleted file mode 100644 index 873d3e7..0000000 --- a/src/main/java/samples/Reporting/ConversionDetails/GetConversionDetailTransactions.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.Reporting.ConversionDetails; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetConversionDetailTransactions { - 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 { - run(); - } - - public static ReportingV3ConversionDetailsGet200Response run() { - - DateTime startTime = new DateTime("2020-09-21T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2020-09-21T23:00:00Z").withZone(DateTimeZone.forID("GMT")); - String organizationId = "testrest"; - - ReportingV3ConversionDetailsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ConversionDetailsApi apiInstance = new ConversionDetailsApi(apiClient); - result = apiInstance.getConversionDetail(startTime, endTime, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/InterchangeClearingLevelDetails/InterchangeClearingLevelDataForAccountOrMerchant.java b/src/main/java/samples/Reporting/InterchangeClearingLevelDetails/InterchangeClearingLevelDataForAccountOrMerchant.java deleted file mode 100644 index dfa87c5..0000000 --- a/src/main/java/samples/Reporting/InterchangeClearingLevelDetails/InterchangeClearingLevelDataForAccountOrMerchant.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.Reporting.InterchangeClearingLevelDetails; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class InterchangeClearingLevelDataForAccountOrMerchant { - 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 { - run(); - } - - public static ReportingV3InterchangeClearingLevelDetailsGet200Response run() { - - // QUERY PARAMETERS - String organizationId = "testrest"; - DateTime startTime = new DateTime("2021-08-01T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2021-09-01T23:59:59Z").withZone(DateTimeZone.forID("GMT")); - ReportingV3InterchangeClearingLevelDetailsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InterchangeClearingLevelDetailsApi apiInstance = new InterchangeClearingLevelDetailsApi(apiClient); - result = apiInstance.getInterchangeClearingLevelDetails(startTime, endTime, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Reporting/NetFundings/GetNetfundingInformationForAccountOrMerchant.java b/src/main/java/samples/Reporting/NetFundings/GetNetfundingInformationForAccountOrMerchant.java deleted file mode 100644 index 81ec6b0..0000000 --- a/src/main/java/samples/Reporting/NetFundings/GetNetfundingInformationForAccountOrMerchant.java +++ /dev/null @@ -1,66 +0,0 @@ -package samples.Reporting.NetFundings; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetNetfundingInformationForAccountOrMerchant { - 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 { - run(); - } - - public static ReportingV3NetFundingsGet200Response run() { - - DateTime startTime = new DateTime("2022-02-01T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2022-02-02T23:59:59Z").withZone(DateTimeZone.forID("GMT")); - String organizationId = "testrest"; - String groupName = null; - - ReportingV3NetFundingsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - NetFundingsApi apiInstance = new NetFundingsApi(apiClient); - result = apiInstance.getNetFundingDetails(startTime, endTime, organizationId, groupName); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/NotificationOfChanges/GetNotificationOfChanges.java b/src/main/java/samples/Reporting/NotificationOfChanges/GetNotificationOfChanges.java deleted file mode 100644 index 26bcacb..0000000 --- a/src/main/java/samples/Reporting/NotificationOfChanges/GetNotificationOfChanges.java +++ /dev/null @@ -1,64 +0,0 @@ -package samples.Reporting.NotificationOfChanges; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetNotificationOfChanges { - 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 { - run(); - } - - public static ReportingV3NotificationofChangesGet200Response run() { - - DateTime startTime = new DateTime("2020-07-01T12:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2020-07-10T12:00:00Z").withZone(DateTimeZone.forID("GMT")); - - ReportingV3NotificationofChangesGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - NotificationOfChangesApi apiInstance = new NotificationOfChangesApi(apiClient); - result = apiInstance.getNotificationOfChangeReport(startTime, endTime); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/PaymentBatchSummaries/GetPaymentBatchSummaryData.java b/src/main/java/samples/Reporting/PaymentBatchSummaries/GetPaymentBatchSummaryData.java deleted file mode 100644 index ef49ad4..0000000 --- a/src/main/java/samples/Reporting/PaymentBatchSummaries/GetPaymentBatchSummaryData.java +++ /dev/null @@ -1,67 +0,0 @@ -package samples.Reporting.PaymentBatchSummaries; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetPaymentBatchSummaryData { - 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 { - run(); - } - - public static ReportingV3PaymentBatchSummariesGet200Response run() { - - DateTime startTime = new DateTime("2020-09-01T12:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2020-09-30T12:00:00Z").withZone(DateTimeZone.forID("GMT")); - String organizationId = "testrest"; - String rollUp = null; - String breakdown = null; - - ReportingV3PaymentBatchSummariesGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentBatchSummariesApi apiInstance = new PaymentBatchSummariesApi(apiClient); - result = apiInstance.getPaymentBatchSummary(startTime, endTime, organizationId, rollUp, breakdown, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/PurchaseAndRefundDetails/GetPurchaseAndRefundDetails.java b/src/main/java/samples/Reporting/PurchaseAndRefundDetails/GetPurchaseAndRefundDetails.java deleted file mode 100644 index 397ee0b..0000000 --- a/src/main/java/samples/Reporting/PurchaseAndRefundDetails/GetPurchaseAndRefundDetails.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Reporting.PurchaseAndRefundDetails; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetPurchaseAndRefundDetails { - 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 { - run(); - } - - public static ReportingV3PurchaseRefundDetailsGet200Response run() { - - DateTime startTime = new DateTime("2020-01-01T12:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2020-01-30T12:00:00Z").withZone(DateTimeZone.forID("GMT")); - String organizationId = "testrest"; - String paymentSubtype = "VI"; - String viewBy = "requestDate"; - String groupName = "groupName"; - int offset = 20; - int limit = 2000; - - ReportingV3PurchaseRefundDetailsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PurchaseAndRefundDetailsApi apiInstance = new PurchaseAndRefundDetailsApi(apiClient); - result = apiInstance.getPurchaseAndRefundDetails(startTime, endTime, organizationId, paymentSubtype, viewBy, groupName, offset, limit); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/ReportDefinitions/GetReportDefinition.java b/src/main/java/samples/Reporting/ReportDefinitions/GetReportDefinition.java deleted file mode 100644 index fe0b16e..0000000 --- a/src/main/java/samples/Reporting/ReportDefinitions/GetReportDefinition.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.Reporting.ReportDefinitions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetReportDefinition { - 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 { - run(); - } - - public static ReportingV3ReportDefinitionsNameGet200Response run() { - String reportDefinitionName = "AcquirerExceptionDetailClass"; - String subscriptionType = null; - String reportMimeType = null; - String organizationId = "testrest"; - - ReportingV3ReportDefinitionsNameGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportDefinitionsApi apiInstance = new ReportDefinitionsApi(apiClient); - result = apiInstance.getResourceInfoByReportDefinition(reportDefinitionName, subscriptionType, reportMimeType, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/ReportDefinitions/GetReportingResourceInformation.java b/src/main/java/samples/Reporting/ReportDefinitions/GetReportingResourceInformation.java deleted file mode 100644 index 871b190..0000000 --- a/src/main/java/samples/Reporting/ReportDefinitions/GetReportingResourceInformation.java +++ /dev/null @@ -1,64 +0,0 @@ -package samples.Reporting.ReportDefinitions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetReportingResourceInformation { - 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 { - run(); - } - - public static ReportingV3ReportDefinitionsGet200Response run() { - - String subscriptionType = null; - String organizationId = "testrest"; - - ReportingV3ReportDefinitionsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportDefinitionsApi apiInstance = new ReportDefinitionsApi(apiClient); - result = apiInstance.getResourceV2Info(subscriptionType, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/ReportDownloads/DownloadReport.java b/src/main/java/samples/Reporting/ReportDownloads/DownloadReport.java deleted file mode 100644 index 8216fca..0000000 --- a/src/main/java/samples/Reporting/ReportDownloads/DownloadReport.java +++ /dev/null @@ -1,87 +0,0 @@ -package samples.Reporting.ReportDownloads; - -import java.lang.invoke.MethodHandles; -import java.io.File; -import java.io.InputStream; -import java.util.Properties; - -import org.apache.commons.io.FileUtils; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class DownloadReport { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static String resourceFile = "DownloadedReport"; - private static final String FILE_PATH = "src/main/resources/"; - private static String responseBody = null; - - 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 { - run(); - } - - public static void run() { - - String organizationId = "testrest"; - LocalDate reportDate = new LocalDate("2021-12-15"); - String reportName = "test_v5801"; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportDownloadsApi apiInstance = new ReportDownloadsApi(apiClient); - ApiResponse responseStream = apiInstance.downloadReportWithHttpInfo(reportDate, reportName, organizationId); - - // START : FILE DOWNLOAD FUNCTIONALITY - - String contentType = responseStream.getHeaders().get("Content-Type").get(0); - - String fileExtension = "csv"; - - if (contentType.contains("json")) { - fileExtension = contentType.substring(contentType.length() - 4); - } else { - fileExtension = contentType.substring(contentType.length() - 3); - } - - File targetFile = new File(FILE_PATH + resourceFile + "." + fileExtension); - - FileUtils.copyInputStreamToFile(responseStream.getData(), targetFile); - - // END : FILE DOWNLOAD FUNCTIONALITY - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - - System.out.println("File Downloaded at the following location : "); - System.out.println(new File(FILE_PATH + resourceFile + "." + fileExtension).getAbsolutePath()); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/Reporting/ReportSubscriptions/CreateClassicStandardReportSubscription.java b/src/main/java/samples/Reporting/ReportSubscriptions/CreateClassicStandardReportSubscription.java deleted file mode 100644 index 3486ed9..0000000 --- a/src/main/java/samples/Reporting/ReportSubscriptions/CreateClassicStandardReportSubscription.java +++ /dev/null @@ -1,66 +0,0 @@ -package samples.Reporting.ReportSubscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.io.InputStream; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateClassicStandardReportSubscription { - 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 { - run(); - } - - public static void run() { - - PredefinedSubscriptionRequestBean requestObj = new PredefinedSubscriptionRequestBean(); - - requestObj.reportDefinitionName("TransactionRequestClass"); - requestObj.subscriptionType("CLASSIC"); - String organizationId = null; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportSubscriptionsApi apiInstance = new ReportSubscriptionsApi(apiClient); - apiInstance.createStandardOrClassicSubscription(requestObj, organizationId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/Reporting/ReportSubscriptions/CreateReportSubscription.java b/src/main/java/samples/Reporting/ReportSubscriptions/CreateReportSubscription.java deleted file mode 100644 index 8faad87..0000000 --- a/src/main/java/samples/Reporting/ReportSubscriptions/CreateReportSubscription.java +++ /dev/null @@ -1,79 +0,0 @@ -package samples.Reporting.ReportSubscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateReportSubscription { - 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 { - run(); - } - - public static void run() { - - CreateReportSubscriptionRequest requestObj = new CreateReportSubscriptionRequest(); - - requestObj.reportDefinitionName("TransactionRequestClass"); - - List reportFields = new ArrayList (); - reportFields.add("Request.RequestID"); - reportFields.add("Request.TransactionDate"); - reportFields.add("Request.MerchantID"); - requestObj.reportFields(reportFields); - - requestObj.reportMimeType("application/xml"); - requestObj.reportFrequency("WEEKLY"); - requestObj.reportName("testrest_subcription_v1"); - requestObj.timezone("GMT"); - requestObj.startTime("0900"); - requestObj.startDay(1); - String organizationId = null; - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportSubscriptionsApi apiInstance = new ReportSubscriptionsApi(apiClient); - ApiResponse result =apiInstance.createSubscriptionWithHttpInfo(requestObj, organizationId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println(result.getData().toString()); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/Reporting/ReportSubscriptions/DeleteSubscriptionOfReportNameByOrganization.java b/src/main/java/samples/Reporting/ReportSubscriptions/DeleteSubscriptionOfReportNameByOrganization.java deleted file mode 100644 index 170a378..0000000 --- a/src/main/java/samples/Reporting/ReportSubscriptions/DeleteSubscriptionOfReportNameByOrganization.java +++ /dev/null @@ -1,62 +0,0 @@ -package samples.Reporting.ReportSubscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DeleteSubscriptionOfReportNameByOrganization { - 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 { - run(); - } - - public static void run() { - - String organizationId = null; - String reportName = "testrest_subcription_v1"; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportSubscriptionsApi apiInstance = new ReportSubscriptionsApi(apiClient); - apiInstance.deleteSubscription(reportName, organizationId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); -// System.out.println(apiClient.responseBody.toString()); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/Reporting/ReportSubscriptions/GetAllSubscriptions.java b/src/main/java/samples/Reporting/ReportSubscriptions/GetAllSubscriptions.java deleted file mode 100644 index b2f78e9..0000000 --- a/src/main/java/samples/Reporting/ReportSubscriptions/GetAllSubscriptions.java +++ /dev/null @@ -1,63 +0,0 @@ -package samples.Reporting.ReportSubscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetAllSubscriptions { - 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 { - run(); - } - - public static ReportingV3ReportSubscriptionsGet200Response run() { - - String organizationId = null; - - ReportingV3ReportSubscriptionsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportSubscriptionsApi apiInstance = new ReportSubscriptionsApi(apiClient); - result = apiInstance.getAllSubscriptions(organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/ReportSubscriptions/GetSubscriptionForReportName.java b/src/main/java/samples/Reporting/ReportSubscriptions/GetSubscriptionForReportName.java deleted file mode 100644 index 7814375..0000000 --- a/src/main/java/samples/Reporting/ReportSubscriptions/GetSubscriptionForReportName.java +++ /dev/null @@ -1,64 +0,0 @@ -package samples.Reporting.ReportSubscriptions; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetSubscriptionForReportName { - 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 { - run(); - } - - public static ReportingV3ReportSubscriptionsGet200ResponseSubscriptions run() { - String reportName = "testrest_subcription_v1"; - - String organizationId = null; - - ReportingV3ReportSubscriptionsGet200ResponseSubscriptions result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportSubscriptionsApi apiInstance = new ReportSubscriptionsApi(apiClient); - result = apiInstance.getSubscription(reportName, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/Reports/CreateAdhocReport.java b/src/main/java/samples/Reporting/Reports/CreateAdhocReport.java deleted file mode 100644 index cfd24b7..0000000 --- a/src/main/java/samples/Reporting/Reports/CreateAdhocReport.java +++ /dev/null @@ -1,83 +0,0 @@ -package samples.Reporting.Reports; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.io.InputStream; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateAdhocReport { - 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 { - run(); - } - - public static void run() { - - CreateAdhocReportRequest requestObj = new CreateAdhocReportRequest(); - - requestObj.reportDefinitionName("TransactionRequestClass"); - - List reportFields = new ArrayList (); - reportFields.add("Request.RequestID"); - reportFields.add("Request.TransactionDate"); - reportFields.add("Request.MerchantID"); - requestObj.reportFields(reportFields); - - requestObj.reportMimeType("application/xml"); - requestObj.reportName("testrest_v2"); - requestObj.timezone("GMT"); - requestObj.reportStartTime(new DateTime("2020-03-01T17:30:00.000+05:30")); - requestObj.reportEndTime(new DateTime("2020-03-02T17:30:00.000+05:30")); - Reportingv3reportsReportPreferences reportPreferences = new Reportingv3reportsReportPreferences(); - reportPreferences.signedAmounts(true); - reportPreferences.fieldNameConvention("SOAPI"); - requestObj.reportPreferences(reportPreferences); - - String organizationId = "testrest"; - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportsApi apiInstance = new ReportsApi(apiClient); - apiInstance.createReport(requestObj, organizationId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/Reporting/Reports/GetReportBasedOnReportId.java b/src/main/java/samples/Reporting/Reports/GetReportBasedOnReportId.java deleted file mode 100644 index 0f1b22b..0000000 --- a/src/main/java/samples/Reporting/Reports/GetReportBasedOnReportId.java +++ /dev/null @@ -1,63 +0,0 @@ -package samples.Reporting.Reports; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetReportBasedOnReportId { - 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 { - run(); - } - - public static ReportingV3ReportsIdGet200Response run() { - String reportId = "79642c43-2368-0cd5-e053-a2588e0a7b3c"; - String organizationId = "testrest"; - - ReportingV3ReportsIdGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportsApi apiInstance = new ReportsApi(apiClient); - result = apiInstance.getReportByReportId(reportId, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/Reports/RetrieveAvailableReports.java b/src/main/java/samples/Reporting/Reports/RetrieveAvailableReports.java deleted file mode 100644 index 94aeec6..0000000 --- a/src/main/java/samples/Reporting/Reports/RetrieveAvailableReports.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Reporting.Reports; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RetrieveAvailableReports { - 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 { - run(); - } - - public static ReportingV3ReportsGet200Response run() { - - String organizationId = null; - DateTime startTime = new DateTime("2021-04-01T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2021-04-03T23:59:59Z").withZone(DateTimeZone.forID("GMT")); - String timeQueryType = "executedTime"; - String reportMimeType = "application/xml"; - String reportFrequency = null; - String reportName = null; - String reportStatus = null; - - ReportingV3ReportsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ReportsApi apiInstance = new ReportsApi(apiClient); - result = apiInstance.searchReports(startTime, endTime, timeQueryType, organizationId, reportMimeType, reportFrequency, reportName, null, reportStatus); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Reporting/RetrievalDetails/GetRetrievalDetails.java b/src/main/java/samples/Reporting/RetrievalDetails/GetRetrievalDetails.java deleted file mode 100644 index b7f3930..0000000 --- a/src/main/java/samples/Reporting/RetrievalDetails/GetRetrievalDetails.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.Reporting.RetrievalDetails; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetRetrievalDetails { - 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 { - run(); - } - - public static ReportingV3RetrievalDetailsGet200Response run() { - - // QUERY PARAMETERS - String organizationId = "testrest"; - DateTime startTime = new DateTime("2021-08-01T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2021-09-01T23:59:59Z").withZone(DateTimeZone.forID("GMT")); - ReportingV3RetrievalDetailsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - RetrievalDetailsApi apiInstance = new RetrievalDetailsApi(apiClient); - result = apiInstance.getRetrievalDetails(startTime, endTime, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Reporting/RetrievalSummaries/GetRetrievalSummaries.java b/src/main/java/samples/Reporting/RetrievalSummaries/GetRetrievalSummaries.java deleted file mode 100644 index 04966b5..0000000 --- a/src/main/java/samples/Reporting/RetrievalSummaries/GetRetrievalSummaries.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.Reporting.RetrievalSummaries; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetRetrievalSummaries { - 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 { - run(); - } - - public static ReportingV3RetrievalSummariesGet200Response run() { - - // QUERY PARAMETERS - String organizationId = "testrest"; - DateTime startTime = new DateTime("2021-08-01T00:00:00Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2021-09-01T23:59:59Z").withZone(DateTimeZone.forID("GMT")); - ReportingV3RetrievalSummariesGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - RetrievalSummariesApi apiInstance = new RetrievalSummariesApi(apiClient); - result = apiInstance.getRetrievalSummary(startTime, endTime, organizationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/RiskManagement/DecisionManager/AddDataToList.java b/src/main/java/samples/RiskManagement/DecisionManager/AddDataToList.java deleted file mode 100644 index b98803e..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/AddDataToList.java +++ /dev/null @@ -1,100 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AddDataToList { - 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 { - run(); - } - - public static RiskV1UpdatePost201Response run() { - String type = "negative"; - AddNegativeListRequest requestObj = new AddNegativeListRequest(); - - Riskv1liststypeentriesOrderInformation orderInformation = new Riskv1liststypeentriesOrderInformation(); - Riskv1liststypeentriesOrderInformationAddress orderInformationAddress = new Riskv1liststypeentriesOrderInformationAddress(); - orderInformationAddress.address1("1234 Sample St."); - orderInformationAddress.address2("Mountain View"); - orderInformationAddress.locality("California"); - orderInformationAddress.country("US"); - orderInformationAddress.administrativeArea("CA"); - orderInformationAddress.postalCode("94043"); - orderInformation.address(orderInformationAddress); - - Riskv1liststypeentriesOrderInformationBillTo orderInformationBillTo = new Riskv1liststypeentriesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.email("test@example.com"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1liststypeentriesPaymentInformation paymentInformation = new Riskv1liststypeentriesPaymentInformation(); - requestObj.paymentInformation(paymentInformation); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("7891234"); - clientReferenceInformationPartner.solutionId("89012345"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1liststypeentriesRiskInformation riskInformation = new Riskv1liststypeentriesRiskInformation(); - Riskv1liststypeentriesRiskInformationMarkingDetails riskInformationMarkingDetails = new Riskv1liststypeentriesRiskInformationMarkingDetails(); - riskInformationMarkingDetails.action("add"); - riskInformation.markingDetails(riskInformationMarkingDetails); - - requestObj.riskInformation(riskInformation); - - RiskV1UpdatePost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.addNegative(type, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/AddDuplicateInformation.java b/src/main/java/samples/RiskManagement/DecisionManager/AddDuplicateInformation.java deleted file mode 100644 index 51d21dd..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/AddDuplicateInformation.java +++ /dev/null @@ -1,95 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AddDuplicateInformation { - 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 { - run(); - } - - public static RiskV1UpdatePost201Response run() { - String type = "positive"; - AddNegativeListRequest requestObj = new AddNegativeListRequest(); - - Riskv1liststypeentriesOrderInformation orderInformation = new Riskv1liststypeentriesOrderInformation(); - Riskv1liststypeentriesOrderInformationAddress orderInformationAddress = new Riskv1liststypeentriesOrderInformationAddress(); - orderInformationAddress.address1("1234 Sample St."); - orderInformationAddress.address2("Mountain View"); - orderInformationAddress.locality("California"); - orderInformationAddress.country("US"); - orderInformationAddress.administrativeArea("CA"); - orderInformationAddress.postalCode("94043"); - orderInformation.address(orderInformationAddress); - - Riskv1liststypeentriesOrderInformationBillTo orderInformationBillTo = new Riskv1liststypeentriesOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.email("nobody@example.com"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1liststypeentriesPaymentInformation paymentInformation = new Riskv1liststypeentriesPaymentInformation(); - requestObj.paymentInformation(paymentInformation); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1liststypeentriesRiskInformation riskInformation = new Riskv1liststypeentriesRiskInformation(); - Riskv1liststypeentriesRiskInformationMarkingDetails riskInformationMarkingDetails = new Riskv1liststypeentriesRiskInformationMarkingDetails(); - riskInformationMarkingDetails.action("add"); - riskInformation.markingDetails(riskInformationMarkingDetails); - - requestObj.riskInformation(riskInformation); - - RiskV1UpdatePost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.addNegative(type, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/BasicDMTransaction.java b/src/main/java/samples/RiskManagement/DecisionManager/BasicDMTransaction.java deleted file mode 100644 index 8bc0d83..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/BasicDMTransaction.java +++ /dev/null @@ -1,102 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class BasicDMTransaction { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - clientReferenceInformation.comments("decision manager case"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("7891234"); - clientReferenceInformationPartner.solutionId("89012345"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/DMWithBuyerInformation.java b/src/main/java/samples/RiskManagement/DecisionManager/DMWithBuyerInformation.java deleted file mode 100644 index 3e0c46f..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/DMWithBuyerInformation.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DMWithBuyerInformation { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1decisionsBuyerInformation buyerInformation = new Riskv1decisionsBuyerInformation(); - buyerInformation.hashedPassword(""); - buyerInformation.dateOfBirth("19980505"); - - List personalIdentification = new ArrayList (); - Ptsv2paymentsBuyerInformationPersonalIdentification personalIdentification1 = new Ptsv2paymentsBuyerInformationPersonalIdentification(); - personalIdentification1.type("CPF"); - personalIdentification1.id("1a23apwe98"); - personalIdentification.add(personalIdentification1); - - buyerInformation.personalIdentification(personalIdentification); - - requestObj.buyerInformation(buyerInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/DMWithDecisionProfileRejectResponse.java b/src/main/java/samples/RiskManagement/DecisionManager/DMWithDecisionProfileRejectResponse.java deleted file mode 100644 index 90387fa..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/DMWithDecisionProfileRejectResponse.java +++ /dev/null @@ -1,103 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DMWithDecisionProfileRejectResponse { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1decisionsRiskInformation riskInformation = new Riskv1decisionsRiskInformation(); - Ptsv2paymentsRiskInformationProfile riskInformationProfile = new Ptsv2paymentsRiskInformationProfile(); - riskInformationProfile.name("profile2"); - riskInformation.profile(riskInformationProfile); - - requestObj.riskInformation(riskInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/DMWithDeviceInformation.java b/src/main/java/samples/RiskManagement/DecisionManager/DMWithDeviceInformation.java deleted file mode 100644 index 2385587..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/DMWithDeviceInformation.java +++ /dev/null @@ -1,104 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DMWithDeviceInformation { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1decisionsDeviceInformation deviceInformation = new Riskv1decisionsDeviceInformation(); - deviceInformation.cookiesAccepted("yes"); - deviceInformation.ipAddress("64.124.61.215"); - deviceInformation.hostName("host.com"); - deviceInformation.httpBrowserEmail("xyz@gmail.com"); - deviceInformation.userAgent("Chrome"); - requestObj.deviceInformation(deviceInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/DMWithMerchantDefinedInformation.java b/src/main/java/samples/RiskManagement/DecisionManager/DMWithMerchantDefinedInformation.java deleted file mode 100644 index 32c55b2..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/DMWithMerchantDefinedInformation.java +++ /dev/null @@ -1,110 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DMWithMerchantDefinedInformation { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - - List merchantDefinedInformation = new ArrayList (); - Riskv1decisionsMerchantDefinedInformation merchantDefinedInformation1 = new Riskv1decisionsMerchantDefinedInformation(); - merchantDefinedInformation1.key("1"); - merchantDefinedInformation1.value("Test"); - merchantDefinedInformation.add(merchantDefinedInformation1); - - Riskv1decisionsMerchantDefinedInformation merchantDefinedInformation2 = new Riskv1decisionsMerchantDefinedInformation(); - merchantDefinedInformation2.key("2"); - merchantDefinedInformation2.value("Test2"); - merchantDefinedInformation.add(merchantDefinedInformation2); - - requestObj.merchantDefinedInformation(merchantDefinedInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/DMWithScoreExceedsThresholdResponse.java b/src/main/java/samples/RiskManagement/DecisionManager/DMWithScoreExceedsThresholdResponse.java deleted file mode 100644 index 910ccc0..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/DMWithScoreExceedsThresholdResponse.java +++ /dev/null @@ -1,108 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DMWithScoreExceedsThresholdResponse { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationShipTo orderInformationShipTo = new Riskv1decisionsOrderInformationShipTo(); - orderInformationShipTo.address1("96, powers street"); - orderInformationShipTo.address2(""); - orderInformationShipTo.administrativeArea("KA"); - orderInformationShipTo.country("IN"); - orderInformationShipTo.locality("Clearwater milford"); - orderInformationShipTo.firstName("James"); - orderInformationShipTo.lastName("Smith"); - orderInformationShipTo.phoneNumber("7606160717"); - orderInformationShipTo.postalCode("560056"); - orderInformation.shipTo(orderInformationShipTo); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/DMWithShippingInformation.java b/src/main/java/samples/RiskManagement/DecisionManager/DMWithShippingInformation.java deleted file mode 100644 index a523540..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/DMWithShippingInformation.java +++ /dev/null @@ -1,108 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DMWithShippingInformation { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationShipTo orderInformationShipTo = new Riskv1decisionsOrderInformationShipTo(); - orderInformationShipTo.address1("96, powers street"); - orderInformationShipTo.address2(""); - orderInformationShipTo.administrativeArea("KA"); - orderInformationShipTo.country("IN"); - orderInformationShipTo.locality("Clearwater milford"); - orderInformationShipTo.firstName("James"); - orderInformationShipTo.lastName("Smith"); - orderInformationShipTo.phoneNumber("7606160717"); - orderInformationShipTo.postalCode("560056"); - orderInformation.shipTo(orderInformationShipTo); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/DMWithTravelInformation.java b/src/main/java/samples/RiskManagement/DecisionManager/DMWithTravelInformation.java deleted file mode 100644 index 5a21d06..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/DMWithTravelInformation.java +++ /dev/null @@ -1,116 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DMWithTravelInformation { - 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 { - run(); - } - - public static RiskV1DecisionsPost201Response run() { - - CreateBundledDecisionManagerCaseRequest requestObj = new CreateBundledDecisionManagerCaseRequest(); - - Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation(); - clientReferenceInformation.code("54323007"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1decisionsPaymentInformation paymentInformation = new Riskv1decisionsPaymentInformation(); - Riskv1decisionsPaymentInformationCard paymentInformationCard = new Riskv1decisionsPaymentInformationCard(); - paymentInformationCard.number("4444444444444448"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2020"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Riskv1decisionsOrderInformation orderInformation = new Riskv1decisionsOrderInformation(); - Riskv1decisionsOrderInformationAmountDetails orderInformationAmountDetails = new Riskv1decisionsOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformationAmountDetails.totalAmount("144.14"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Riskv1decisionsOrderInformationBillTo orderInformationBillTo = new Riskv1decisionsOrderInformationBillTo(); - orderInformationBillTo.address1("96, powers street"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Clearwater milford"); - orderInformationBillTo.firstName("James"); - orderInformationBillTo.lastName("Smith"); - orderInformationBillTo.phoneNumber("7606160717"); - orderInformationBillTo.email("test@visa.com"); - orderInformationBillTo.postalCode("03055"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - Riskv1decisionsTravelInformation travelInformation = new Riskv1decisionsTravelInformation(); - travelInformation.completeRoute("SFO-JFK:JFK-BLR"); - travelInformation.departureTime("2011-03-20 11:30pm GMT"); - travelInformation.journeyType("One way"); - - List legs = new ArrayList (); - Riskv1decisionsTravelInformationLegs legs1 = new Riskv1decisionsTravelInformationLegs(); - legs1.origination("SFO"); - legs1.destination("JFK"); - legs.add(legs1); - - Riskv1decisionsTravelInformationLegs legs2 = new Riskv1decisionsTravelInformationLegs(); - legs2.origination("JFK"); - legs2.destination("BLR"); - legs.add(legs2); - - travelInformation.legs(legs); - - requestObj.travelInformation(travelInformation); - - RiskV1DecisionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.createBundledDecisionManagerCase(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/MarkAsSuspect.java b/src/main/java/samples/RiskManagement/DecisionManager/MarkAsSuspect.java deleted file mode 100644 index 163712a..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/MarkAsSuspect.java +++ /dev/null @@ -1,87 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class MarkAsSuspect { - 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 { - run(); - } - - public static RiskV1UpdatePost201Response run() { - String id = "5958477995026613304003"; - FraudMarkingActionRequest requestObj = new FraudMarkingActionRequest(); - - Riskv1decisionsidmarkingRiskInformation riskInformation = new Riskv1decisionsidmarkingRiskInformation(); - Riskv1decisionsidmarkingRiskInformationMarkingDetails riskInformationMarkingDetails = new Riskv1decisionsidmarkingRiskInformationMarkingDetails(); - riskInformationMarkingDetails.notes("Adding this transaction as suspect"); - riskInformationMarkingDetails.reason("suspected"); - - List fieldsIncluded = new ArrayList (); - fieldsIncluded.add("customer_email"); - fieldsIncluded.add("customer_phone"); - riskInformationMarkingDetails.fieldsIncluded(fieldsIncluded); - - riskInformationMarkingDetails.action("add"); - riskInformation.markingDetails(riskInformationMarkingDetails); - - requestObj.riskInformation(riskInformation); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("12345"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("1234"); - clientReferenceInformationPartner.solutionId("3321"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - RiskV1UpdatePost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.fraudUpdate(id, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/DecisionManager/RemoveFromHistory.java b/src/main/java/samples/RiskManagement/DecisionManager/RemoveFromHistory.java deleted file mode 100644 index e4993ce..0000000 --- a/src/main/java/samples/RiskManagement/DecisionManager/RemoveFromHistory.java +++ /dev/null @@ -1,73 +0,0 @@ -package samples.RiskManagement.DecisionManager; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RemoveFromHistory { - 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 { - run(); - } - - public static RiskV1UpdatePost201Response run() { - - String id = "5825489395116729903003"; - FraudMarkingActionRequest requestObj = new FraudMarkingActionRequest(); - - Riskv1decisionsidmarkingRiskInformation riskInformation = new Riskv1decisionsidmarkingRiskInformation(); - Riskv1decisionsidmarkingRiskInformationMarkingDetails riskInformationMarkingDetails = new Riskv1decisionsidmarkingRiskInformationMarkingDetails(); - riskInformationMarkingDetails.notes("Adding this transaction as suspect"); - riskInformationMarkingDetails.reason("suspected"); - riskInformationMarkingDetails.action("hide"); - riskInformation.markingDetails(riskInformationMarkingDetails); - - requestObj.riskInformation(riskInformation); - - RiskV1UpdatePost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - DecisionManagerApi apiInstance = new DecisionManagerApi(apiClient); - result = apiInstance.fraudUpdate(id, requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/AddressMatchNotFound.java b/src/main/java/samples/RiskManagement/Verification/AddressMatchNotFound.java deleted file mode 100644 index b527941..0000000 --- a/src/main/java/samples/RiskManagement/Verification/AddressMatchNotFound.java +++ /dev/null @@ -1,80 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class AddressMatchNotFound { - 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 { - run(); - } - - public static RiskV1AddressVerificationsPost201Response run() { - - VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("addressEg"); - clientReferenceInformation.comments("dav-error response check"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1addressverificationsOrderInformation orderInformation = new Riskv1addressverificationsOrderInformation(); - Riskv1addressverificationsOrderInformationBillTo orderInformationBillTo = new Riskv1addressverificationsOrderInformationBillTo(); - orderInformationBillTo.address1("Apt C "); - orderInformationBillTo.address2(""); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Glendale"); - orderInformationBillTo.postalCode("91204"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - RiskV1AddressVerificationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.verifyCustomerAddress(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/ApartmentNumberMissingOrNotFound.java b/src/main/java/samples/RiskManagement/Verification/ApartmentNumberMissingOrNotFound.java deleted file mode 100644 index 84607f7..0000000 --- a/src/main/java/samples/RiskManagement/Verification/ApartmentNumberMissingOrNotFound.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ApartmentNumberMissingOrNotFound { - 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 { - run(); - } - - public static RiskV1AddressVerificationsPost201Response run() { - - VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("addressEg"); - clientReferenceInformation.comments("dav-error response check"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1addressverificationsOrderInformation orderInformation = new Riskv1addressverificationsOrderInformation(); - Riskv1addressverificationsOrderInformationBillTo orderInformationBillTo = new Riskv1addressverificationsOrderInformationBillTo(); - orderInformationBillTo.address1("6th 4th ave"); - orderInformationBillTo.address2(""); - orderInformationBillTo.administrativeArea("NY"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("rensslaer"); - orderInformationBillTo.postalCode("12144"); - orderInformation.billTo(orderInformationBillTo); - - - List lineItems = new ArrayList (); - Riskv1addressverificationsOrderInformationLineItems lineItems1 = new Riskv1addressverificationsOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("996633"); - lineItems1.productName("qwerty"); - lineItems1.productCode("handling"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - RiskV1AddressVerificationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.verifyCustomerAddress(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/CanadianBillingDetails.java b/src/main/java/samples/RiskManagement/Verification/CanadianBillingDetails.java deleted file mode 100644 index e55ceb8..0000000 --- a/src/main/java/samples/RiskManagement/Verification/CanadianBillingDetails.java +++ /dev/null @@ -1,98 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CanadianBillingDetails { - 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 { - run(); - } - - public static RiskV1AddressVerificationsPost201Response run() { - - VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("addressEg"); - clientReferenceInformation.comments("dav-All fields"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1addressverificationsOrderInformation orderInformation = new Riskv1addressverificationsOrderInformation(); - Riskv1addressverificationsOrderInformationBillTo orderInformationBillTo = new Riskv1addressverificationsOrderInformationBillTo(); - orderInformationBillTo.address1("1650 Burton Ave"); - orderInformationBillTo.address2(""); - orderInformationBillTo.address3(""); - orderInformationBillTo.address4(""); - orderInformationBillTo.administrativeArea("BC"); - orderInformationBillTo.country("CA"); - orderInformationBillTo.locality("VICTORIA"); - orderInformationBillTo.postalCode("V8T 2N6"); - orderInformation.billTo(orderInformationBillTo); - - - List lineItems = new ArrayList (); - Riskv1addressverificationsOrderInformationLineItems lineItems1 = new Riskv1addressverificationsOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("9966223"); - lineItems1.productName("headset"); - lineItems1.productCode("electronic"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1addressverificationsBuyerInformation buyerInformation = new Riskv1addressverificationsBuyerInformation(); - buyerInformation.merchantCustomerId("ABCD"); - requestObj.buyerInformation(buyerInformation); - - RiskV1AddressVerificationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.verifyCustomerAddress(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/ComplianceStatusCompleted.java b/src/main/java/samples/RiskManagement/Verification/ComplianceStatusCompleted.java deleted file mode 100644 index a2492b4..0000000 --- a/src/main/java/samples/RiskManagement/Verification/ComplianceStatusCompleted.java +++ /dev/null @@ -1,117 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ComplianceStatusCompleted { - 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 { - run(); - } - - public static RiskV1ExportComplianceInquiriesPost201Response run() { - - ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("verification example"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1exportcomplianceinquiriesOrderInformation orderInformation = new Riskv1exportcomplianceinquiriesOrderInformation(); - Riskv1exportcomplianceinquiriesOrderInformationBillTo orderInformationBillTo = new Riskv1exportcomplianceinquiriesOrderInformationBillTo(); - orderInformationBillTo.address1("901 Metro Centre Blvd"); - orderInformationBillTo.address2("2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.postalCode("94404"); - orderInformationBillTo.firstName("Suman"); - orderInformationBillTo.lastName("Kumar"); - orderInformationBillTo.email("donewithhorizon@test.com"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1exportcomplianceinquiriesOrderInformationShipTo orderInformationShipTo = new Riskv1exportcomplianceinquiriesOrderInformationShipTo(); - orderInformationShipTo.country("be"); - orderInformationShipTo.firstName("DumbelDore"); - orderInformationShipTo.lastName("Albus"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1exportcomplianceinquiriesOrderInformationLineItems lineItems1 = new Riskv1exportcomplianceinquiriesOrderInformationLineItems(); - lineItems1.unitPrice("19.00"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1addressverificationsBuyerInformation buyerInformation = new Riskv1addressverificationsBuyerInformation(); - buyerInformation.merchantCustomerId("87789"); - requestObj.buyerInformation(buyerInformation); - - Riskv1exportcomplianceinquiriesExportComplianceInformation exportComplianceInformation = new Riskv1exportcomplianceinquiriesExportComplianceInformation(); - exportComplianceInformation.addressOperator("and"); - Ptsv2paymentsWatchlistScreeningInformationWeights exportComplianceInformationWeights = new Ptsv2paymentsWatchlistScreeningInformationWeights(); - exportComplianceInformationWeights.address("abc"); - exportComplianceInformationWeights.company("def"); - exportComplianceInformationWeights.name("adb"); - exportComplianceInformation.weights(exportComplianceInformationWeights); - - - List sanctionLists = new ArrayList (); - sanctionLists.add("abc"); - sanctionLists.add("acc"); - sanctionLists.add("bac"); - exportComplianceInformation.sanctionLists(sanctionLists); - - requestObj.exportComplianceInformation(exportComplianceInformation); - - RiskV1ExportComplianceInquiriesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.validateExportCompliance(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/CustomerMatchDeniedPartiesList.java b/src/main/java/samples/RiskManagement/Verification/CustomerMatchDeniedPartiesList.java deleted file mode 100644 index eb4f350..0000000 --- a/src/main/java/samples/RiskManagement/Verification/CustomerMatchDeniedPartiesList.java +++ /dev/null @@ -1,109 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CustomerMatchDeniedPartiesList { - 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 { - run(); - } - - public static RiskV1ExportComplianceInquiriesPost201Response run() { - - ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("verification example"); - clientReferenceInformation.comments("Export-basic"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("7891234"); - clientReferenceInformationPartner.solutionId("89012345"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1exportcomplianceinquiriesOrderInformation orderInformation = new Riskv1exportcomplianceinquiriesOrderInformation(); - Riskv1exportcomplianceinquiriesOrderInformationBillTo orderInformationBillTo = new Riskv1exportcomplianceinquiriesOrderInformationBillTo(); - orderInformationBillTo.address1("901 Metro Centre Blvd"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.postalCode("94404"); - Riskv1exportcomplianceinquiriesOrderInformationBillToCompany orderInformationBillToCompany = new Riskv1exportcomplianceinquiriesOrderInformationBillToCompany(); - orderInformationBillToCompany.name("A & C International Trade, Inc"); - orderInformationBillTo.company(orderInformationBillToCompany); - - orderInformationBillTo.firstName("ANDREE"); - orderInformationBillTo.lastName("AGNESE"); - orderInformationBillTo.email("test@domain.com"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1exportcomplianceinquiriesOrderInformationShipTo orderInformationShipTo = new Riskv1exportcomplianceinquiriesOrderInformationShipTo(); - orderInformationShipTo.country("IN"); - orderInformationShipTo.firstName("DumbelDore"); - orderInformationShipTo.lastName("Albus"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1exportcomplianceinquiriesOrderInformationLineItems lineItems1 = new Riskv1exportcomplianceinquiriesOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("123456"); - lineItems1.productName("Qwe"); - lineItems1.productCode("physical_software"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - RiskV1ExportComplianceInquiriesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.validateExportCompliance(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/ExportComplianceInformationProvided.java b/src/main/java/samples/RiskManagement/Verification/ExportComplianceInformationProvided.java deleted file mode 100644 index 7668fdc..0000000 --- a/src/main/java/samples/RiskManagement/Verification/ExportComplianceInformationProvided.java +++ /dev/null @@ -1,119 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ExportComplianceInformationProvided { - 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 { - run(); - } - - public static RiskV1ExportComplianceInquiriesPost201Response run() { - - ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("verification example"); - clientReferenceInformation.comments("Export -fields"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1exportcomplianceinquiriesOrderInformation orderInformation = new Riskv1exportcomplianceinquiriesOrderInformation(); - Riskv1exportcomplianceinquiriesOrderInformationBillTo orderInformationBillTo = new Riskv1exportcomplianceinquiriesOrderInformationBillTo(); - orderInformationBillTo.address1("901 Metro Centre Blvd"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.postalCode("94404"); - Riskv1exportcomplianceinquiriesOrderInformationBillToCompany orderInformationBillToCompany = new Riskv1exportcomplianceinquiriesOrderInformationBillToCompany(); - orderInformationBillToCompany.name("A & C International Trade, Inc"); - orderInformationBillTo.company(orderInformationBillToCompany); - - orderInformationBillTo.firstName("ANDREE"); - orderInformationBillTo.lastName("AGNESE"); - orderInformationBillTo.email("test@domain.com"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1exportcomplianceinquiriesOrderInformationShipTo orderInformationShipTo = new Riskv1exportcomplianceinquiriesOrderInformationShipTo(); - orderInformationShipTo.country("IN"); - orderInformationShipTo.firstName("DumbelDore"); - orderInformationShipTo.lastName("Albus"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1exportcomplianceinquiriesOrderInformationLineItems lineItems1 = new Riskv1exportcomplianceinquiriesOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("123456"); - lineItems1.productName("Qwe"); - lineItems1.productCode("physical_software"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1exportcomplianceinquiriesExportComplianceInformation exportComplianceInformation = new Riskv1exportcomplianceinquiriesExportComplianceInformation(); - exportComplianceInformation.addressOperator("and"); - Ptsv2paymentsWatchlistScreeningInformationWeights exportComplianceInformationWeights = new Ptsv2paymentsWatchlistScreeningInformationWeights(); - exportComplianceInformationWeights.address("low"); - exportComplianceInformationWeights.company("exact"); - exportComplianceInformationWeights.name("exact"); - exportComplianceInformation.weights(exportComplianceInformationWeights); - - - List sanctionLists = new ArrayList (); - sanctionLists.add("Bureau Of Industry and Security"); - exportComplianceInformation.sanctionLists(sanctionLists); - - requestObj.exportComplianceInformation(exportComplianceInformation); - - RiskV1ExportComplianceInquiriesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.validateExportCompliance(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/MultipleLineItems.java b/src/main/java/samples/RiskManagement/Verification/MultipleLineItems.java deleted file mode 100644 index 5c0d156..0000000 --- a/src/main/java/samples/RiskManagement/Verification/MultipleLineItems.java +++ /dev/null @@ -1,117 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class MultipleLineItems { - 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 { - run(); - } - - public static RiskV1AddressVerificationsPost201Response run() { - - VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("addressEg"); - clientReferenceInformation.comments("dav-All fields"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1addressverificationsOrderInformation orderInformation = new Riskv1addressverificationsOrderInformation(); - Riskv1addressverificationsOrderInformationBillTo orderInformationBillTo = new Riskv1addressverificationsOrderInformationBillTo(); - orderInformationBillTo.address1("12301 research st"); - orderInformationBillTo.address2("1"); - orderInformationBillTo.address3("2"); - orderInformationBillTo.address4("3"); - orderInformationBillTo.administrativeArea("TX"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Austin"); - orderInformationBillTo.postalCode("78759"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1addressverificationsOrderInformationShipTo orderInformationShipTo = new Riskv1addressverificationsOrderInformationShipTo(); - orderInformationShipTo.address1("PO Box 9088"); - orderInformationShipTo.address2(""); - orderInformationShipTo.address3(""); - orderInformationShipTo.address4(""); - orderInformationShipTo.administrativeArea("CA"); - orderInformationShipTo.country("US"); - orderInformationShipTo.locality("San Jose"); - orderInformationShipTo.postalCode("95132"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1addressverificationsOrderInformationLineItems lineItems1 = new Riskv1addressverificationsOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("9966223"); - lineItems1.productName("headset"); - lineItems1.productCode("electronix"); - lineItems.add(lineItems1); - - Riskv1addressverificationsOrderInformationLineItems lineItems2 = new Riskv1addressverificationsOrderInformationLineItems(); - lineItems2.unitPrice("10.50"); - lineItems2.quantity(2); - lineItems2.productSKU("9966226"); - lineItems2.productName("wwrdf"); - lineItems2.productCode("electronic"); - lineItems.add(lineItems2); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1addressverificationsBuyerInformation buyerInformation = new Riskv1addressverificationsBuyerInformation(); - buyerInformation.merchantCustomerId("QWERTY"); - requestObj.buyerInformation(buyerInformation); - - RiskV1AddressVerificationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.verifyCustomerAddress(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/MultipleSanctionLists.java b/src/main/java/samples/RiskManagement/Verification/MultipleSanctionLists.java deleted file mode 100644 index f40e84c..0000000 --- a/src/main/java/samples/RiskManagement/Verification/MultipleSanctionLists.java +++ /dev/null @@ -1,133 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class MultipleSanctionLists { - 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 { - run(); - } - - public static RiskV1ExportComplianceInquiriesPost201Response run() { - - ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("verification example"); - clientReferenceInformation.comments("All fields"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1exportcomplianceinquiriesOrderInformation orderInformation = new Riskv1exportcomplianceinquiriesOrderInformation(); - Riskv1exportcomplianceinquiriesOrderInformationBillTo orderInformationBillTo = new Riskv1exportcomplianceinquiriesOrderInformationBillTo(); - orderInformationBillTo.address1("901 Metro Centre Blvd"); - orderInformationBillTo.address2(" "); - orderInformationBillTo.address3(""); - orderInformationBillTo.address4("Foster City"); - orderInformationBillTo.administrativeArea("NH"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("CA"); - orderInformationBillTo.postalCode("03055"); - Riskv1exportcomplianceinquiriesOrderInformationBillToCompany orderInformationBillToCompany = new Riskv1exportcomplianceinquiriesOrderInformationBillToCompany(); - orderInformationBillToCompany.name("A & C International Trade, Inc."); - orderInformationBillTo.company(orderInformationBillToCompany); - - orderInformationBillTo.firstName("Suman"); - orderInformationBillTo.lastName("Kumar"); - orderInformationBillTo.email("test@domain.com"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1exportcomplianceinquiriesOrderInformationShipTo orderInformationShipTo = new Riskv1exportcomplianceinquiriesOrderInformationShipTo(); - orderInformationShipTo.country("IN"); - orderInformationShipTo.firstName("DumbelDore"); - orderInformationShipTo.lastName("Albus"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1exportcomplianceinquiriesOrderInformationLineItems lineItems1 = new Riskv1exportcomplianceinquiriesOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("610009"); - lineItems1.productName("Xer"); - lineItems1.productCode("physical_software"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1addressverificationsBuyerInformation buyerInformation = new Riskv1addressverificationsBuyerInformation(); - buyerInformation.merchantCustomerId("Export1"); - requestObj.buyerInformation(buyerInformation); - - Riskv1exportcomplianceinquiriesDeviceInformation deviceInformation = new Riskv1exportcomplianceinquiriesDeviceInformation(); - deviceInformation.ipAddress("127.0.0.1"); - deviceInformation.hostName("www.cybersource.ir"); - requestObj.deviceInformation(deviceInformation); - - Riskv1exportcomplianceinquiriesExportComplianceInformation exportComplianceInformation = new Riskv1exportcomplianceinquiriesExportComplianceInformation(); - exportComplianceInformation.addressOperator("and"); - Ptsv2paymentsWatchlistScreeningInformationWeights exportComplianceInformationWeights = new Ptsv2paymentsWatchlistScreeningInformationWeights(); - exportComplianceInformationWeights.address("low"); - exportComplianceInformationWeights.company("exact"); - exportComplianceInformationWeights.name("exact"); - exportComplianceInformation.weights(exportComplianceInformationWeights); - - - List sanctionLists = new ArrayList (); - sanctionLists.add("Bureau Of Industry and Security"); - sanctionLists.add("DOS_DTC"); - sanctionLists.add("AUSTRALIA"); - exportComplianceInformation.sanctionLists(sanctionLists); - - requestObj.exportComplianceInformation(exportComplianceInformation); - - RiskV1ExportComplianceInquiriesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.validateExportCompliance(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/NoCompanyName.java b/src/main/java/samples/RiskManagement/Verification/NoCompanyName.java deleted file mode 100644 index 5dc71a7..0000000 --- a/src/main/java/samples/RiskManagement/Verification/NoCompanyName.java +++ /dev/null @@ -1,100 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class NoCompanyName { - 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 { - run(); - } - - public static RiskV1ExportComplianceInquiriesPost201Response run() { - - ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("verification example"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1exportcomplianceinquiriesOrderInformation orderInformation = new Riskv1exportcomplianceinquiriesOrderInformation(); - Riskv1exportcomplianceinquiriesOrderInformationBillTo orderInformationBillTo = new Riskv1exportcomplianceinquiriesOrderInformationBillTo(); - orderInformationBillTo.address1("901 Metro Centre Blvd"); - orderInformationBillTo.address2("2"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Foster City"); - orderInformationBillTo.postalCode("94404"); - orderInformationBillTo.firstName("Suman"); - orderInformationBillTo.lastName("Kumar"); - orderInformationBillTo.email("donewithhorizon@test.com"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1exportcomplianceinquiriesOrderInformationShipTo orderInformationShipTo = new Riskv1exportcomplianceinquiriesOrderInformationShipTo(); - orderInformationShipTo.country("be"); - orderInformationShipTo.firstName("DumbelDore"); - orderInformationShipTo.lastName("Albus"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1exportcomplianceinquiriesOrderInformationLineItems lineItems1 = new Riskv1exportcomplianceinquiriesOrderInformationLineItems(); - lineItems1.unitPrice("19.00"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1addressverificationsBuyerInformation buyerInformation = new Riskv1addressverificationsBuyerInformation(); - buyerInformation.merchantCustomerId("87789"); - requestObj.buyerInformation(buyerInformation); - - RiskV1ExportComplianceInquiriesPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.validateExportCompliance(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/ShippingDetailsNotUSOrCanada.java b/src/main/java/samples/RiskManagement/Verification/ShippingDetailsNotUSOrCanada.java deleted file mode 100644 index 1d4688c..0000000 --- a/src/main/java/samples/RiskManagement/Verification/ShippingDetailsNotUSOrCanada.java +++ /dev/null @@ -1,109 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ShippingDetailsNotUSOrCanada { - 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 { - run(); - } - - public static RiskV1AddressVerificationsPost201Response run() { - - VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("addressEg"); - clientReferenceInformation.comments("dav-All fields"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1addressverificationsOrderInformation orderInformation = new Riskv1addressverificationsOrderInformation(); - Riskv1addressverificationsOrderInformationBillTo orderInformationBillTo = new Riskv1addressverificationsOrderInformationBillTo(); - orderInformationBillTo.address1("12301 research st"); - orderInformationBillTo.address2("1"); - orderInformationBillTo.address3("2"); - orderInformationBillTo.address4("3"); - orderInformationBillTo.administrativeArea("TX"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Austin"); - orderInformationBillTo.postalCode("78759"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1addressverificationsOrderInformationShipTo orderInformationShipTo = new Riskv1addressverificationsOrderInformationShipTo(); - orderInformationShipTo.address1("4R.ILHA TERCEIRA,232-R/C-ESQ"); - orderInformationShipTo.address2(" "); - orderInformationShipTo.address3(""); - orderInformationShipTo.address4(""); - orderInformationShipTo.administrativeArea("WI"); - orderInformationShipTo.country("PT"); - orderInformationShipTo.locality("Carcavelos"); - orderInformationShipTo.postalCode("29681"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1addressverificationsOrderInformationLineItems lineItems1 = new Riskv1addressverificationsOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("9966223"); - lineItems1.productName("headset"); - lineItems1.productCode("electronic"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1addressverificationsBuyerInformation buyerInformation = new Riskv1addressverificationsBuyerInformation(); - buyerInformation.merchantCustomerId("ABCD"); - requestObj.buyerInformation(buyerInformation); - - RiskV1AddressVerificationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.verifyCustomerAddress(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/RiskManagement/Verification/VerboseRequestWithAllFields.java b/src/main/java/samples/RiskManagement/Verification/VerboseRequestWithAllFields.java deleted file mode 100644 index 22ffcc2..0000000 --- a/src/main/java/samples/RiskManagement/Verification/VerboseRequestWithAllFields.java +++ /dev/null @@ -1,114 +0,0 @@ -package samples.RiskManagement.Verification; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class VerboseRequestWithAllFields { - 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 { - run(); - } - - public static RiskV1AddressVerificationsPost201Response run() { - - VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest(); - - Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation(); - clientReferenceInformation.code("addressEg"); - clientReferenceInformation.comments("dav-All fields"); - Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner(); - clientReferenceInformationPartner.developerId("7891234"); - clientReferenceInformationPartner.solutionId("89012345"); - clientReferenceInformation.partner(clientReferenceInformationPartner); - - requestObj.clientReferenceInformation(clientReferenceInformation); - - Riskv1addressverificationsOrderInformation orderInformation = new Riskv1addressverificationsOrderInformation(); - Riskv1addressverificationsOrderInformationBillTo orderInformationBillTo = new Riskv1addressverificationsOrderInformationBillTo(); - orderInformationBillTo.address1("12301 research st"); - orderInformationBillTo.address2("1"); - orderInformationBillTo.address3("2"); - orderInformationBillTo.address4("3"); - orderInformationBillTo.administrativeArea("TX"); - orderInformationBillTo.country("US"); - orderInformationBillTo.locality("Austin"); - orderInformationBillTo.postalCode("78759"); - orderInformation.billTo(orderInformationBillTo); - - Riskv1addressverificationsOrderInformationShipTo orderInformationShipTo = new Riskv1addressverificationsOrderInformationShipTo(); - orderInformationShipTo.address1("1715 oaks apt # 7"); - orderInformationShipTo.address2(" "); - orderInformationShipTo.address3(""); - orderInformationShipTo.address4(""); - orderInformationShipTo.administrativeArea("WI"); - orderInformationShipTo.country("US"); - orderInformationShipTo.locality("SUPERIOR"); - orderInformationShipTo.postalCode("29681"); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Riskv1addressverificationsOrderInformationLineItems lineItems1 = new Riskv1addressverificationsOrderInformationLineItems(); - lineItems1.unitPrice("120.50"); - lineItems1.quantity(3); - lineItems1.productSKU("9966223"); - lineItems1.productName("headset"); - lineItems1.productCode("electronic"); - lineItems.add(lineItems1); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Riskv1addressverificationsBuyerInformation buyerInformation = new Riskv1addressverificationsBuyerInformation(); - buyerInformation.merchantCustomerId("ABCD"); - requestObj.buyerInformation(buyerInformation); - - RiskV1AddressVerificationsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - VerificationApi apiInstance = new VerificationApi(apiClient); - result = apiInstance.verifyCustomerAddress(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/SecureFileShare/DownloadFileWithFileIdentifier.java b/src/main/java/samples/SecureFileShare/DownloadFileWithFileIdentifier.java deleted file mode 100644 index 73f7051..0000000 --- a/src/main/java/samples/SecureFileShare/DownloadFileWithFileIdentifier.java +++ /dev/null @@ -1,99 +0,0 @@ -package samples.SecureFileShare; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileWriter; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.util.Properties; - -import java.math.BigDecimal; - -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class DownloadFileWithFileIdentifier { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static String resourceFile = "DownloadedFileWithFileID"; - private static final String FILE_PATH = "src/main/resources/"; - private static String responseBody = null; - - 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 { - run(); - } - - public static void run() { - String fileId = "Q2hhcmdlYmFja0FuZFJldHJpZXZhbFJlcG9ydC1hYWVkMWEwMS03OGNhLTU1YzgtZTA1My1hMjU4OGUwYWNhZWEuY3N2LTIwMjAtMDctMzA="; - String organizationId = "testrest"; - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SecureFileShareApi apiInstance = new SecureFileShareApi(apiClient); - ApiResponse responseStream = apiInstance.getFileWithHttpInfo(fileId, organizationId); - - // START : FILE DOWNLOAD FUNCTIONALITY - - String contentType = responseStream.getHeaders().get("Content-Type").get(0); - - String fileExtension = "csv"; - - if (contentType.contains("json")) { - fileExtension = contentType.substring(contentType.length() - 4); - } else { - fileExtension = contentType.substring(contentType.length() - 3); - } - - File targetFile = new File(FILE_PATH + resourceFile + "." + fileExtension); - - FileUtils.copyInputStreamToFile(responseStream.getData(), targetFile); - - // END : FILE DOWNLOAD FUNCTIONALITY - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - - System.out.println("File Downloaded at the following location : "); - System.out.println(new File(FILE_PATH + resourceFile + "." + fileExtension).getAbsolutePath()); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/SecureFileShare/GetListOfFiles.java b/src/main/java/samples/SecureFileShare/GetListOfFiles.java deleted file mode 100644 index 1cfbcf8..0000000 --- a/src/main/java/samples/SecureFileShare/GetListOfFiles.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.SecureFileShare; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetListOfFiles { - 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 { - run(); - } - - public static V1FileDetailsGet200Response run() { - - LocalDate startDate = new LocalDate("2020-07-20"); - LocalDate endDate = new LocalDate("2020-07-30"); - String organizationId = "testrest"; - - V1FileDetailsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SecureFileShareApi apiInstance = new SecureFileShareApi(apiClient); - result = apiInstance.getFileDetail(startDate, endDate, organizationId, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/Customer/CreateCustomer.java b/src/main/java/samples/TokenManagement/Customer/CreateCustomer.java deleted file mode 100644 index d57b046..0000000 --- a/src/main/java/samples/TokenManagement/Customer/CreateCustomer.java +++ /dev/null @@ -1,74 +0,0 @@ -package samples.TokenManagement.Customer; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateCustomer { - 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 PostCustomerRequest run() { - - PostCustomerRequest requestObj = new PostCustomerRequest(); - - Tmsv2customersBuyerInformation buyerInformation = new Tmsv2customersBuyerInformation(); - buyerInformation.merchantCustomerID("Your customer identifier"); - buyerInformation.email("test@cybs.com"); - requestObj.buyerInformation(buyerInformation); - - Tmsv2customersClientReferenceInformation clientReferenceInformation = new Tmsv2customersClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - - List merchantDefinedInformation = new ArrayList (); - Tmsv2customersMerchantDefinedInformation merchantDefinedInformation1 = new Tmsv2customersMerchantDefinedInformation(); - merchantDefinedInformation1.name("data1"); - merchantDefinedInformation1.value("Your customer data"); - merchantDefinedInformation.add(merchantDefinedInformation1); - - requestObj.merchantDefinedInformation(merchantDefinedInformation); - - PostCustomerRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerApi apiInstance = new CustomerApi(apiClient); - result = apiInstance.postCustomer(requestObj, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/Customer/DeleteCustomer.java b/src/main/java/samples/TokenManagement/Customer/DeleteCustomer.java deleted file mode 100644 index b802715..0000000 --- a/src/main/java/samples/TokenManagement/Customer/DeleteCustomer.java +++ /dev/null @@ -1,59 +0,0 @@ -package samples.TokenManagement.Customer; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DeleteCustomer { - 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 void run() { - String customerTokenId = CreateCustomer.run().getId(); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerApi apiInstance = new CustomerApi(apiClient); - apiInstance.deleteCustomer(customerTokenId, null); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/TokenManagement/Customer/RetrieveCustomer.java b/src/main/java/samples/TokenManagement/Customer/RetrieveCustomer.java deleted file mode 100644 index ef7e0bd..0000000 --- a/src/main/java/samples/TokenManagement/Customer/RetrieveCustomer.java +++ /dev/null @@ -1,55 +0,0 @@ -package samples.TokenManagement.Customer; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RetrieveCustomer { - 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 PostCustomerRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PostCustomerRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerApi apiInstance = new CustomerApi(apiClient); - result = apiInstance.getCustomer(customerTokenId, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/Customer/UpdateCustomer.java b/src/main/java/samples/TokenManagement/Customer/UpdateCustomer.java deleted file mode 100644 index e107927..0000000 --- a/src/main/java/samples/TokenManagement/Customer/UpdateCustomer.java +++ /dev/null @@ -1,75 +0,0 @@ -package samples.TokenManagement.Customer; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class UpdateCustomer { - 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 PatchCustomerRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PatchCustomerRequest requestObj = new PatchCustomerRequest(); - - Tmsv2customersBuyerInformation buyerInformation = new Tmsv2customersBuyerInformation(); - buyerInformation.merchantCustomerID("Your customer identifier"); - buyerInformation.email("test@cybs.com"); - requestObj.buyerInformation(buyerInformation); - - Tmsv2customersClientReferenceInformation clientReferenceInformation = new Tmsv2customersClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - - List merchantDefinedInformation = new ArrayList (); - Tmsv2customersMerchantDefinedInformation merchantDefinedInformation1 = new Tmsv2customersMerchantDefinedInformation(); - merchantDefinedInformation1.name("data1"); - merchantDefinedInformation1.value("Your customer data"); - merchantDefinedInformation.add(merchantDefinedInformation1); - - requestObj.merchantDefinedInformation(merchantDefinedInformation); - - PatchCustomerRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerApi apiInstance = new CustomerApi(apiClient); - result = apiInstance.patchCustomer(customerTokenId, requestObj, null, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.java b/src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.java deleted file mode 100644 index af3ca2d..0000000 --- a/src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.TokenManagement.Customer; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class UpdateCustomersDefaultPaymentInstrument { - 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 PatchCustomerRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PatchCustomerRequest requestObj = new PatchCustomerRequest(); - - Tmsv2customersDefaultPaymentInstrument defaultPaymentInstrument = new Tmsv2customersDefaultPaymentInstrument(); - defaultPaymentInstrument.id("AB6A54B982A6FCB6E05341588E0A3935"); - requestObj.defaultPaymentInstrument(defaultPaymentInstrument); - - PatchCustomerRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerApi apiInstance = new CustomerApi(apiClient); - result = apiInstance.patchCustomer(customerTokenId, requestObj, null, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.java b/src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.java deleted file mode 100644 index 3ceb3fe..0000000 --- a/src/main/java/samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.java +++ /dev/null @@ -1,61 +0,0 @@ -package samples.TokenManagement.Customer; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class UpdateCustomersDefaultShippingAddress { - 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 PatchCustomerRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PatchCustomerRequest requestObj = new PatchCustomerRequest(); - - Tmsv2customersDefaultShippingAddress defaultShippingAddress = new Tmsv2customersDefaultShippingAddress(); - defaultShippingAddress.id("AB6A54B97C00FCB6E05341588E0A3935"); - requestObj.defaultShippingAddress(defaultShippingAddress); - - PatchCustomerRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerApi apiInstance = new CustomerApi(apiClient); - result = apiInstance.patchCustomer(customerTokenId, requestObj, null, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.java b/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.java deleted file mode 100644 index 2b566fd..0000000 --- a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.java +++ /dev/null @@ -1,80 +0,0 @@ -package samples.TokenManagement.CustomerPaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateCustomerDefaultPaymentInstrumentCard { - 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 { - run(); - } - public static PostCustomerPaymentInstrumentRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PostCustomerPaymentInstrumentRequest requestObj = new PostCustomerPaymentInstrumentRequest(); - - requestObj._default(true); - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.type("001"); - requestObj.card(card); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("John"); - billTo.lastName("Doe"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("test@cybs.com"); - billTo.phoneNumber("4158880000"); - requestObj.billTo(billTo); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("7010000000016241111"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PostCustomerPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerPaymentInstrumentApi apiInstance = new CustomerPaymentInstrumentApi(apiClient); - result = apiInstance.postCustomerPaymentInstrument(customerTokenId, requestObj, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.java b/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.java deleted file mode 100644 index ddd8058..0000000 --- a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.java +++ /dev/null @@ -1,80 +0,0 @@ -package samples.TokenManagement.CustomerPaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateCustomerNonDefaultPaymentInstrumentCard { - 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 { - run(); - } - public static PostCustomerPaymentInstrumentRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PostCustomerPaymentInstrumentRequest requestObj = new PostCustomerPaymentInstrumentRequest(); - - requestObj._default(false); - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.type("001"); - requestObj.card(card); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("John"); - billTo.lastName("Doe"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("test@cybs.com"); - billTo.phoneNumber("4158880000"); - requestObj.billTo(billTo); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("7010000000016241111"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PostCustomerPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerPaymentInstrumentApi apiInstance = new CustomerPaymentInstrumentApi(apiClient); - result = apiInstance.postCustomerPaymentInstrument(customerTokenId, requestObj, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.java b/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.java deleted file mode 100644 index 3f35622..0000000 --- a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.java +++ /dev/null @@ -1,105 +0,0 @@ -package samples.TokenManagement.CustomerPaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import org.joda.time.LocalDate; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateCustomerPaymentInstrumentBankAccount { - 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 { - run(); - } - public static PostCustomerPaymentInstrumentRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PostCustomerPaymentInstrumentRequest requestObj = new PostCustomerPaymentInstrumentRequest(); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount(); - bankAccount.type("savings"); - requestObj.bankAccount(bankAccount); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformation buyerInformation = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformation(); - buyerInformation.companyTaxID("12345"); - buyerInformation.currency("USD"); - buyerInformation.dateOfBirth(new LocalDate("2000-12-13")); - - List personalIdentification = new ArrayList (); - Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification personalIdentification1 = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification(); - personalIdentification1.id("57684432111321"); - personalIdentification1.type("driver license"); - Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy issuedBy1 = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy(); - issuedBy1.administrativeArea("CA"); - personalIdentification1.issuedBy(issuedBy1); - - personalIdentification.add(personalIdentification1); - - buyerInformation.personalIdentification(personalIdentification); - - requestObj.buyerInformation(buyerInformation); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("John"); - billTo.lastName("Doe"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("test@cybs.com"); - billTo.phoneNumber("4158880000"); - requestObj.billTo(billTo); - - TmsPaymentInstrumentProcessingInfo processingInformation = new TmsPaymentInstrumentProcessingInfo(); - TmsPaymentInstrumentProcessingInfoBankTransferOptions processingInformationBankTransferOptions = new TmsPaymentInstrumentProcessingInfoBankTransferOptions(); - processingInformationBankTransferOptions.seCCode("WEB"); - processingInformation.bankTransferOptions(processingInformationBankTransferOptions); - - requestObj.processingInformation(processingInformation); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("A7A91A2CA872B272E05340588D0A0699"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PostCustomerPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerPaymentInstrumentApi apiInstance = new CustomerPaymentInstrumentApi(apiClient); - result = apiInstance.postCustomerPaymentInstrument(customerTokenId, requestObj, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.java b/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.java deleted file mode 100644 index 58148b0..0000000 --- a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.java +++ /dev/null @@ -1,83 +0,0 @@ -package samples.TokenManagement.CustomerPaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateCustomerPaymentInstrumentPinlessDebit { - 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 { - run(); - } - public static PostCustomerPaymentInstrumentRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PostCustomerPaymentInstrumentRequest requestObj = new PostCustomerPaymentInstrumentRequest(); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.type("001"); - card.issueNumber("01"); - card.startMonth("01"); - card.startYear("2020"); - card.useAs("pinless debit"); - requestObj.card(card); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("John"); - billTo.lastName("Doe"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("test@cybs.com"); - billTo.phoneNumber("4158880000"); - requestObj.billTo(billTo); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("7010000000016241111"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PostCustomerPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerPaymentInstrumentApi apiInstance = new CustomerPaymentInstrumentApi(apiClient); - result = apiInstance.postCustomerPaymentInstrument(customerTokenId, requestObj, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/DeleteCustomerPaymentInstrument.java b/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/DeleteCustomerPaymentInstrument.java deleted file mode 100644 index 76d2b46..0000000 --- a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/DeleteCustomerPaymentInstrument.java +++ /dev/null @@ -1,59 +0,0 @@ -package samples.TokenManagement.CustomerPaymentInstrument; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DeleteCustomerPaymentInstrument { - 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 void run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - String paymentInstrumentTokenId = CreateCustomerNonDefaultPaymentInstrumentCard.run().getId(); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerPaymentInstrumentApi apiInstance = new CustomerPaymentInstrumentApi(apiClient); - apiInstance.deleteCustomerPaymentInstrument(customerTokenId, paymentInstrumentTokenId, null); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/ListPaymentInstrumentsForCustomer.java b/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/ListPaymentInstrumentsForCustomer.java deleted file mode 100644 index 5895dfb..0000000 --- a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/ListPaymentInstrumentsForCustomer.java +++ /dev/null @@ -1,60 +0,0 @@ -package samples.TokenManagement.CustomerPaymentInstrument; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ListPaymentInstrumentsForCustomer { - 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 { - run(); - } - public static PaymentInstrumentList run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PaymentInstrumentList result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerPaymentInstrumentApi apiInstance = new CustomerPaymentInstrumentApi(apiClient); - result = apiInstance.getCustomerPaymentInstrumentsList(customerTokenId, null, null, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/RetrieveCustomerPaymentInstrument.java b/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/RetrieveCustomerPaymentInstrument.java deleted file mode 100644 index 9d3954d..0000000 --- a/src/main/java/samples/TokenManagement/CustomerPaymentInstrument/RetrieveCustomerPaymentInstrument.java +++ /dev/null @@ -1,55 +0,0 @@ -package samples.TokenManagement.CustomerPaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RetrieveCustomerPaymentInstrument { - 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 { - run(); - } - public static PostCustomerPaymentInstrumentRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - String paymentInstrumentTokenId = "AB6A54B982A6FCB6E05341588E0A3935"; - - PostCustomerPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerPaymentInstrumentApi apiInstance = new CustomerPaymentInstrumentApi(apiClient); - result = apiInstance.getCustomerPaymentInstrument(customerTokenId, paymentInstrumentTokenId, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.java b/src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.java deleted file mode 100644 index 259a427..0000000 --- a/src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.TokenManagement.CustomerShippingAddress; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateCustomerDefaultShippingAddress { - 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 { - run(); - } - public static PostCustomerShippingAddressRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PostCustomerShippingAddressRequest requestObj = new PostCustomerShippingAddressRequest(); - - requestObj._default(true); - Tmsv2customersEmbeddedDefaultShippingAddressShipTo shipTo = new Tmsv2customersEmbeddedDefaultShippingAddressShipTo(); - shipTo.firstName("John"); - shipTo.lastName("Doe"); - shipTo.company("CyberSource"); - shipTo.address1("1 Market St"); - shipTo.locality("San Francisco"); - shipTo.administrativeArea("CA"); - shipTo.postalCode("94105"); - shipTo.country("US"); - shipTo.email("test@cybs.com"); - shipTo.phoneNumber("4158880000"); - requestObj.shipTo(shipTo); - - PostCustomerShippingAddressRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerShippingAddressApi apiInstance = new CustomerShippingAddressApi(apiClient); - result = apiInstance.postCustomerShippingAddress(customerTokenId, requestObj, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.java b/src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.java deleted file mode 100644 index dbddf3b..0000000 --- a/src/main/java/samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.TokenManagement.CustomerShippingAddress; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateCustomerNonDefaultShippingAddress { - 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 { - run(); - } - public static PostCustomerShippingAddressRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - PostCustomerShippingAddressRequest requestObj = new PostCustomerShippingAddressRequest(); - - requestObj._default(false); - Tmsv2customersEmbeddedDefaultShippingAddressShipTo shipTo = new Tmsv2customersEmbeddedDefaultShippingAddressShipTo(); - shipTo.firstName("John"); - shipTo.lastName("Doe"); - shipTo.company("CyberSource"); - shipTo.address1("1 Market St"); - shipTo.locality("San Francisco"); - shipTo.administrativeArea("CA"); - shipTo.postalCode("94105"); - shipTo.country("US"); - shipTo.email("test@cybs.com"); - shipTo.phoneNumber("4158880000"); - requestObj.shipTo(shipTo); - - PostCustomerShippingAddressRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerShippingAddressApi apiInstance = new CustomerShippingAddressApi(apiClient); - result = apiInstance.postCustomerShippingAddress(customerTokenId, requestObj, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerShippingAddress/DeleteCustomerShippingAddress.java b/src/main/java/samples/TokenManagement/CustomerShippingAddress/DeleteCustomerShippingAddress.java deleted file mode 100644 index 54ec4ae..0000000 --- a/src/main/java/samples/TokenManagement/CustomerShippingAddress/DeleteCustomerShippingAddress.java +++ /dev/null @@ -1,59 +0,0 @@ -package samples.TokenManagement.CustomerShippingAddress; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DeleteCustomerShippingAddress { - 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 { - run(); - } - public static void run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - String shippingAddressTokenId = CreateCustomerNonDefaultShippingAddress.run().getId(); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerShippingAddressApi apiInstance = new CustomerShippingAddressApi(apiClient); - apiInstance.deleteCustomerShippingAddress(customerTokenId, shippingAddressTokenId, null); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerShippingAddress/ListShippingAddressesForCustomer.java b/src/main/java/samples/TokenManagement/CustomerShippingAddress/ListShippingAddressesForCustomer.java deleted file mode 100644 index 858a7b8..0000000 --- a/src/main/java/samples/TokenManagement/CustomerShippingAddress/ListShippingAddressesForCustomer.java +++ /dev/null @@ -1,60 +0,0 @@ -package samples.TokenManagement.CustomerShippingAddress; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ListShippingAddressesForCustomer { - 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 { - run(); - } - public static ShippingAddressListForCustomer run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - - ShippingAddressListForCustomer result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerShippingAddressApi apiInstance = new CustomerShippingAddressApi(apiClient); - result = apiInstance.getCustomerShippingAddressesList(customerTokenId, null, null, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/CustomerShippingAddress/RetrieveCustomerShippingAddress.java b/src/main/java/samples/TokenManagement/CustomerShippingAddress/RetrieveCustomerShippingAddress.java deleted file mode 100644 index 2f24791..0000000 --- a/src/main/java/samples/TokenManagement/CustomerShippingAddress/RetrieveCustomerShippingAddress.java +++ /dev/null @@ -1,55 +0,0 @@ -package samples.TokenManagement.CustomerShippingAddress; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RetrieveCustomerShippingAddress { - 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 { - run(); - } - public static PostCustomerShippingAddressRequest run() { - String customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; - String shippingAddressTokenId = "AB6A54B97C00FCB6E05341588E0A3935"; - - PostCustomerShippingAddressRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CustomerShippingAddressApi apiInstance = new CustomerShippingAddressApi(apiClient); - result = apiInstance.getCustomerShippingAddress(customerTokenId, shippingAddressTokenId, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierBankAccount.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierBankAccount.java deleted file mode 100644 index 7eaee89..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierBankAccount.java +++ /dev/null @@ -1,62 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateInstrumentIdentifierBankAccount { - 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 { - run(); - } - - public static PostInstrumentIdentifierRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - PostInstrumentIdentifierRequest requestObj = new PostInstrumentIdentifierRequest(); - - TmsEmbeddedInstrumentIdentifierBankAccount bankAccount = new TmsEmbeddedInstrumentIdentifierBankAccount(); - bankAccount.number("4100"); - bankAccount.routingNumber("071923284"); - requestObj.bankAccount(bankAccount); - - PostInstrumentIdentifierRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.postInstrumentIdentifier(requestObj, profileid,false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCard.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCard.java deleted file mode 100644 index 3b0b839..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCard.java +++ /dev/null @@ -1,61 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateInstrumentIdentifierCard { - 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 { - run(); - } - - public static PostInstrumentIdentifierRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - PostInstrumentIdentifierRequest requestObj = new PostInstrumentIdentifierRequest(); - - TmsEmbeddedInstrumentIdentifierCard card = new TmsEmbeddedInstrumentIdentifierCard(); - card.number("4111111111111111"); - requestObj.card(card); - - PostInstrumentIdentifierRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.postInstrumentIdentifier(requestObj, profileid, false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCardEnrollForNetworkToken.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCardEnrollForNetworkToken.java deleted file mode 100644 index 9c57000..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/CreateInstrumentIdentifierCardEnrollForNetworkToken.java +++ /dev/null @@ -1,73 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateInstrumentIdentifierCardEnrollForNetworkToken { - 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 { - run(); - } - - public static PostInstrumentIdentifierRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - PostInstrumentIdentifierRequest requestObj = new PostInstrumentIdentifierRequest(); - - requestObj.type("enrollable card"); - TmsEmbeddedInstrumentIdentifierCard card = new TmsEmbeddedInstrumentIdentifierCard(); - card.number("4111111111111111"); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.securityCode("123"); - requestObj.card(card); - - TmsEmbeddedInstrumentIdentifierBillTo billTo = new TmsEmbeddedInstrumentIdentifierBillTo(); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - requestObj.billTo(billTo); - - PostInstrumentIdentifierRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.postInstrumentIdentifier(requestObj, profileid, false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/DeleteInstrumentIdentifier.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/DeleteInstrumentIdentifier.java deleted file mode 100644 index b128fc0..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/DeleteInstrumentIdentifier.java +++ /dev/null @@ -1,62 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.io.InputStream; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class DeleteInstrumentIdentifier { - 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 { - run(); - } - - public static void run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String tokenId = CreateInstrumentIdentifierCard.run().getId(); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - apiInstance.deleteInstrumentIdentifier(tokenId, profileid); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/EnrollInstrumentIdentifierForNetworkTokenization.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/EnrollInstrumentIdentifierForNetworkTokenization.java deleted file mode 100644 index 6a9991f..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/EnrollInstrumentIdentifierForNetworkTokenization.java +++ /dev/null @@ -1,77 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class EnrollInstrumentIdentifierForNetworkTokenization { - 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 void run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String instrumentIdentifierTokenId = "7010000000016241111"; - - PostInstrumentIdentifierEnrollmentRequest requestObj = new PostInstrumentIdentifierEnrollmentRequest(); - - requestObj.type("enrollable card"); - TmsEmbeddedInstrumentIdentifierCard card = new TmsEmbeddedInstrumentIdentifierCard(); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.securityCode("123"); - requestObj.card(card); - - TmsEmbeddedInstrumentIdentifierBillTo billTo = new TmsEmbeddedInstrumentIdentifierBillTo(); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - requestObj.billTo(billTo); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - apiInstance.postInstrumentIdentifierEnrollment(instrumentIdentifierTokenId, requestObj, profileid); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/ListPaymentInstrumentsForInstrumentIdentifier.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/ListPaymentInstrumentsForInstrumentIdentifier.java deleted file mode 100644 index f92c271..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/ListPaymentInstrumentsForInstrumentIdentifier.java +++ /dev/null @@ -1,56 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class ListPaymentInstrumentsForInstrumentIdentifier { - 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 { - run(); - } - public static PaymentInstrumentList1 run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String instrumentIdentifierTokenId = "7010000000016241111"; - - PaymentInstrumentList1 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.getInstrumentIdentifierPaymentInstrumentsList(instrumentIdentifierTokenId, profileid, false, null, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/RetrieveInstrumentIdentifier.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/RetrieveInstrumentIdentifier.java deleted file mode 100644 index 89b1916..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/RetrieveInstrumentIdentifier.java +++ /dev/null @@ -1,57 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RetrieveInstrumentIdentifier { - 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 { - run(); - } - - public static PostInstrumentIdentifierRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String tokenId = "7010000000016241111"; - - PostInstrumentIdentifierRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.getInstrumentIdentifier(tokenId, profileid, false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/InstrumentIdentifier/UpdateInstrumentIdentifierPreviousTransactionId.java b/src/main/java/samples/TokenManagement/InstrumentIdentifier/UpdateInstrumentIdentifierPreviousTransactionId.java deleted file mode 100644 index 2c044b3..0000000 --- a/src/main/java/samples/TokenManagement/InstrumentIdentifier/UpdateInstrumentIdentifierPreviousTransactionId.java +++ /dev/null @@ -1,72 +0,0 @@ -package samples.TokenManagement.InstrumentIdentifier; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class UpdateInstrumentIdentifierPreviousTransactionId { - 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 { - run(); - } - public static PatchInstrumentIdentifierRequest run() { - - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String instrumentIdentifierTokenId = "7010000000016241111"; - - PatchInstrumentIdentifierRequest requestObj = new PatchInstrumentIdentifierRequest(); - - TmsEmbeddedInstrumentIdentifierProcessingInformation processingInformation = new TmsEmbeddedInstrumentIdentifierProcessingInformation(); - TmsAuthorizationOptions processingInformationAuthorizationOptions = new TmsAuthorizationOptions(); - TmsAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new TmsAuthorizationOptionsInitiator(); - TmsAuthorizationOptionsInitiatorMerchantInitiatedTransaction processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction = new TmsAuthorizationOptionsInitiatorMerchantInitiatedTransaction(); - processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction.previousTransactionId("123456789012345"); - processingInformationAuthorizationOptionsInitiator.merchantInitiatedTransaction(processingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction); - - processingInformationAuthorizationOptions.initiator(processingInformationAuthorizationOptionsInitiator); - - processingInformation.authorizationOptions(processingInformationAuthorizationOptions); - - requestObj.processingInformation(processingInformation); - - PatchInstrumentIdentifierRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.patchInstrumentIdentifier(instrumentIdentifierTokenId, requestObj, profileid, false, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.java b/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.java deleted file mode 100644 index e9b1fc8..0000000 --- a/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.java +++ /dev/null @@ -1,107 +0,0 @@ -package samples.TokenManagement.PaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import org.joda.time.LocalDate; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreatePaymentInstrumentBankAccount { - 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 { - run(); - } - - public static PostPaymentInstrumentRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - - PostPaymentInstrumentRequest requestObj = new PostPaymentInstrumentRequest(); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount(); - bankAccount.type("savings"); - requestObj.bankAccount(bankAccount); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformation buyerInformation = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformation(); - buyerInformation.companyTaxID("12345"); - buyerInformation.currency("USD"); - buyerInformation.dateOfBirth(new LocalDate("2000-12-13")); - - List personalIdentification = new ArrayList (); - Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification personalIdentification1 = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification(); - personalIdentification1.id("57684432111321"); - personalIdentification1.type("driver license"); - Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy issuedBy1 = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy(); - issuedBy1.administrativeArea("CA"); - personalIdentification1.issuedBy(issuedBy1); - - personalIdentification.add(personalIdentification1); - - buyerInformation.personalIdentification(personalIdentification); - - requestObj.buyerInformation(buyerInformation); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("John"); - billTo.lastName("Doe"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("test@cybs.com"); - billTo.phoneNumber("4158880000"); - requestObj.billTo(billTo); - - TmsPaymentInstrumentProcessingInfo processingInformation = new TmsPaymentInstrumentProcessingInfo(); - TmsPaymentInstrumentProcessingInfoBankTransferOptions processingInformationBankTransferOptions = new TmsPaymentInstrumentProcessingInfoBankTransferOptions(); - processingInformationBankTransferOptions.seCCode("WEB"); - processingInformation.bankTransferOptions(processingInformationBankTransferOptions); - - requestObj.processingInformation(processingInformation); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("A7A91A2CA872B272E05340588D0A0699"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PostPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentInstrumentApi apiInstance = new PaymentInstrumentApi(apiClient); - result = apiInstance.postPaymentInstrument(requestObj, profileid, false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.java b/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.java deleted file mode 100644 index 946064a..0000000 --- a/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.java +++ /dev/null @@ -1,81 +0,0 @@ -package samples.TokenManagement.PaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreatePaymentInstrumentCard { - 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 { - run(); - } - - public static PostPaymentInstrumentRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - - PostPaymentInstrumentRequest requestObj = new PostPaymentInstrumentRequest(); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.type("visa"); - requestObj.card(card); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("John"); - billTo.lastName("Doe"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("test@cybs.com"); - billTo.phoneNumber("4158880000"); - requestObj.billTo(billTo); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("7010000000016241111"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PostPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentInstrumentApi apiInstance = new PaymentInstrumentApi(apiClient); - result = apiInstance.postPaymentInstrument(requestObj, profileid, false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.java b/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.java deleted file mode 100644 index aef8e21..0000000 --- a/src/main/java/samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.java +++ /dev/null @@ -1,85 +0,0 @@ -package samples.TokenManagement.PaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreatePaymentInstrumentPinlessDebit { - 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 { - run(); - } - - public static PostPaymentInstrumentRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - - PostPaymentInstrumentRequest requestObj = new PostPaymentInstrumentRequest(); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.type("visa"); - card.issueNumber("01"); - card.startMonth("01"); - card.startYear("2020"); - card.useAs("pinless debit"); - requestObj.card(card); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("John"); - billTo.lastName("Doe"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("test@cybs.com"); - billTo.phoneNumber("4158880000"); - requestObj.billTo(billTo); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("7010000000016241111"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PostPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentInstrumentApi apiInstance = new PaymentInstrumentApi(apiClient); - result = apiInstance.postPaymentInstrument(requestObj, profileid, false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/PaymentInstrument/DeletePaymentInstrument.java b/src/main/java/samples/TokenManagement/PaymentInstrument/DeletePaymentInstrument.java deleted file mode 100644 index 79f5d48..0000000 --- a/src/main/java/samples/TokenManagement/PaymentInstrument/DeletePaymentInstrument.java +++ /dev/null @@ -1,60 +0,0 @@ -package samples.TokenManagement.PaymentInstrument; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class DeletePaymentInstrument { - 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 { - run(); - } - - public static void run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String tokenId = CreatePaymentInstrumentCard.run().getId(); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentInstrumentApi apiInstance = new PaymentInstrumentApi(apiClient); - apiInstance.deletePaymentInstrument(tokenId, profileid); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/TokenManagement/PaymentInstrument/RetrievePaymentInstrument.java b/src/main/java/samples/TokenManagement/PaymentInstrument/RetrievePaymentInstrument.java deleted file mode 100644 index 68b4960..0000000 --- a/src/main/java/samples/TokenManagement/PaymentInstrument/RetrievePaymentInstrument.java +++ /dev/null @@ -1,57 +0,0 @@ -package samples.TokenManagement.PaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class RetrievePaymentInstrument { - 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 { - run(); - } - - public static PostPaymentInstrumentRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String tokenId = "888454C31FB6150CE05340588D0AA9BE"; - - PostPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentInstrumentApi apiInstance = new PaymentInstrumentApi(apiClient); - result = apiInstance.getPaymentInstrument(tokenId, profileid, false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.java b/src/main/java/samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.java deleted file mode 100644 index b8c5611..0000000 --- a/src/main/java/samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.java +++ /dev/null @@ -1,80 +0,0 @@ -package samples.TokenManagement.PaymentInstrument; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class UpdatePaymentInstrument { - 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 { - run(); - } - public static PatchPaymentInstrumentRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - String tokenId = "888454C31FB6150CE05340588D0AA9BE"; - - PatchPaymentInstrumentRequest requestObj = new PatchPaymentInstrumentRequest(); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(); - card.expirationMonth("12"); - card.expirationYear("2031"); - card.type("visa"); - requestObj.card(card); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(); - billTo.firstName("Jack"); - billTo.lastName("Smith"); - billTo.company("CyberSource"); - billTo.address1("1 Market St"); - billTo.locality("San Francisco"); - billTo.administrativeArea("CA"); - billTo.postalCode("94105"); - billTo.country("US"); - billTo.email("updatedemail@cybs.com"); - billTo.phoneNumber("4158888674"); - requestObj.billTo(billTo); - - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(); - instrumentIdentifier.id("7010000000016241111"); - requestObj.instrumentIdentifier(instrumentIdentifier); - - PatchPaymentInstrumentRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentInstrumentApi apiInstance = new PaymentInstrumentApi(apiClient); - result = apiInstance.patchPaymentInstrument(tokenId, requestObj, profileid, false, 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TransactionBatches/GetIndividualBatchFile.java b/src/main/java/samples/TransactionBatches/GetIndividualBatchFile.java deleted file mode 100644 index a2af95c..0000000 --- a/src/main/java/samples/TransactionBatches/GetIndividualBatchFile.java +++ /dev/null @@ -1,62 +0,0 @@ -package samples.TransactionBatches; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetIndividualBatchFile { - 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 { - run(); - } - - public static PtsV1TransactionBatchesIdGet200Response run() { - String id = "12345"; - - PtsV1TransactionBatchesIdGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TransactionBatchesApi apiInstance = new TransactionBatchesApi(apiClient); - result = apiInstance.getTransactionBatchId(id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TransactionBatches/GetListOfBatchFiles.java b/src/main/java/samples/TransactionBatches/GetListOfBatchFiles.java deleted file mode 100644 index 9f31ee0..0000000 --- a/src/main/java/samples/TransactionBatches/GetListOfBatchFiles.java +++ /dev/null @@ -1,64 +0,0 @@ -package samples.TransactionBatches; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetListOfBatchFiles { - 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 { - run(); - } - - public static PtsV1TransactionBatchesGet200Response run() { - - DateTime startTime = new DateTime("2020-02-22T01:47:57.000Z").withZone(DateTimeZone.forID("GMT")); - DateTime endTime = new DateTime("2020-02-22T22:47:57.000Z").withZone(DateTimeZone.forID("GMT")); - - PtsV1TransactionBatchesGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TransactionBatchesApi apiInstance = new TransactionBatchesApi(apiClient); - result = apiInstance.getTransactionBatches(startTime, endTime); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TransactionBatches/GetTransactionDetailsForGivenBatchId.java b/src/main/java/samples/TransactionBatches/GetTransactionDetailsForGivenBatchId.java deleted file mode 100644 index 0b6b560..0000000 --- a/src/main/java/samples/TransactionBatches/GetTransactionDetailsForGivenBatchId.java +++ /dev/null @@ -1,101 +0,0 @@ -package samples.TransactionBatches; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileWriter; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.util.Properties; - -import java.math.BigDecimal; - -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class GetTransactionDetailsForGivenBatchId { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - public static String resourceFile = "BatchDetailsReport"; - private static final String FILE_PATH = "src/main/resources/"; - private static String responseBody = null; - - 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 { - run(); - } - - public static void run() { - - LocalDate uploadDate = new LocalDate("2019-08-30"); - String status = "Rejected"; - - String id = "12345"; - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TransactionBatchesApi apiInstance = new TransactionBatchesApi(apiClient); - ApiResponse responseStream = apiInstance.getTransactionBatchDetailsWithHttpInfo(id, uploadDate, status); - - // START : FILE DOWNLOAD FUNCTIONALITY - - String contentType = responseStream.getHeaders().get("Content-Type").get(0); - - String fileExtension = "csv"; - - if (contentType.contains("json")) { - fileExtension = contentType.substring(contentType.length() - 4); - } else { - fileExtension = contentType.substring(contentType.length() - 3); - } - - File targetFile = new File(FILE_PATH + resourceFile + "." + fileExtension); - - FileUtils.copyInputStreamToFile(responseStream.getData(), targetFile); - - // END : FILE DOWNLOAD FUNCTIONALITY - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - - System.out.println("File Downloaded at the following location : "); - System.out.println(new File(FILE_PATH + resourceFile + "." + fileExtension).getAbsolutePath()); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/TransactionBatches/UploadTransactionBatch.java b/src/main/java/samples/TransactionBatches/UploadTransactionBatch.java deleted file mode 100644 index cc7e518..0000000 --- a/src/main/java/samples/TransactionBatches/UploadTransactionBatch.java +++ /dev/null @@ -1,60 +0,0 @@ -package samples.TransactionBatches; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.TransactionBatchesApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; - -import java.io.File; - -public class UploadTransactionBatch { - private static int responseCode ; - 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 { - run(); - } - - public static void run() { - try { - - // Get the file path from the resources folder - String fileName="batchapiTest.csv"; - String filePath = UploadTransactionBatch.class.getClassLoader().getResource(fileName).getPath(); - // Create a File object - File file = new File(filePath); - - //SDK need file object to send to cybs api endpoint - merchantProp = Configuration.getMerchantDetailsForBatchUploadSample(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - TransactionBatchesApi apiInstance = new TransactionBatchesApi(apiClient); - ApiResponse result = apiInstance.uploadTransactionBatchWithHttpInfo(file); - - responseCode = result.getStatusCode(); - status = result.getMessage(); - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(responseCode); - - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/src/main/java/samples/TransactionDetails/RetrieveTransaction.java b/src/main/java/samples/TransactionDetails/RetrieveTransaction.java deleted file mode 100644 index 8504f73..0000000 --- a/src/main/java/samples/TransactionDetails/RetrieveTransaction.java +++ /dev/null @@ -1,65 +0,0 @@ -package samples.TransactionDetails; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; -import samples.Payments.Payments.SimpleAuthorizationInternet; - -public class RetrieveTransaction { - 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 { - run(); - } - - public static TssV2TransactionsGet200Response run() throws InterruptedException { - String id = SimpleAuthorizationInternet.run().getId(); - - Thread.sleep(15000); - - TssV2TransactionsGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TransactionDetailsApi apiInstance = new TransactionDetailsApi(apiClient); - result = apiInstance.getTransaction(id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TransactionSearch/CreateSearchRequest.java b/src/main/java/samples/TransactionSearch/CreateSearchRequest.java deleted file mode 100644 index a528e1a..0000000 --- a/src/main/java/samples/TransactionSearch/CreateSearchRequest.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.TransactionSearch; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateSearchRequest { - 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 { - run(); - } - - public static TssV2TransactionsPost201Response run() { - - Model.CreateSearchRequest requestObj = new Model.CreateSearchRequest(); - - requestObj.save(false); - requestObj.name("MRN"); - requestObj.timezone("America/Chicago"); - requestObj.query("clientReferenceInformation.code:TC50171_3 AND submitTimeUtc:[NOW/DAY-7DAYS TO NOW/DAY+1DAY}"); - requestObj.offset(0); - requestObj.limit(100); - requestObj.sort("id:asc,submitTimeUtc:asc"); - TssV2TransactionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SearchTransactionsApi apiInstance = new SearchTransactionsApi(apiClient); - result = apiInstance.createSearch(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/TransactionSearch/GetSearchResults.java b/src/main/java/samples/TransactionSearch/GetSearchResults.java deleted file mode 100644 index c9cd3f6..0000000 --- a/src/main/java/samples/TransactionSearch/GetSearchResults.java +++ /dev/null @@ -1,62 +0,0 @@ -package samples.TransactionSearch; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetSearchResults { - 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 { - run(); - } - - public static TssV2TransactionsPost201Response run() { - String searchId = CreateSearchRequest.run().getSearchId(); - - TssV2TransactionsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - SearchTransactionsApi apiInstance = new SearchTransactionsApi(apiClient); - result = apiInstance.getSearch(searchId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.java b/src/main/java/samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.java deleted file mode 100644 index dca45fe..0000000 --- a/src/main/java/samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.java +++ /dev/null @@ -1,101 +0,0 @@ -package samples.UnifiedCheckout; - -import java.util.*; -import com.cybersource.authsdk.core.MerchantConfig; -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Model.*; - -public class GenerateCaptureContextForClickToPayDropInUI { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - - public static void main(String args[]) throws Exception { - run(); - } - - public static void run() { - - GenerateUnifiedCheckoutCaptureContextRequest requestObj = new GenerateUnifiedCheckoutCaptureContextRequest(); - - requestObj.clientVersion("0.23"); - - List targetOrigins = new ArrayList (); - targetOrigins.add("https://yourCheckoutPage.com"); - requestObj.targetOrigins(targetOrigins); - - - List allowedCardNetworks = new ArrayList (); - allowedCardNetworks.add("VISA"); - allowedCardNetworks.add("MASTERCARD"); - allowedCardNetworks.add("AMEX"); - allowedCardNetworks.add("CARNET"); - allowedCardNetworks.add("CARTESBANCAIRES"); - allowedCardNetworks.add("CUP"); - allowedCardNetworks.add("DINERSCLUB"); - allowedCardNetworks.add("DISCOVER"); - allowedCardNetworks.add("EFTPOS"); - allowedCardNetworks.add("ELO"); - allowedCardNetworks.add("JCB"); - allowedCardNetworks.add("JCREW"); - allowedCardNetworks.add("MADA"); - allowedCardNetworks.add("MAESTRO"); - allowedCardNetworks.add("MEEZA"); - requestObj.allowedCardNetworks(allowedCardNetworks); - - - List allowedPaymentTypes = new ArrayList (); - allowedPaymentTypes.add("CLICKTOPAY"); - requestObj.allowedPaymentTypes(allowedPaymentTypes); - - requestObj.country("US"); - requestObj.locale("en_US"); - Upv1capturecontextsCaptureMandate captureMandate = new Upv1capturecontextsCaptureMandate(); - captureMandate.billingType("FULL"); - captureMandate.requestEmail(true); - captureMandate.requestPhone(true); - captureMandate.requestShipping(true); - - List shipToCountries = new ArrayList (); - shipToCountries.add("US"); - shipToCountries.add("GB"); - captureMandate.shipToCountries(shipToCountries); - - captureMandate.showAcceptedNetworkIcons(true); - requestObj.captureMandate(captureMandate); - - Upv1capturecontextsOrderInformation orderInformation = new Upv1capturecontextsOrderInformation(); - Upv1capturecontextsOrderInformationAmountDetails orderInformationAmountDetails = new Upv1capturecontextsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("21.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - requestObj.orderInformation(orderInformation); - - Upv1capturecontextsCompleteMandate completeMandate = new Upv1capturecontextsCompleteMandate(); - completeMandate.setType("CAPTURE"); - completeMandate.setDecisionManager(false); - requestObj.setCompleteMandate(completeMandate); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - UnifiedCheckoutCaptureContextApi apiInstance = new UnifiedCheckoutCaptureContextApi(apiClient); - String response = apiInstance.generateUnifiedCheckoutCaptureContext(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println("Response Body :" + response); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContext.java b/src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContext.java deleted file mode 100644 index bab23d2..0000000 --- a/src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContext.java +++ /dev/null @@ -1,103 +0,0 @@ -package samples.UnifiedCheckout; - -import java.util.*; -import com.cybersource.authsdk.core.MerchantConfig; -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Model.*; - -public class GenerateUnifiedCheckoutCaptureContext { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - - public static void main(String args[]) throws Exception { - run(); - } - - public static void run() { - - GenerateUnifiedCheckoutCaptureContextRequest requestObj = new GenerateUnifiedCheckoutCaptureContextRequest(); - - requestObj.clientVersion("0.26"); - - List targetOrigins = new ArrayList (); - targetOrigins.add("https://yourCheckoutPage.com"); - requestObj.targetOrigins(targetOrigins); - - List allowedCardNetworks = new ArrayList (); - allowedCardNetworks.add("VISA"); - allowedCardNetworks.add("MASTERCARD"); - allowedCardNetworks.add("AMEX"); - allowedCardNetworks.add("CARNET"); - allowedCardNetworks.add("CARTESBANCAIRES"); - allowedCardNetworks.add("CUP"); - allowedCardNetworks.add("DINERSCLUB"); - allowedCardNetworks.add("DISCOVER"); - allowedCardNetworks.add("EFTPOS"); - allowedCardNetworks.add("ELO"); - allowedCardNetworks.add("JCB"); - allowedCardNetworks.add("JCREW"); - allowedCardNetworks.add("MADA"); - allowedCardNetworks.add("MAESTRO"); - allowedCardNetworks.add("MEEZA"); - requestObj.allowedCardNetworks(allowedCardNetworks); - - List allowedPaymentTypes = new ArrayList (); - allowedPaymentTypes.add("APPLEPAY"); - allowedPaymentTypes.add("CHECK"); - allowedPaymentTypes.add("CLICKTOPAY"); - allowedPaymentTypes.add("GOOGLEPAY"); - allowedPaymentTypes.add("PANENTRY"); - allowedPaymentTypes.add("PAZE"); - requestObj.allowedPaymentTypes(allowedPaymentTypes); - - requestObj.country("US"); - requestObj.locale("en_US"); - Upv1capturecontextsCaptureMandate captureMandate = new Upv1capturecontextsCaptureMandate(); - captureMandate.billingType("FULL"); - captureMandate.requestEmail(true); - captureMandate.requestPhone(true); - captureMandate.requestShipping(true); - - List shipToCountries = new ArrayList (); - shipToCountries.add("US"); - shipToCountries.add("GB"); - captureMandate.shipToCountries(shipToCountries); - - captureMandate.showAcceptedNetworkIcons(true); - requestObj.captureMandate(captureMandate); - - Upv1capturecontextsOrderInformation orderInformation = new Upv1capturecontextsOrderInformation(); - Upv1capturecontextsOrderInformationAmountDetails orderInformationAmountDetails = new Upv1capturecontextsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("21.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - requestObj.orderInformation(orderInformation); - - Upv1capturecontextsCompleteMandate completeMandate = new Upv1capturecontextsCompleteMandate(); - completeMandate.setType("CAPTURE"); - completeMandate.setDecisionManager(false); - requestObj.setCompleteMandate(completeMandate); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - UnifiedCheckoutCaptureContextApi apiInstance = new UnifiedCheckoutCaptureContextApi(apiClient); - String response = apiInstance.generateUnifiedCheckoutCaptureContext(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println("Response Body :" + response); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.java b/src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.java deleted file mode 100644 index 52b2a15..0000000 --- a/src/main/java/samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.java +++ /dev/null @@ -1,166 +0,0 @@ -package samples.UnifiedCheckout; - -import Api.UnifiedCheckoutCaptureContextApi; -import Data.Configuration; -import Invokers.ApiClient; -import Model.GenerateUnifiedCheckoutCaptureContextRequest; -import Model.Upv1capturecontextsCaptureMandate; -import Model.Upv1capturecontextsOrderInformation; -import Model.Upv1capturecontextsOrderInformationAmountDetails; -import com.cybersource.authsdk.core.MerchantConfig; -import Model.Upv1capturecontextsOrderInformationBillTo; -import Model.Upv1capturecontextsOrderInformationBillToCompany; -import Model.Upv1capturecontextsOrderInformationShipTo; -import Model.Upv1capturecontextsCompleteMandate; - -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -public class GenerateUnifiedCheckoutCaptureContextPassingBillingShipping { - private static String responseCode = null; - private static String status = null; - private static Properties merchantProp; - - public static void main(String args[]) throws Exception { - run(); - } - - public static void run() { - - GenerateUnifiedCheckoutCaptureContextRequest requestObj = new GenerateUnifiedCheckoutCaptureContextRequest(); - - requestObj.clientVersion("0.23"); - - List targetOrigins = new ArrayList (); - targetOrigins.add("https://yourCheckoutPage.com"); - requestObj.targetOrigins(targetOrigins); - - - List allowedCardNetworks = new ArrayList (); - allowedCardNetworks.add("VISA"); - allowedCardNetworks.add("MASTERCARD"); - allowedCardNetworks.add("AMEX"); - allowedCardNetworks.add("CARNET"); - allowedCardNetworks.add("CARTESBANCAIRES"); - allowedCardNetworks.add("CUP"); - allowedCardNetworks.add("DINERSCLUB"); - allowedCardNetworks.add("DISCOVER"); - allowedCardNetworks.add("EFTPOS"); - allowedCardNetworks.add("ELO"); - allowedCardNetworks.add("JCB"); - allowedCardNetworks.add("JCREW"); - allowedCardNetworks.add("MADA"); - allowedCardNetworks.add("MAESTRO"); - allowedCardNetworks.add("MEEZA"); - requestObj.allowedCardNetworks(allowedCardNetworks); - - - List allowedPaymentTypes = new ArrayList (); - allowedPaymentTypes.add("APPLEPAY"); - allowedPaymentTypes.add("CHECK"); - allowedPaymentTypes.add("CLICKTOPAY"); - allowedPaymentTypes.add("GOOGLEPAY"); - allowedPaymentTypes.add("PANENTRY"); - allowedPaymentTypes.add("PAZE"); - requestObj.allowedPaymentTypes(allowedPaymentTypes); - - requestObj.country("US"); - requestObj.locale("en_US"); - Upv1capturecontextsCaptureMandate captureMandate = new Upv1capturecontextsCaptureMandate(); - captureMandate.billingType("FULL"); - captureMandate.requestEmail(true); - captureMandate.requestPhone(true); - captureMandate.requestShipping(true); - - List shipToCountries = new ArrayList (); - shipToCountries.add("US"); - shipToCountries.add("GB"); - captureMandate.shipToCountries(shipToCountries); - - captureMandate.showAcceptedNetworkIcons(true); - requestObj.captureMandate(captureMandate); - - Upv1capturecontextsOrderInformation orderInformation = new Upv1capturecontextsOrderInformation(); - Upv1capturecontextsOrderInformationAmountDetails orderInformationAmountDetails = new Upv1capturecontextsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("21.00"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Upv1capturecontextsOrderInformationBillTo orderInformationBillTo = new Upv1capturecontextsOrderInformationBillTo(); - orderInformationBillTo.address1("277 Park Avenue"); - orderInformationBillTo.address2("50th Floor"); - orderInformationBillTo.address3("Desk NY-50110"); - orderInformationBillTo.address4("address4"); - orderInformationBillTo.administrativeArea("NY"); - orderInformationBillTo.buildingNumber("buildingNumber"); - orderInformationBillTo.country("US"); - orderInformationBillTo.district("district"); - orderInformationBillTo.locality("New York"); - orderInformationBillTo.postalCode("10172"); - Upv1capturecontextsOrderInformationBillToCompany orderInformationBillToCompany = new Upv1capturecontextsOrderInformationBillToCompany(); - orderInformationBillToCompany.name("Visa Inc"); - orderInformationBillToCompany.address1("900 Metro Center Blvd"); - orderInformationBillToCompany.address2("address2"); - orderInformationBillToCompany.address3("address3"); - orderInformationBillToCompany.address4("address4"); - orderInformationBillToCompany.administrativeArea("CA"); - orderInformationBillToCompany.buildingNumber("1"); - orderInformationBillToCompany.country("US"); - orderInformationBillToCompany.district("district"); - orderInformationBillToCompany.locality("Foster City"); - orderInformationBillToCompany.postalCode("94404"); - orderInformationBillTo.company(orderInformationBillToCompany); - - orderInformationBillTo.email("john.doe@visa.com"); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.middleName("F"); - orderInformationBillTo.nameSuffix("Jr"); - orderInformationBillTo.title("Mr"); - orderInformationBillTo.phoneNumber("1234567890"); - orderInformationBillTo.phoneType("phoneType"); - orderInformation.billTo(orderInformationBillTo); - - Upv1capturecontextsOrderInformationShipTo orderInformationShipTo = new Upv1capturecontextsOrderInformationShipTo(); - orderInformationShipTo.address1("CyberSource"); - orderInformationShipTo.address2("Victoria House"); - orderInformationShipTo.address3("15-17 Gloucester Street"); - orderInformationShipTo.address4("string"); - orderInformationShipTo.administrativeArea("CA"); - orderInformationShipTo.buildingNumber("string"); - orderInformationShipTo.country("GB"); - orderInformationShipTo.district("string"); - orderInformationShipTo.locality("Belfast"); - orderInformationShipTo.postalCode("BT1 4LS"); - orderInformationShipTo.firstName("Joe"); - orderInformationShipTo.lastName("Soap"); - orderInformation.shipTo(orderInformationShipTo); - - requestObj.orderInformation(orderInformation); - - Upv1capturecontextsCompleteMandate completeMandate = new Upv1capturecontextsCompleteMandate(); - completeMandate.setType("CAPTURE"); - completeMandate.setDecisionManager(false); - requestObj.setCompleteMandate(completeMandate); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - UnifiedCheckoutCaptureContextApi apiInstance = new UnifiedCheckoutCaptureContextApi(apiClient); - String response = apiInstance.generateUnifiedCheckoutCaptureContext(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println("Response Body :" + response); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} diff --git a/src/main/java/samples/UserManagement/UserManagement/GetUserInformationDeprecated.java b/src/main/java/samples/UserManagement/UserManagement/GetUserInformationDeprecated.java deleted file mode 100644 index d37d716..0000000 --- a/src/main/java/samples/UserManagement/UserManagement/GetUserInformationDeprecated.java +++ /dev/null @@ -1,66 +0,0 @@ -package samples.UserManagement.UserManagement; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class GetUserInformationDeprecated { - 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 { - run(); - } - - public static UmsV1UsersGet200Response run() { - - String organizationId = "testrest"; - String userName = null; - String permissionId = "CustomerProfileViewPermission"; - String roleId = null; - - UmsV1UsersGet200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - UserManagementApi apiInstance = new UserManagementApi(apiClient); - result = apiInstance.getUsers(organizationId, userName, permissionId, roleId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/ValueAddedService/BasicTaxCalculationRequest.java b/src/main/java/samples/ValueAddedService/BasicTaxCalculationRequest.java deleted file mode 100644 index 7fe1305..0000000 --- a/src/main/java/samples/ValueAddedService/BasicTaxCalculationRequest.java +++ /dev/null @@ -1,114 +0,0 @@ -package samples.ValueAddedService; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class BasicTaxCalculationRequest { - 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 VasV2PaymentsPost201Response run() { - - TaxRequest requestObj = new TaxRequest(); - - Vasv2taxClientReferenceInformation clientReferenceInformation = new Vasv2taxClientReferenceInformation(); - clientReferenceInformation.code("TAX_TC001"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Vasv2taxTaxInformation taxInformation = new Vasv2taxTaxInformation(); - taxInformation.showTaxPerLineItem("Yes"); - requestObj.taxInformation(taxInformation); - - Vasv2taxOrderInformation orderInformation = new Vasv2taxOrderInformation(); - RiskV1DecisionsPost201ResponseOrderInformationAmountDetails orderInformationAmountDetails = new RiskV1DecisionsPost201ResponseOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Vasv2taxOrderInformationBillTo orderInformationBillTo = new Vasv2taxOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("San Francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformation.billTo(orderInformationBillTo); - - - List lineItems = new ArrayList (); - Vasv2taxOrderInformationLineItems lineItems1 = new Vasv2taxOrderInformationLineItems(); - lineItems1.productSKU("07-12-00657"); - lineItems1.productCode("50161815"); - lineItems1.quantity(1); - lineItems1.productName("Chewing Gum"); - lineItems1.unitPrice("1200"); - lineItems.add(lineItems1); - - Vasv2taxOrderInformationLineItems lineItems2 = new Vasv2taxOrderInformationLineItems(); - lineItems2.productSKU("07-12-00659"); - lineItems2.productCode("50181905"); - lineItems2.quantity(1); - lineItems2.productName("Sugar Cookies"); - lineItems2.unitPrice("1240"); - lineItems.add(lineItems2); - - Vasv2taxOrderInformationLineItems lineItems3 = new Vasv2taxOrderInformationLineItems(); - lineItems3.productSKU("07-12-00658"); - lineItems3.productCode("5020.11"); - lineItems3.quantity(1); - lineItems3.productName("Carbonated Water"); - lineItems3.unitPrice("9001"); - lineItems.add(lineItems3); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - VasV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TaxesApi apiInstance = new TaxesApi(apiClient); - result = apiInstance.calculateTax(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/ValueAddedService/CommittedTaxCallRequest.java b/src/main/java/samples/ValueAddedService/CommittedTaxCallRequest.java deleted file mode 100644 index 589b806..0000000 --- a/src/main/java/samples/ValueAddedService/CommittedTaxCallRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -package samples.ValueAddedService; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CommittedTaxCallRequest { - 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 VasV2PaymentsPost201Response run() { - - TaxRequest requestObj = new TaxRequest(); - - Vasv2taxClientReferenceInformation clientReferenceInformation = new Vasv2taxClientReferenceInformation(); - clientReferenceInformation.code("TAX_TC001"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Vasv2taxTaxInformation taxInformation = new Vasv2taxTaxInformation(); - taxInformation.showTaxPerLineItem("Yes"); - taxInformation.commitIndicator(true); - requestObj.taxInformation(taxInformation); - - Vasv2taxOrderInformation orderInformation = new Vasv2taxOrderInformation(); - RiskV1DecisionsPost201ResponseOrderInformationAmountDetails orderInformationAmountDetails = new RiskV1DecisionsPost201ResponseOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Vasv2taxOrderInformationBillTo orderInformationBillTo = new Vasv2taxOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("San Francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformation.billTo(orderInformationBillTo); - - Vasv2taxOrderInformationShippingDetails orderInformationShippingDetails = new Vasv2taxOrderInformationShippingDetails(); - orderInformationShippingDetails.shipFromLocality("Cambridge Bay"); - orderInformationShippingDetails.shipFromCountry("CA"); - orderInformationShippingDetails.shipFromPostalCode("A0G 1T0"); - orderInformationShippingDetails.shipFromAdministrativeArea("NL"); - orderInformation.shippingDetails(orderInformationShippingDetails); - - Vasv2taxOrderInformationShipTo orderInformationShipTo = new Vasv2taxOrderInformationShipTo(); - orderInformationShipTo.country("US"); - orderInformationShipTo.administrativeArea("FL"); - orderInformationShipTo.locality("Panama City"); - orderInformationShipTo.postalCode("32401"); - orderInformationShipTo.address1("123 Russel St."); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Vasv2taxOrderInformationLineItems lineItems1 = new Vasv2taxOrderInformationLineItems(); - lineItems1.productSKU("07-12-00657"); - lineItems1.productCode("50161815"); - lineItems1.quantity(1); - lineItems1.productName("Chewing Gum"); - lineItems1.unitPrice("1200"); - lineItems.add(lineItems1); - - Vasv2taxOrderInformationLineItems lineItems2 = new Vasv2taxOrderInformationLineItems(); - lineItems2.productSKU("07-12-00659"); - lineItems2.productCode("50181905"); - lineItems2.quantity(1); - lineItems2.productName("Sugar Cookies"); - lineItems2.unitPrice("1240"); - lineItems.add(lineItems2); - - Vasv2taxOrderInformationLineItems lineItems3 = new Vasv2taxOrderInformationLineItems(); - lineItems3.productSKU("07-12-00658"); - lineItems3.productCode("5020.11"); - lineItems3.quantity(1); - lineItems3.productName("Carbonated Water"); - lineItems3.unitPrice("9001"); - lineItems.add(lineItems3); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Vasv2taxMerchantInformation merchantInformation = new Vasv2taxMerchantInformation(); - merchantInformation.vatRegistrationNumber("abcdef"); - requestObj.merchantInformation(merchantInformation); - - VasV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TaxesApi apiInstance = new TaxesApi(apiClient); - result = apiInstance.calculateTax(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/ValueAddedService/CommittedTaxRefundCallRequest.java b/src/main/java/samples/ValueAddedService/CommittedTaxRefundCallRequest.java deleted file mode 100644 index 53b1099..0000000 --- a/src/main/java/samples/ValueAddedService/CommittedTaxRefundCallRequest.java +++ /dev/null @@ -1,135 +0,0 @@ -package samples.ValueAddedService; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CommittedTaxRefundCallRequest { - 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 VasV2PaymentsPost201Response run() { - - TaxRequest requestObj = new TaxRequest(); - - Vasv2taxClientReferenceInformation clientReferenceInformation = new Vasv2taxClientReferenceInformation(); - clientReferenceInformation.code("TAX_TC001"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Vasv2taxTaxInformation taxInformation = new Vasv2taxTaxInformation(); - taxInformation.showTaxPerLineItem("Yes"); - taxInformation.commitIndicator(true); - taxInformation.refundIndicator(true); - requestObj.taxInformation(taxInformation); - - Vasv2taxOrderInformation orderInformation = new Vasv2taxOrderInformation(); - RiskV1DecisionsPost201ResponseOrderInformationAmountDetails orderInformationAmountDetails = new RiskV1DecisionsPost201ResponseOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Vasv2taxOrderInformationBillTo orderInformationBillTo = new Vasv2taxOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("San Francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformation.billTo(orderInformationBillTo); - - Vasv2taxOrderInformationShippingDetails orderInformationShippingDetails = new Vasv2taxOrderInformationShippingDetails(); - orderInformationShippingDetails.shipFromLocality("Cambridge Bay"); - orderInformationShippingDetails.shipFromCountry("CA"); - orderInformationShippingDetails.shipFromPostalCode("A0G 1T0"); - orderInformationShippingDetails.shipFromAdministrativeArea("NL"); - orderInformation.shippingDetails(orderInformationShippingDetails); - - Vasv2taxOrderInformationShipTo orderInformationShipTo = new Vasv2taxOrderInformationShipTo(); - orderInformationShipTo.country("US"); - orderInformationShipTo.administrativeArea("FL"); - orderInformationShipTo.locality("Panama City"); - orderInformationShipTo.postalCode("32401"); - orderInformationShipTo.address1("123 Russel St."); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Vasv2taxOrderInformationLineItems lineItems1 = new Vasv2taxOrderInformationLineItems(); - lineItems1.productSKU("07-12-00657"); - lineItems1.productCode("50161815"); - lineItems1.quantity(1); - lineItems1.productName("Chewing Gum"); - lineItems1.unitPrice("1200"); - lineItems.add(lineItems1); - - Vasv2taxOrderInformationLineItems lineItems2 = new Vasv2taxOrderInformationLineItems(); - lineItems2.productSKU("07-12-00659"); - lineItems2.productCode("50181905"); - lineItems2.quantity(1); - lineItems2.productName("Sugar Cookies"); - lineItems2.unitPrice("1240"); - lineItems.add(lineItems2); - - Vasv2taxOrderInformationLineItems lineItems3 = new Vasv2taxOrderInformationLineItems(); - lineItems3.productSKU("07-12-00658"); - lineItems3.productCode("5020.11"); - lineItems3.quantity(1); - lineItems3.productName("Carbonated Water"); - lineItems3.unitPrice("9001"); - lineItems.add(lineItems3); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Vasv2taxMerchantInformation merchantInformation = new Vasv2taxMerchantInformation(); - merchantInformation.vatRegistrationNumber("abcdef"); - requestObj.merchantInformation(merchantInformation); - - VasV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TaxesApi apiInstance = new TaxesApi(apiClient); - result = apiInstance.calculateTax(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/ValueAddedService/TaxRefundRequest.java b/src/main/java/samples/ValueAddedService/TaxRefundRequest.java deleted file mode 100644 index 01b285e..0000000 --- a/src/main/java/samples/ValueAddedService/TaxRefundRequest.java +++ /dev/null @@ -1,134 +0,0 @@ -package samples.ValueAddedService; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class TaxRefundRequest { - 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 VasV2PaymentsPost201Response run() { - - TaxRequest requestObj = new TaxRequest(); - - Vasv2taxClientReferenceInformation clientReferenceInformation = new Vasv2taxClientReferenceInformation(); - clientReferenceInformation.code("TAX_TC001"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Vasv2taxTaxInformation taxInformation = new Vasv2taxTaxInformation(); - taxInformation.showTaxPerLineItem("Yes"); - taxInformation.refundIndicator(true); - requestObj.taxInformation(taxInformation); - - Vasv2taxOrderInformation orderInformation = new Vasv2taxOrderInformation(); - RiskV1DecisionsPost201ResponseOrderInformationAmountDetails orderInformationAmountDetails = new RiskV1DecisionsPost201ResponseOrderInformationAmountDetails(); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Vasv2taxOrderInformationBillTo orderInformationBillTo = new Vasv2taxOrderInformationBillTo(); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("San Francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformation.billTo(orderInformationBillTo); - - Vasv2taxOrderInformationShippingDetails orderInformationShippingDetails = new Vasv2taxOrderInformationShippingDetails(); - orderInformationShippingDetails.shipFromLocality("Cambridge Bay"); - orderInformationShippingDetails.shipFromCountry("CA"); - orderInformationShippingDetails.shipFromPostalCode("A0G 1T0"); - orderInformationShippingDetails.shipFromAdministrativeArea("NL"); - orderInformation.shippingDetails(orderInformationShippingDetails); - - Vasv2taxOrderInformationShipTo orderInformationShipTo = new Vasv2taxOrderInformationShipTo(); - orderInformationShipTo.country("US"); - orderInformationShipTo.administrativeArea("FL"); - orderInformationShipTo.locality("Panama City"); - orderInformationShipTo.postalCode("32401"); - orderInformationShipTo.address1("123 Russel St."); - orderInformation.shipTo(orderInformationShipTo); - - - List lineItems = new ArrayList (); - Vasv2taxOrderInformationLineItems lineItems1 = new Vasv2taxOrderInformationLineItems(); - lineItems1.productSKU("07-12-00657"); - lineItems1.productCode("50161815"); - lineItems1.quantity(1); - lineItems1.productName("Chewing Gum"); - lineItems1.unitPrice("1200"); - lineItems.add(lineItems1); - - Vasv2taxOrderInformationLineItems lineItems2 = new Vasv2taxOrderInformationLineItems(); - lineItems2.productSKU("07-12-00659"); - lineItems2.productCode("50181905"); - lineItems2.quantity(1); - lineItems2.productName("Sugar Cookies"); - lineItems2.unitPrice("1240"); - lineItems.add(lineItems2); - - Vasv2taxOrderInformationLineItems lineItems3 = new Vasv2taxOrderInformationLineItems(); - lineItems3.productSKU("07-12-00658"); - lineItems3.productCode("5020.11"); - lineItems3.quantity(1); - lineItems3.productName("Carbonated Water"); - lineItems3.unitPrice("9001"); - lineItems.add(lineItems3); - - orderInformation.lineItems(lineItems); - - requestObj.orderInformation(orderInformation); - - Vasv2taxMerchantInformation merchantInformation = new Vasv2taxMerchantInformation(); - merchantInformation.vatRegistrationNumber("abcdef"); - requestObj.merchantInformation(merchantInformation); - - VasV2PaymentsPost201Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TaxesApi apiInstance = new TaxesApi(apiClient); - result = apiInstance.calculateTax(requestObj); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/ValueAddedService/VoidCommittedTaxCall.java b/src/main/java/samples/ValueAddedService/VoidCommittedTaxCall.java deleted file mode 100644 index 1b61061..0000000 --- a/src/main/java/samples/ValueAddedService/VoidCommittedTaxCall.java +++ /dev/null @@ -1,68 +0,0 @@ -package samples.ValueAddedService; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class VoidCommittedTaxCall { - 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 VasV2TaxVoid200Response run() { - String id = CommittedTaxCallRequest.run().getId(); - - VoidTaxRequest requestObj = new VoidTaxRequest(); - - Vasv2taxidClientReferenceInformation clientReferenceInformation = new Vasv2taxidClientReferenceInformation(); - clientReferenceInformation.code("TAX_TC001"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - VasV2TaxVoid200Response result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TaxesApi apiInstance = new TaxesApi(apiClient); - result = apiInstance.voidTax(requestObj, id); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateAlternativePaymentsNotificationWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateAlternativePaymentsNotificationWebhook.java deleted file mode 100644 index 3321f46..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateAlternativePaymentsNotificationWebhook.java +++ /dev/null @@ -1,87 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateAlternativePaymentsNotificationWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("alternativePaymentMethods"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("payments.payments.updated"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); - //apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateDecisionManagerWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateDecisionManagerWebhook.java deleted file mode 100644 index f19e50e..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateDecisionManagerWebhook.java +++ /dev/null @@ -1,90 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateDecisionManagerWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("decisionManager"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("risk.profile.decision.reject"); -// eventTypes.add("risk.casemanagement.addnote"); -// eventTypes.add("risk.casemanagement.decision.accept"); -// eventTypes.add("risk.casemanagement.decision.reject"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); - //apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateFraudManagementWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateFraudManagementWebhook.java deleted file mode 100644 index 5a2747e..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateFraudManagementWebhook.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateFraudManagementWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("fraudManagementEssentials"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("risk.profile.decision.review"); -// eventTypes.add("risk.profile.decision.reject"); -// eventTypes.add("risk.profile.decision.monitor"); -// eventTypes.add("risk.casemanagement.addnote"); -// eventTypes.add("risk.casemanagement.decision.accept"); -// eventTypes.add("risk.casemanagement.decision.reject"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); - //apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateInvoicingWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateInvoicingWebhook.java deleted file mode 100644 index bed0bea..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateInvoicingWebhook.java +++ /dev/null @@ -1,93 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateInvoicingWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("customerInvoicing"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("invoicing.customer.invoice.cancel"); -// eventTypes.add("invoicing.customer.invoice.overdue-reminder"); -// eventTypes.add("invoicing.customer.invoice.paid"); -// eventTypes.add("invoicing.customer.invoice.partial-payment"); -// eventTypes.add("invoicing.customer.invoice.partial-resend"); -// eventTypes.add("invoicing.customer.invoice.reminder"); -// eventTypes.add("invoicing.customer.invoice.send"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); - //apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateOutageAndKeyExpirationNotificationWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateOutageAndKeyExpirationNotificationWebhook.java deleted file mode 100644 index 27d0aac..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateOutageAndKeyExpirationNotificationWebhook.java +++ /dev/null @@ -1,91 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateOutageAndKeyExpirationNotificationWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("cns"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("cns.outage.notify.freeform"); -// eventTypes.add("cns.report.keyExpiration.detail"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateRecurringBillingWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateRecurringBillingWebhook.java deleted file mode 100644 index c82d8a1..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateRecurringBillingWebhook.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateRecurringBillingWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("recurringBilling"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("rbs.subscriptions.charge.pre-notified"); -// eventTypes.add("rbs.subscriptions.charge.created"); -// eventTypes.add("rbs.subscriptions.charge.failed"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateSecureAcceptanceWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateSecureAcceptanceWebhook.java deleted file mode 100644 index 7c82b4d..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateSecureAcceptanceWebhook.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateSecureAcceptanceWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("secureAcceptance"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("sa.orders.rawtransactionresults"); -// eventTypes.add("sa.orders.cardholderreceipts"); -// eventTypes.add("sa.orders.merchantreceipts"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTerminalManagementWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTerminalManagementWebhook.java deleted file mode 100644 index e87ea5d..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTerminalManagementWebhook.java +++ /dev/null @@ -1,92 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateTerminalManagementWebhook { - 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 { - run(); - } - - public static void run() { -// -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("terminalManagement"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("terminalManagement.assignment.update"); -// eventTypes.add("terminalManagement.status.update"); -// eventTypes.add("terminalManagement.reAssignment.update"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTokenManagementWebhook.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTokenManagementWebhook.java deleted file mode 100644 index f71714b..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateTokenManagementWebhook.java +++ /dev/null @@ -1,94 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateTokenManagementWebhook { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("tokenManagement"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("tms.networktoken.provisioned"); -// eventTypes.add("tms.networktoken.updated"); -// eventTypes.add("tms.token.pan_updated"); -// eventTypes.add("tms.token.created"); -// eventTypes.add("tms.token.updated"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("KEY"); -// securityPolicy.proxyType("external"); -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); -// WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookSymmetricKey.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookSymmetricKey.java deleted file mode 100644 index 5dd4c85..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookSymmetricKey.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateWebhookSymmetricKey { - 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 { - run(null, null, null); - } - - public static void run(String vCcorrelationId, String vCsenderOrganizationId, String vCpermissions) { - - SaveSymEgressKey requestObj = new SaveSymEgressKey(); - - requestObj.clientRequestAction("CREATE"); - Kmsegressv2keyssymKeyInformation keyInformation = new Kmsegressv2keyssymKeyInformation(); - keyInformation.provider("nrtd"); - keyInformation.tenant(""); - keyInformation.keyType("sharedSecret"); - keyInformation.organizationId(""); - requestObj.keyInformation(keyInformation); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); - apiInstance.saveSymEgressKey(vCsenderOrganizationId, vCpermissions, vCcorrelationId, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithClientCredentials.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithClientCredentials.java deleted file mode 100644 index 9ebad8e..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithClientCredentials.java +++ /dev/null @@ -1,96 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateWebhookUsingOAuthWithClientCredentials { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("terminalManagement"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("terminalManagement.assignment.update"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("oAuth"); -// securityPolicy.proxyType("external"); -// Notificationsubscriptionsv1webhooksSecurityPolicy1Config securityPolicyConfig = new Notificationsubscriptionsv1webhooksSecurityPolicy1Config(); -// securityPolicyConfig.oAuthTokenExpiry("365"); -// securityPolicyConfig.oAuthURL("https://MyWebhookServer.com:8443/oAuthToken"); -// securityPolicyConfig.oAuthTokenType("Bearer"); -// securityPolicy.config(securityPolicyConfig); -// -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithJWT.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithJWT.java deleted file mode 100644 index fce2363..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/CreateWebhookUsingOAuthWithJWT.java +++ /dev/null @@ -1,103 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class CreateWebhookUsingOAuthWithJWT { - 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 { - run(); - } - - public static void run() { - -// CreateWebhookRequest requestObj = new CreateWebhookRequest(); -// -// requestObj.name("My Custom Webhook"); -// requestObj.description("Sample Webhook from Developer Center"); -// requestObj.organizationId(""); -// requestObj.productId("terminalManagement"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("terminalManagement.assignment.update"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443/simulateClientHealthCheck"); -// requestObj.notificationScope("SELF"); -// Notificationsubscriptionsv1webhooksRetryPolicy retryPolicy = new Notificationsubscriptionsv1webhooksRetryPolicy(); -// retryPolicy.algorithm("ARITHMETIC"); -// retryPolicy.firstRetry(1); -// retryPolicy.interval(1); -// retryPolicy.numberOfRetries(3); -// retryPolicy.deactivateFlag("false"); -// retryPolicy.repeatSequenceCount(0); -// retryPolicy.repeatSequenceWaitTime(0); -// requestObj.retryPolicy(retryPolicy); -// -// Notificationsubscriptionsv1webhooksSecurityPolicy1 securityPolicy = new Notificationsubscriptionsv1webhooksSecurityPolicy1(); -// securityPolicy.securityType("oAuth_JWT"); -// securityPolicy.proxyType("external"); -// Notificationsubscriptionsv1webhooksSecurityPolicy1Config securityPolicyConfig = new Notificationsubscriptionsv1webhooksSecurityPolicy1Config(); -// securityPolicyConfig.oAuthTokenExpiry("365"); -// securityPolicyConfig.oAuthURL("https://MyWebhookServer.com:8443/oAuthToken"); -// securityPolicyConfig.oAuthTokenType("Bearer"); -// Notificationsubscriptionsv1webhooksSecurityPolicy1ConfigAdditionalConfig securityPolicyConfigAdditionalConfig = new Notificationsubscriptionsv1webhooksSecurityPolicy1ConfigAdditionalConfig(); -// securityPolicyConfigAdditionalConfig.aud("idp.api.myServer.com"); -// securityPolicyConfigAdditionalConfig.clientId("650538A1-7AB0-AD3A-51AB-932ABC57AD70"); -// securityPolicyConfigAdditionalConfig.keyId("y-daaaAVyF0176M7-eAZ34pR9Ts"); -// securityPolicyConfigAdditionalConfig.scope("merchantacq:rte:write"); -// securityPolicyConfig.additionalConfig(securityPolicyConfigAdditionalConfig); -// -// securityPolicy.config(securityPolicyConfig); -// -// requestObj.securityPolicy(securityPolicy); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.createWebhookSubscription(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/FindProductsYouCanSubscribeTo.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/FindProductsYouCanSubscribeTo.java deleted file mode 100644 index e626401..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/FindProductsYouCanSubscribeTo.java +++ /dev/null @@ -1,61 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class FindProductsYouCanSubscribeTo { - 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 { - run(null); - } - - public static void run(String organizationId) { - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); -// apiInstance.findProductsToSubscribe(organizationId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/CreateNewWebhooks/StoreOAuthCredentials.java b/src/main/java/samples/Webhooks/CreateNewWebhooks/StoreOAuthCredentials.java deleted file mode 100644 index a9cb2a8..0000000 --- a/src/main/java/samples/Webhooks/CreateNewWebhooks/StoreOAuthCredentials.java +++ /dev/null @@ -1,74 +0,0 @@ -package samples.Webhooks.CreateNewWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class StoreOAuthCredentials { - 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 { - run(null, null, null); - } - - public static void run(String vCcorrelationId, String vCsenderOrganizationId, String vCpermissions) { - - SaveSymEgressKey requestObj = new SaveSymEgressKey(); - - requestObj.clientRequestAction("STORE"); - Kmsegressv2keyssymKeyInformation keyInformation = new Kmsegressv2keyssymKeyInformation(); - keyInformation.provider(""); - keyInformation.tenant("nrtd"); - keyInformation.keyType("oAuthClientCredentials"); - keyInformation.organizationId(""); - keyInformation.clientKeyId("client username"); - keyInformation.key("client secret"); - keyInformation.expiryDuration("365"); - requestObj.keyInformation(keyInformation); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - CreateNewWebhooksApi apiInstance = new CreateNewWebhooksApi(apiClient); - apiInstance.saveSymEgressKey(vCsenderOrganizationId, vCpermissions, vCcorrelationId, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); - } catch (ApiException e) { - e.printStackTrace(); - WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/CreateAsymmetricKey.java b/src/main/java/samples/Webhooks/ManageWebhooks/CreateAsymmetricKey.java deleted file mode 100644 index 0cadf66..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/CreateAsymmetricKey.java +++ /dev/null @@ -1,66 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.lang.invoke.MethodHandles; -import java.util.*; - -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.*; - -public class CreateAsymmetricKey { - 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 { - run(null, null, null); - } - - public static InlineResponse2017 run(String vCcorrelationId, String vCsenderOrganizationId, String vCpermissions) { - SaveAsymEgressKey requestObj = new SaveAsymEgressKey(); - - requestObj.clientRequestAction("STORE"); - Kmsegressv2keysasymKeyInformation keyInformation = new Kmsegressv2keysasymKeyInformation(); - keyInformation.provider("merchantName"); - keyInformation.tenant("nrtd"); - keyInformation.keyType("publickey"); - keyInformation.organizationId("merchantName"); - keyInformation.pub("MIIDbDCCAlQCCQD4lcSlmasmCTANBgkqhkiG9w0BAQsFADB4MQswCQYDVQQGEwJVUzELMAkGA1UECAwCVFgxDzANBgNVBAcMBkF1c3RpbjENMAsGA1UECgwEVGVzdDEOMAwGA1UECwwFVGVzdDIxDjAMBgNVBAMMBVRlc3QzMRwwGgYJKoZIhvcNAQkBFg10ZXN0QHRlc3QuY29tMB4XDTIxMDgwOTE0MTcxNFoXDTIyMDgwOTE0MTcxNFoweDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAlRYMQ8wDQYDVQQHDAZBdXN0aW4xDTALBgNVBAoMBFRlc3QxDjAMBgNVBAsMBVRlc3QyMQ4wDAYDVQQDDAVUZXN0MzEcMBoGCSqGSIb3DQEJARYNdGVzdEB0ZXN0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMcHQWZRETqim3XzUQlAiujFEvsHIi1uJZKj+1lvPH36Ucqo3ORcoh/MM/zxVdahjhSyyp7MHuKBWnzft6bFeDEul6qKWGPAAzaxG/2xZSV3FggA9SyAZEDUpJ6mblwqm/EY4KmZi1FrNBUHfW2wwaqDexHPRDesRG6aI7Wuu4GdQUUqoTa2+Nv7kVgEDmGcfIjoWkGKHe+Yan95EITrq4jEFCE5Tg/vERnMvHfK2SovENZ13/pnwFYbeh1kfJSBzWW7yq8AyQAgAE9iqJXbJ/MAasir2vjUQ2+Hcl7WbkpoVjLqDt3rzV1T0Bsd4T9SC3wij9qjJSxa6vAgV4xn6bECAwEAATANBgkqhkiG9w0BAQsFAAOCAQEADuMrtYW1Sf0IsZ4ZD9ipjUrFuTxqh+0M5Jk8h0QqAXEHA/MawedlU3JmE3NB/UR82/XUwdmtObGnFANuUQQ+8WMFpcNo/Sq2kg7juneHZroRh72o73UUMtHWHzo8s0fXElNal8h3SaAAnjMblCiN+gM1RvWMvhGrMTXp2XAcdIezXf8/FOZLlzOF9QylbSk1U4ayWBag6MydkxgHjkPKdShZROEm0oz/O7J/gNp/r7J8F42Rw9MmJh9qH3SFre13nQa8V7Kg+dJHZ/jpGtSlDHAxO0SSTrPXkwB+iBJ6hSkiL/J2Ep+lYHqVe3p5NXMOlTtJdbU4enHeLkD6PazKTw"); - keyInformation.expiryDuration("365"); - requestObj.keyInformation(keyInformation); - - InlineResponse2017 result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ManageWebhooksApi apiInstance = new ManageWebhooksApi(apiClient); - result = apiInstance.saveAsymEgressKey(vCsenderOrganizationId, vCpermissions, requestObj, vCcorrelationId); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/DeleteWebhookSubscription.java b/src/main/java/samples/Webhooks/ManageWebhooks/DeleteWebhookSubscription.java deleted file mode 100644 index 7ea683b..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/DeleteWebhookSubscription.java +++ /dev/null @@ -1,61 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class DeleteWebhookSubscription { - 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 { - run(null); - } - - public static void run(String webhookId) { - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ManageWebhooksApi apiInstance = new ManageWebhooksApi(apiClient); -// apiInstance.deleteWebhookSubscription(webhookId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnAllCreatedWebhooks.java b/src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnAllCreatedWebhooks.java deleted file mode 100644 index 5cd06f0..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnAllCreatedWebhooks.java +++ /dev/null @@ -1,67 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class GetDetailsOnAllCreatedWebhooks { - 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 { - run(); - } - - public static List run() { - // QUERY PARAMETERS - String organizationId = "testrest"; - String productId = "testProductId"; - String eventType = "testEventType"; - - List result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ManageWebhooksApi apiInstance = new ManageWebhooksApi(apiClient); -// result = apiInstance.getWebhookSubscriptionsByOrg(organizationId, productId, eventType); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - - return result; - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnSingleWebhook.java b/src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnSingleWebhook.java deleted file mode 100644 index bca3a83..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/GetDetailsOnSingleWebhook.java +++ /dev/null @@ -1,61 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class GetDetailsOnSingleWebhook { - 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 { - run(null); - } - - public static void run(String webhookId) { - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ManageWebhooksApi apiInstance = new ManageWebhooksApi(apiClient); - // apiInstance.getWebhookSubscriptionById(webhookId); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsBySetStartAndEndTime.java b/src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsBySetStartAndEndTime.java deleted file mode 100644 index c302fad..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsBySetStartAndEndTime.java +++ /dev/null @@ -1,69 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class ReplayFailedTransactionsBySetStartAndEndTime { - 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 { - run(null); - } - - public static void run(String webhookId) { - -// ReplayWebhooksRequest requestObj = new ReplayWebhooksRequest(); - -// Nrtfv1webhookswebhookIdreplaysByDeliveryStatus byDeliveryStatus = new Nrtfv1webhookswebhookIdreplaysByDeliveryStatus(); -// byDeliveryStatus.status("FAILED"); -// byDeliveryStatus.startTime(new DateTime("2021-01-01T15:05:52.284+05:30")); -// byDeliveryStatus.endTime(new DateTime("2021-01-02T03:05:52.284+05:30")); -// byDeliveryStatus.productId("tokenManagement"); -// byDeliveryStatus.eventType("tms.token.created"); -// requestObj.byDeliveryStatus(byDeliveryStatus); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - -// ReplayWebhooksApi apiInstance = new ReplayWebhooksApi(apiClient); -// apiInstance.replayPreviousWebhooks(webhookId, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsInLast24Hours.java b/src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsInLast24Hours.java deleted file mode 100644 index 9b6294c..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/ReplayFailedTransactionsInLast24Hours.java +++ /dev/null @@ -1,68 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class ReplayFailedTransactionsInLast24Hours { - 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 { - run(null); - } - - public static void run(String webhookId) { -// -// ReplayWebhooksRequest requestObj = new ReplayWebhooksRequest(); -// -// Nrtfv1webhookswebhookIdreplaysByDeliveryStatus byDeliveryStatus = new Nrtfv1webhookswebhookIdreplaysByDeliveryStatus(); -// byDeliveryStatus.status("FAILED"); -// byDeliveryStatus.hoursBack(24); -// byDeliveryStatus.productId("tokenManagement"); -// byDeliveryStatus.eventType("tms.token.created"); -// requestObj.byDeliveryStatus(byDeliveryStatus); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - -// ReplayWebhooksApi apiInstance = new ReplayWebhooksApi(apiClient); -// apiInstance.replayPreviousWebhooks(webhookId, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/ReplaySpecificListOfTransactions.java b/src/main/java/samples/Webhooks/ManageWebhooks/ReplaySpecificListOfTransactions.java deleted file mode 100644 index c28ac77..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/ReplaySpecificListOfTransactions.java +++ /dev/null @@ -1,70 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class ReplaySpecificListOfTransactions { - 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 { - run(null); - } - - public static void run(String webhookId) { - -// ReplayWebhooksRequest requestObj = new ReplayWebhooksRequest(); -// -// -// List byTransactionTraceIdentifiers = new ArrayList (); -// byTransactionTraceIdentifiers.add("1f1d0bf4-9299-418d-99d8-faa3313829f1"); -// byTransactionTraceIdentifiers.add("d19fb205-20e5-43a2-867e-bd0f574b771e"); -// byTransactionTraceIdentifiers.add("2f2461a3-457c-40e9-867f-aced89662bbb"); -// byTransactionTraceIdentifiers.add("e23ddc19-93d5-4f1f-8482-d7cafbb3ed9b"); -// byTransactionTraceIdentifiers.add("eb9fc4a9-b31f-48d5-81a9-b1d773fd76d8"); -// requestObj.byTransactionTraceIdentifiers(byTransactionTraceIdentifiers); - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - -// ReplayWebhooksApi apiInstance = new ReplayWebhooksApi(apiClient); -// apiInstance.replayPreviousWebhooks(webhookId, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/src/main/java/samples/Webhooks/ManageWebhooks/UpdateWebhook.java b/src/main/java/samples/Webhooks/ManageWebhooks/UpdateWebhook.java deleted file mode 100644 index 9fc1b41..0000000 --- a/src/main/java/samples/Webhooks/ManageWebhooks/UpdateWebhook.java +++ /dev/null @@ -1,80 +0,0 @@ -package samples.Webhooks.ManageWebhooks; - -import java.*; -import java.lang.invoke.MethodHandles; -import java.util.*; -import java.math.BigDecimal; -import org.apache.commons.io.FileUtils; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.joda.time.LocalDate; - -import com.google.common.base.Strings; -import com.cybersource.authsdk.core.MerchantConfig; - -import Api.*; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Invokers.ApiResponse; -import Model.*; - -public class UpdateWebhook { - 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 { - run(null); - } - - public static void run(String webhookId) { - -// UpdateWebhookRequest requestObj = new UpdateWebhookRequest(); -// -// requestObj.name("My Sample Webhook"); -// requestObj.description("Update to my sample webhook"); -// requestObj.organizationId(""); -// requestObj.productId("terminalManagement"); -// -// List eventTypes = new ArrayList (); -// eventTypes.add("terminalManagement.assignment.update"); -// eventTypes.add("terminalManagement.status.update"); -// requestObj.eventTypes(eventTypes); -// -// requestObj.webhookUrl("https://MyWebhookServer.com:8443:/simulateClient"); -// requestObj.healthCheckUrl("https://MyWebhookServer.com:8443:/simulateClientHealthCheck"); -// requestObj.status("INACTIVE"); -// Notificationsubscriptionsv1webhooksNotificationScope notificationScope = new Notificationsubscriptionsv1webhooksNotificationScope(); -// notificationScope.scope("SELF"); -// requestObj.notificationScope(notificationScope); - - - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - ManageWebhooksApi apiInstance = new ManageWebhooksApi(apiClient); -// apiInstance.updateWebhookSubscription(webhookId, requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - WriteLogAudit(Integer.parseInt(responseCode)); -// } catch (ApiException e) { -// e.printStackTrace(); -// WriteLogAudit(e.getCode()); - } catch (Exception e) { - e.printStackTrace(); - } - - } -} \ No newline at end of file diff --git a/src/main/java/samples/authentication/AuthSampleCode/DeleteGenerateHeaders.java b/src/main/java/samples/authentication/AuthSampleCode/DeleteGenerateHeaders.java deleted file mode 100644 index 86bc5c7..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/DeleteGenerateHeaders.java +++ /dev/null @@ -1,119 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.time.ZoneId; -//import java.time.ZonedDateTime; -//import java.time.format.DateTimeFormatter; -//import java.util.Properties; -// -//import org.apache.logging.log4j.LogManager; -//import org.apache.logging.log4j.Logger; -//import com.cybersource.authsdk.core.Authorization; -//import com.cybersource.authsdk.core.MerchantConfig; -//import com.cybersource.authsdk.util.GlobalLabelParameters; -//import com.cybersource.authsdk.util.PropertiesUtil; -// -//import samples.authentication.harness.MerchantProperties; -///** -// * This class generates the Headers that are present in the token was sent the server for transaction, -// * Delete operations. -// * * -// */ -//public class DeleteGenerateHeaders { -// -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private String authenticationType = null; -// private Authorization auth; -// private static String requestType = "DELETE"; -// private String date = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneId.of("GMT"))); -// Logger logger; -// -// private String tempSig; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /** -// * -// * @param getID -// * : Unique getID -// * @throws Exception -// * : -// */ -// public DeleteGenerateHeaders(MerchantConfig merchantConfig) throws Exception { -// logger = LogManager.getLogger(getClass()); -// merchantConfig.validateMerchantDetails(requestType); -// auth = new Authorization(); -// generateDeleteHeaders(merchantConfig); -// } -// -// public DeleteGenerateHeaders() throws Exception { -// auth = new Authorization(); -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -// -// this.logger = LogManager.getLogger(getClass()); -// this.logger.info(GlobalLabelParameters.BEGIN_TRANSACTION + "\n******************* Delete Generate Headers *******************"); -// -// System.out.println("Authentication Type : " + merchantConfig.getAuthenticationType().trim()); -// -// boolean isMerchant = merchantConfig.validateMerchantDetails("DELETE"); -// if(isMerchant){ -// generateDeleteHeaders(merchantConfig); -// } else { -// WriteLogAudit(400); -// } -// -// this.logger.info(GlobalLabelParameters.END_TRANSACTION + "\n"); -// } -// -// /** -// * This method generates the detailed header detail of the transaction and displays and log them. -// * @throws Exception -// */ -// private void generateDeleteHeaders(MerchantConfig merchantConfig) throws Exception { -// authenticationType = merchantConfig.getAuthenticationType().trim(); -// -// this.logger.info(GlobalLabelParameters.AUTENTICATION_TYPE + authenticationType); -// this.logger.info(GlobalLabelParameters.REQUEST_TYPE + " : " + requestType); -// this.logger.info(GlobalLabelParameters.DATE + " : " + date); -// this.logger.info(GlobalLabelParameters.HOST + " : " + merchantConfig.getRequestHost()); -// this.logger.info(GlobalLabelParameters.V_C_MERCHANTID + " : " + merchantConfig.getMerchantID().trim()); -// this.logger.info(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// -// System.out.println("Request Type : " + requestType); -// System.out.println("Date : " + date); -// System.out.println("MerchantID : " + merchantConfig.getMerchantID().trim()); -// System.out.println("HOST : " + merchantConfig.getRequestHost()); -// System.out.println(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// -// if (authenticationType.equalsIgnoreCase(GlobalLabelParameters.HTTP)) { -// System.out.println(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// this.logger.info(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// String date = PropertiesUtil.getNewDate(); -// tempSig = auth.getToken(merchantConfig,requestType,null,null,date); -// System.out.println("Signature : " + tempSig.toString()); -// WriteLogAudit(200); -// -// } else { -// String jwtRequestBody = null; -// String date = PropertiesUtil.getNewDate(); -// tempSig = auth.getToken(merchantConfig,requestType,jwtRequestBody,null,date); -// System.out.println("Authorization, Bearer " + tempSig.toString()); -// WriteLogAudit(200); -// } -// } -// -// /** -// * -// * @param args : Contains getId entry. -// * @throws Exception -// */ -// public static void main(String[] args) throws Exception { -// -// new DeleteGenerateHeaders(); -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/DeleteMethod.java b/src/main/java/samples/authentication/AuthSampleCode/DeleteMethod.java deleted file mode 100644 index d36bb94..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/DeleteMethod.java +++ /dev/null @@ -1,107 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.util.Properties; -// -//import org.apache.commons.lang3.StringUtils; -// -//import com.cybersource.apisdk.controller.ApiController; -//import com.cybersource.apisdk.model.Response; -//import com.cybersource.authsdk.core.MerchantConfig; -//import samples.authentication.harness.MerchantProperties; -// -///** -// * Depending on the authentication type HTTP or JWT , this class performs the -// * PUT operation on the test url 'apitest.cybersource.com'. -// */ -//public class DeleteMethod { -// private ApiController apiController; -// private String authenticationType; -// private String response; -// private String responseCode; -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private Response responseObj; -// /* Request Type is always PUT */ -// private String requestType = "DELETE"; -// /* Give the url path to where the data needs to be authenticated. */ -// private String url; -// /* Request Target. */ -// private String requestTarget = "/reporting/v2/reportSubscriptions/TRRReport?organizationId=testrest"; -// private String requestJson = "{ \"startDay\":\"23\",\r\n" + -// " \"timeZone\":\"America/Chicago\",\r\n" + -// " \"reportDefinitionName\":\"TransactionRequestClass\",\r\n" + -// " \"startTime\":\"1100\",\r\n" + -// " \"reportFrequency\":\"DAILY\",\r\n" + -// " \"ReportName\":\"TRRReport\",\r\n" + -// " \"reportFormat\":\"csv\",\r\n" + -// " \"orgId\":\"testrest\",\r\n" + -// " \"reportType\":\"detail\",\r\n" + -// " \"reportFields\": [\"Request.RequestID\",\"Request.TransactionDate\",\"Request.MerchantReferenceNumber\",\"Request.MerchantID\"]\r\n" + -// "}"; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /* This method initiates or begins the process. */ -// public static void main(String[] args) throws Exception { -// new DeleteMethod(); -// } -// -// /** -// * -// * @param -// * @return -// * @throws Exception -// */ -// public DeleteMethod() throws Exception { -// apiController = new ApiController(); -// -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -// -// authenticationType = merchantConfig.getAuthenticationType().trim(); -// -// /* Begin PUT process. */ -// url = "https://" + merchantConfig.getRequestHost() + requestTarget; -// process(); -// } -// -// /** -// * Calls the APISDK for processing the payment request. -// * -// * @throws Exception -// */ -// private void process() throws Exception { -// System.out.println(authenticationType.toUpperCase() + " Request"); -// -// try { -// /* Call payment method of Api Controller class */ -// responseObj = apiController.paymentGet(merchantConfig); -// response = responseObj.getResponseMessage(); -// /* Display Response Message from the server. */ -// responseCode = responseObj.getResponseCode(); -// if (responseCode.equals("200") || responseCode.equals("404")) { -// WriteLogAudit(200); -// } else { -// WriteLogAudit(Integer.parseInt(responseCode)); -// } -// String vcCorrelationId = responseObj.getVcCorelationId(); -// if (!StringUtils.isBlank(responseCode)&& !StringUtils.isBlank(response)) { -// new DeleteGenerateHeaders(merchantConfig); -// System.out.println("URL : " + url); -// System.out.println("Response Code : " + responseCode); -// System.out.println("V-C-Corealation ID : " + vcCorrelationId); -// System.out.println("Response Message : " + response); -// } -// else { -// System.out.println(responseObj.getResponseMessage()); -// } -// } catch (Exception e) { -// System.out.println(e.getMessage()); -// WriteLogAudit(400); -// } -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/GetGenerateHeaders.java b/src/main/java/samples/authentication/AuthSampleCode/GetGenerateHeaders.java deleted file mode 100644 index af24ef9..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/GetGenerateHeaders.java +++ /dev/null @@ -1,164 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.time.ZoneId; -//import java.time.ZonedDateTime; -//import java.time.format.DateTimeFormatter; -//import java.util.Properties; -// -//import org.apache.logging.log4j.LogManager; -//import org.apache.logging.log4j.Logger; -// -//import com.cybersource.authsdk.core.Authorization; -//import com.cybersource.authsdk.core.MerchantConfig; -//import com.cybersource.authsdk.util.GlobalLabelParameters; -//import com.cybersource.authsdk.util.PropertiesUtil; -//import com.cybersource.authsdk.util.Utility; -// -//import samples.authentication.harness.MerchantProperties; -///** -// * This class generates the Headers that are present in the token was sent the server for transaction, -// * GET operations. -// * * -// */ -//public class GetGenerateHeaders { -// -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private String authenticationType = null; -// private Authorization auth; -// private Logger logger; -// private String tempSig; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /** -// * DATE -// * [Non-Editable] -// */ -// private String date = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneId.of("GMT"))); -// -// /** -// * REQUEST - TYPE -// * [Non-Editable] -// * -// */ -// private String requestType = "GET"; -// -// /** -// * -// * UNQUIE GetID -// * [Editable] -// */ -// private String getID = "5265502011846829204101"; -// -// /** -// * -// * @param getID -// * : Unique getID -// * @throws Exception -// * : -// */ -// public GetGenerateHeaders(String requestTarget) throws Exception { -// setGenerateHeaders(); -// this.getID = Utility.retrieveGetIDFromRequestTarget(requestTarget); -// generateGetHeaders(); -// } -// -// /** -// * -// * @param merchantConfig -// * : this object contains all the cybs.properites details. -// * @throws Exception -// */ -// public GetGenerateHeaders(MerchantConfig merchantConfig) throws Exception { -// this.merchantConfig = merchantConfig; -// -// // merchantConfig.setGetID(getID); -//// merchantConfig.setRequestType(requestType); -// -// this.logger = LogManager.getLogger(getClass()); -// -// auth = new Authorization(); -// generateGetHeaders(); -// -// this.logger.info(GlobalLabelParameters.END_TRANSACTION + "\n"); -// } -// -// public GetGenerateHeaders() throws Exception { -// setGenerateHeaders(); -// -// System.out.println("Authentication Type : " + merchantConfig.getAuthenticationType().trim()); -// this.logger.info(GlobalLabelParameters.BEGIN_TRANSACTION + "\n******************* Generate GET Headers *******************"); -// -// merchantConfig.validateMerchantDetails(requestType); -// generateGetHeaders(); -// -// this.logger.info(GlobalLabelParameters.END_TRANSACTION + "\n"); -// } -// -// private void setGenerateHeaders() throws Exception { -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -// authenticationType = merchantConfig.getAuthenticationType().trim(); -// //merchantConfig.setRequestType(requestType); -// this.logger = LogManager.getLogger(getClass()); -// auth = new Authorization(); -// } -// -// /** -// * This method generates the detailed header detail of the transaction and -// * displays and log them. -// * -// * @throws Exception -// * : Throws runtime exception. -// */ -// private void generateGetHeaders() throws Exception { -// authenticationType = merchantConfig.getAuthenticationType().trim(); -// -// this.logger.info(GlobalLabelParameters.AUTENTICATION_TYPE + authenticationType); -// this.logger.info(GlobalLabelParameters.REQUEST_TYPE + " : " + requestType); -// this.logger.info(GlobalLabelParameters.DATE + " : " + date); -// this.logger.info(GlobalLabelParameters.V_C_MERCHANTID + " : " + merchantConfig.getMerchantID().trim()); -// this.logger.info(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// this.logger.info(GlobalLabelParameters.HOST + " : " + merchantConfig.getRequestHost()); -// this.logger.info(GlobalLabelParameters.GET + "_ID : " + this.getID); -// this.logger.info(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// -// System.out.println("Request Type : " + requestType); -// System.out.println("ID : " + this.getID); -// System.out.println("Date : " + date); -// System.out.println("MerchantID : " + merchantConfig.getMerchantID().trim()); -// System.out.println("HOST : " + merchantConfig.getRequestHost()); -// System.out.println(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// -// if (authenticationType.equalsIgnoreCase(GlobalLabelParameters.HTTP)) { -// System.out.println(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// this.logger.info(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// String date = PropertiesUtil.getNewDate(); -// tempSig = auth.getToken(merchantConfig,requestType,null,null,date); -// System.out.println("Signature : " + tempSig.toString()); -// WriteLogAudit(200); -// -// } else { -// String jwtRequestBody = getID; -// String date = PropertiesUtil.getNewDate(); -// tempSig = auth.getToken(merchantConfig,requestType,jwtRequestBody,null,date); -// System.out.println("Authorization, Bearer " + tempSig.toString()); -// WriteLogAudit(200); -// } -// } -// -// /** -// * -// * @param args -// * : Contains getId entry. -// * @throws Exception -// */ -// public static void main(String[] args) throws Exception { -// new GetGenerateHeaders(); -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/GetMethod.java b/src/main/java/samples/authentication/AuthSampleCode/GetMethod.java deleted file mode 100644 index 5a4d81e..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/GetMethod.java +++ /dev/null @@ -1,86 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.util.Properties; -// -//import org.apache.commons.lang3.StringUtils; -// -//import com.cybersource.apisdk.controller.ApiController; -//import com.cybersource.apisdk.model.Response; -//import com.cybersource.authsdk.core.MerchantConfig; -// -//import samples.authentication.harness.MerchantProperties; -// -//public class GetMethod { -// private ApiController apiController; -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private Response response; -// private String authenticationType; -// -// /** -// * REQUEST TARGET / UNIQUE GET ID [Editable] -// */ -// private String requestTarget = "/pts/v2/payments/6065710300556203803003"; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /** -// * REQUEST-TYPE. [Non-Editable] -// */ -// private String requestType = "GET"; -// -// private String url; -// -// /* This method initiates or begins the process. */ -// public static void main(String args[]) throws Exception { -// new GetMethod(); -// } -// -// /** -// * -// * @throws Exception -// * : Throws runtime exceptions. -// */ -// public GetMethod() throws Exception { -// apiController = new ApiController(); -// -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -//// merchantConfig.setRequestType(requestType); -// authenticationType = merchantConfig.getAuthenticationType().trim(); -//// merchantConfig.setRequestTarget(requestTarget); -// url = "https://" + merchantConfig.getRequestHost() + requestTarget; -// /* Begin the Get process. */ -// process(); -// } -// -// /** -// * -// */ -// private void process() { -// System.out.println(authenticationType.toUpperCase() + " Request"); -// -// try { -// response = apiController.paymentGet(merchantConfig); -// WriteLogAudit(Integer.parseInt(response.getResponseCode())); -// -// if (!StringUtils.isBlank(response.getResponseCode())&& !StringUtils.isBlank(response.getResponseMessage())) { -// new GetGenerateHeaders(requestTarget); -// System.out.println(" URL : " + url); -// System.out.println(" Response Code : " + response.getResponseCode()); -// System.out.println(" V-C-Corealation ID : " + response.getVcCorelationId()); -// System.out.println(" Response Message : " + response.getResponseMessage()); -// } -// else { -// System.out.println(response.getResponseMessage()); -// } -// } catch (Exception e) { -// System.out.println(e.getMessage()); -// WriteLogAudit(400); -// } -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/GetObjectMethod.java b/src/main/java/samples/authentication/AuthSampleCode/GetObjectMethod.java deleted file mode 100644 index 66a29c3..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/GetObjectMethod.java +++ /dev/null @@ -1,83 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.util.Properties; -// -//import org.apache.commons.lang3.StringUtils; -// -//import com.cybersource.apisdk.controller.ApiController; -//import com.cybersource.apisdk.model.Response; -//import com.cybersource.authsdk.core.MerchantConfig; -// -//import samples.authentication.Data.Configuration; -// -//public class GetObjectMethod { -// private ApiController apiController; -// private String authenticationType; -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private Response response; -// /** -// * REQUEST TARGET [Editable] -// */ -// private String requestTarget = "/pts/v2/payments/6040716095406990004003"; -// /* Request Type [Non-Editable.] */ -// private String requestType = "GET"; -// /* [Non Editable] */ -// private String url; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /* This method initiates or begins the process. */ -// public static void main(String[] args) throws Exception { -// new GetObjectMethod(); -// } -// -// /** -// * @throws Exception -// */ -// public GetObjectMethod() throws Exception { -// apiController = new ApiController(); -// /* Read Merchant details. */ -// merchantProp = Configuration.getMerchantDetails(); -// merchantConfig = new MerchantConfig(merchantProp); -// /* Set Request Type */ -//// merchantConfig.setRequestType(requestType); -// /* Extract Authentication Type from cybs.properties */ -// authenticationType = merchantConfig.getAuthenticationType().trim(); -//// merchantConfig.setRequestTarget(requestTarget); -// /* Construct the URL with respect to GETID. */ -// url = "https://" + merchantConfig.getRequestHost() + requestTarget; -// /* Begin the Get process. */ -// process(); -// } -// -// /** -// * Calls the APISDK for processing the payment request. -// * -// * @throws Exception -// */ -// private void process() { -// System.out.println(authenticationType.toUpperCase() + " Request"); -// -// try { -// /* Calling APISDK, com.cybersouce.api.controller. */ -// response = apiController.paymentGet(merchantConfig); -// WriteLogAudit(Integer.parseInt(response.getResponseCode())); -// /* Display response message and Headers in console. */ -// if (!StringUtils.isBlank(response.getResponseCode()) && !StringUtils.isBlank(response.getResponseMessage())) { -// new GetGenerateHeaders(merchantConfig); -// System.out.println("URL : " + url); -// System.out.println("Response Code : " + response.getResponseCode()); -// System.out.println("V-C-Corealation ID : " + response.getVcCorelationId()); -// System.out.println("Response Message : " + response.getResponseMessage()); -// } -// } catch (Exception e) { -// System.out.println(e.getMessage()); -// WriteLogAudit(400); -// } -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/PostGenerateHeaders.java b/src/main/java/samples/authentication/AuthSampleCode/PostGenerateHeaders.java deleted file mode 100644 index 410ef68..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/PostGenerateHeaders.java +++ /dev/null @@ -1,189 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.time.ZoneId; -//import java.time.ZonedDateTime; -//import java.time.format.DateTimeFormatter; -//import java.util.Properties; -// -//import org.apache.logging.log4j.LogManager; -//import org.apache.logging.log4j.Logger; -// -//import com.cybersource.authsdk.core.Authorization; -//import com.cybersource.authsdk.core.MerchantConfig; -//import com.cybersource.authsdk.payloaddigest.PayloadDigest; -//import com.cybersource.authsdk.util.GlobalLabelParameters; -//import com.cybersource.authsdk.util.PropertiesUtil; -// -//import samples.authentication.harness.MerchantProperties; -// -///** -// * This class generates the Headers that are present in the token was sent the -// * server for transaction, for POST operation. -// * -// */ -//public class PostGenerateHeaders { -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private String authenticationType = null; -// private Authorization auth; -// private PayloadDigest digest; -// private Logger logger = null; -// private String tempSig; -// -// /** -// * DATE GMT [Non - Editable] -// * -// */ -// private String date = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneId.of("GMT"))); -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /** -// * REQUEST - TYPE [Non-Editable] -// * -// */ -// private String requestType = "POST"; -// -// private String requestJson = "{\r\n" + -// " \"clientReferenceInformation\": {\r\n" + -// " \"code\": \"TC50171_3\"\r\n" + -// " },\r\n" + -// " \"processingInformation\": {\r\n" + -// " \"commerceIndicator\": \"internet\"\r\n" + -// " },\r\n" + -// " \"aggregatorInformation\": {\r\n" + -// " \"subMerchant\": {\r\n" + -// " \"cardAcceptorID\": \"1234567890\",\r\n" + -// " \"country\": \"US\",\r\n" + -// " \"phoneNumber\": \"650-432-0000\",\r\n" + -// " \"address1\": \"900 Metro Center\",\r\n" + -// " \"postalCode\": \"94404-2775\",\r\n" + -// " \"locality\": \"Foster City\",\r\n" + -// " \"name\": \"Visa Inc\",\r\n" + -// " \"administrativeArea\": \"CA\",\r\n" + -// " \"region\": \"PEN\",\r\n" + -// " \"email\": \"test@cybs.com\"\r\n" + -// " },\r\n" + -// " \"name\": \"V-Internatio\",\r\n" + -// " \"aggregatorID\": \"123456789\"\r\n" + -// " },\r\n" + -// " \"orderInformation\": {\r\n" + -// " \"billTo\": {\r\n" + -// " \"country\": \"US\",\r\n" + -// " \"lastName\": \"VDP\",\r\n" + -// " \"address2\": \"Address 2\",\r\n" + -// " \"address1\": \"201 S. Division St.\",\r\n" + -// " \"postalCode\": \"48104-2201\",\r\n" + -// " \"locality\": \"Ann Arbor\",\r\n" + -// " \"administrativeArea\": \"MI\",\r\n" + -// " \"firstName\": \"RTS\",\r\n" + -// " \"phoneNumber\": \"999999999\",\r\n" + -// " \"district\": \"MI\",\r\n" + -// " \"buildingNumber\": \"123\",\r\n" + -// " \"company\": \"Visa\",\r\n" + -// " \"email\": \"test@cybs.com\"\r\n" + -// " },\r\n" + -// " \"amountDetails\": {\r\n" + -// " \"totalAmount\": \"102.21\",\r\n" + -// " \"currency\": \"USD\"\r\n" + -// " }\r\n" + -// " },\r\n" + -// " \"paymentInformation\": {\r\n" + -// " \"card\": {\r\n" + -// " \"expirationYear\": \"2031\",\r\n" + -// " \"number\": \"5555555555554444\",\r\n" + -// " \"securityCode\": \"123\",\r\n" + -// " \"expirationMonth\": \"12\",\r\n" + -// " \"type\": \"002\"\r\n" + -// " }\r\n" + -// " }\r\n" + -// "}"; -// -// /** -// * -// * @throws Exception -// * : Error while generating headers. -// */ -// public PostGenerateHeaders() throws Exception { -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -// this.logger = LogManager.getLogger(getClass()); -// System.out.println("Authentication Type : " + merchantConfig.getAuthenticationType().trim()); -// this.logger.info(GlobalLabelParameters.BEGIN_TRANSACTION + "\n******************* Generate POST Headers *******************"); -// -//// merchantConfig.setRequestType(requestType); -//// merchantConfig.setRequestData(requestJson); -// -// digest = new PayloadDigest(requestJson); -// boolean isMerchant = merchantConfig.validateMerchantDetails(requestType); -// -// auth = new Authorization(); -// digest = new PayloadDigest(requestJson); -// if (isMerchant) { -// generatePostHeaders(); -// } -// -// this.logger.info(GlobalLabelParameters.END_TRANSACTION + "\n"); -// } -// -// /** -// * -// * @param merchantConfig -// * : this object contains all the cybs.properites details. -// * @throws Exception -// */ -// public PostGenerateHeaders(MerchantConfig merchantConfig) throws Exception { -// this.merchantConfig = merchantConfig; -// auth = new Authorization(); -// logger = LogManager.getLogger(getClass()); -// digest = new PayloadDigest(requestJson); -// generatePostHeaders(); -// } -// -// /** -// * This method generates, displays and log the detailed header truncation -// * for POST operation. -// * -// * @throws Exception -// */ -// private void generatePostHeaders() throws Exception { -// authenticationType = merchantConfig.getAuthenticationType().trim(); -// -// this.logger.info(GlobalLabelParameters.AUTENTICATION_TYPE + authenticationType); -// this.logger.info(GlobalLabelParameters.REQUEST_TYPE + " : " + requestType); -// this.logger.info(GlobalLabelParameters.DATE + " : " + date); -// this.logger.info(GlobalLabelParameters.V_C_MERCHANTID + " : " + merchantConfig.getMerchantID().trim()); -// this.logger.info(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// this.logger.info(GlobalLabelParameters.HOST + " : " + merchantConfig.getRequestHost()); -// -// System.out.println(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// System.out.println("MerchantID : " + merchantConfig.getMerchantID().trim()); -// System.out.println("Date : " + date); -// System.out.println("Request Type : " + requestType); -// System.out.println("HOST : " + merchantConfig.getRequestHost()); -// -// if (authenticationType.equalsIgnoreCase(GlobalLabelParameters.HTTP)) { -// System.out.println(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// this.logger.info(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// -// System.out.println("Digest : " + digest.getDigest()); -// -// tempSig = auth.getToken(merchantConfig,requestType,requestJson,null,date); -// System.out.println("Signature : " + tempSig.toString()); -// WriteLogAudit(200); -// -// } else { -// tempSig = auth.getToken(merchantConfig,requestType,requestJson,null,date); -// System.out.println("Authorization, Bearer " + tempSig.toString()); -// WriteLogAudit(200); -// } -// } -// -// public static void main(String[] args) throws Exception { -// new PostGenerateHeaders(); -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/PostMethod.java b/src/main/java/samples/authentication/AuthSampleCode/PostMethod.java deleted file mode 100644 index 2e6ecd1..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/PostMethod.java +++ /dev/null @@ -1,151 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.util.Properties; -// -//import org.apache.commons.lang3.StringUtils; -// -//import com.cybersource.apisdk.controller.ApiController; -//import com.cybersource.apisdk.model.Response; -//import com.cybersource.authsdk.core.MerchantConfig; -// -//import samples.authentication.harness.MerchantProperties; -// -///** -// * Depending on the authentication type HTTP or JWT , this class performs the -// * POST operation on the test url 'apitest.cybersource.com'. -// * -// */ -//public class PostMethod { -// private ApiController apiController; -// private String authenticationType; -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private Response responseObj; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /** -// * REQUEST TARGET [Editable] -// */ -// private String requestTarget = "/pts/v2/payments/"; -// private String requestJson = "{\r\n" + -// " \"clientReferenceInformation\": {\r\n" + -// " \"code\": \"TC50171_3\"\r\n" + -// " },\r\n" + -// " \"processingInformation\": {\r\n" + -// " \"commerceIndicator\": \"internet\"\r\n" + -// " },\r\n" + -// " \"aggregatorInformation\": {\r\n" + -// " \"subMerchant\": {\r\n" + -// " \"cardAcceptorID\": \"1234567890\",\r\n" + -// " \"country\": \"US\",\r\n" + -// " \"phoneNumber\": \"650-432-0000\",\r\n" + -// " \"address1\": \"900 Metro Center\",\r\n" + -// " \"postalCode\": \"94404-2775\",\r\n" + -// " \"locality\": \"Foster City\",\r\n" + -// " \"name\": \"Visa Inc\",\r\n" + -// " \"administrativeArea\": \"CA\",\r\n" + -// " \"region\": \"PEN\",\r\n" + -// " \"email\": \"test@cybs.com\"\r\n" + -// " },\r\n" + -// " \"name\": \"V-Internatio\",\r\n" + -// " \"aggregatorID\": \"123456789\"\r\n" + -// " },\r\n" + -// " \"orderInformation\": {\r\n" + -// " \"billTo\": {\r\n" + -// " \"country\": \"US\",\r\n" + -// " \"lastName\": \"VDP\",\r\n" + -// " \"address2\": \"Address 2\",\r\n" + -// " \"address1\": \"201 S. Division St.\",\r\n" + -// " \"postalCode\": \"48104-2201\",\r\n" + -// " \"locality\": \"Ann Arbor\",\r\n" + -// " \"administrativeArea\": \"MI\",\r\n" + -// " \"firstName\": \"RTS\",\r\n" + -// " \"phoneNumber\": \"999999999\",\r\n" + -// " \"district\": \"MI\",\r\n" + -// " \"buildingNumber\": \"123\",\r\n" + -// " \"company\": \"Visa\",\r\n" + -// " \"email\": \"test@cybs.com\"\r\n" + -// " },\r\n" + -// " \"amountDetails\": {\r\n" + -// " \"totalAmount\": \"102.21\",\r\n" + -// " \"currency\": \"USD\"\r\n" + -// " }\r\n" + -// " },\r\n" + -// " \"paymentInformation\": {\r\n" + -// " \"card\": {\r\n" + -// " \"expirationYear\": \"2031\",\r\n" + -// " \"number\": \"5555555555554444\",\r\n" + -// " \"securityCode\": \"123\",\r\n" + -// " \"expirationMonth\": \"12\",\r\n" + -// " \"type\": \"002\"\r\n" + -// " }\r\n" + -// " }\r\n" + -// "}"; -// /** -// * REQUEST-TYPE. [Non-Editable] -// */ -// private String requestType = "POST"; -// private String url; -// -// /* This method initiates or begins the process. */ -// public static void main(String[] args) throws Exception { -// /** -// * -// */ -// new PostMethod(); -// } -// -// /** -// * -// * @param -// * @return -// * @throws Exception -// */ -// public PostMethod() throws Exception { -// apiController = new ApiController(); -// -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -// authenticationType = merchantConfig.getAuthenticationType().trim(); -//// merchantConfig.setRequestType(requestType); -//// merchantConfig.setRequestData(requestJson); -//// merchantConfig.setRequestTarget(requestTarget); -// -// url = "https://" + merchantConfig.getRequestHost() + requestTarget; -// -// /* Begin Post process. */ -// process(); -// } -// -// /** -// * Calls the APISDK for processing the payment request. -// * -// * @throws Exception -// */ -// private void process() throws Exception { -// System.out.println(authenticationType.toUpperCase() + " Request"); -// try { -// responseObj = apiController.paymentPost(merchantConfig); -// WriteLogAudit(Integer.parseInt(responseObj.getResponseCode())); -// -// if (!StringUtils.isBlank(responseObj.getResponseCode()) -// && !StringUtils.isBlank(responseObj.getResponseMessage())) { -// new PostGenerateHeaders(merchantConfig); -// System.out.println(" URL : " + url); -// System.out.println(" Response Code : " + responseObj.getResponseCode()); -// System.out.println(" v-c-Co-relation ID : " + responseObj.getVcCorelationId()); -// System.out.println(" Response Message : " + responseObj.getResponseMessage()); -// } else { -// System.out.println(responseObj.getResponseMessage()); -// } -// } catch (Exception e) { -// System.out.println(e.getMessage()); -// WriteLogAudit(400); -// } -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/PostObjectMethod.java b/src/main/java/samples/authentication/AuthSampleCode/PostObjectMethod.java deleted file mode 100644 index abad888..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/PostObjectMethod.java +++ /dev/null @@ -1,97 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.util.Properties; -// -//import org.apache.commons.lang3.StringUtils; -// -//import com.cybersource.apisdk.controller.ApiController; -//import com.cybersource.apisdk.model.Response; -//import com.cybersource.authsdk.core.MerchantConfig; -//import samples.authentication.Data.Configuration; -//import samples.authentication.Data.PayloadData; -// -///** -// * Depending on the authentication type HTTP or JWT , this class performs the -// * POST operation on the test url 'apitest.cybersource.com'. -// * -// */ -//public class PostObjectMethod { -// private ApiController apiController; -// private String authenticationType; -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// private Response response; -// -// /** -// * REQUEST-TYPE. [Non-Editable] -// */ -// private String requestType = "POST"; -// -// private String url; -// -// private String requestData = PayloadData.readData(); -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /** -// * REQUEST TARGET [Editable] -// */ -// private String requestTarget = "/pts/v2/payments"; -// -// /* This method initiates or begins the process. */ -// public static void main(String[] args) throws Exception { -// /** -// * -// */ -// new PostObjectMethod(); -// } -// -// /** -// * -// * @param -// * @return -// * @throws Exception -// */ -// public PostObjectMethod() throws Exception { -// apiController = new ApiController(); -// merchantProp = Configuration.getMerchantDetails(); -// merchantConfig = new MerchantConfig(merchantProp); -//// merchantConfig.setRequestType(requestType); -// authenticationType = merchantConfig.getAuthenticationType().trim(); -//// merchantConfig.setRequestData(requestData); -//// merchantConfig.setRequestTarget(requestTarget); -// -// url = "https://" + merchantConfig.getRequestHost() + requestTarget; -// -// /* Begin Post process. */ -// process(); -// } -// -// /** -// * Calls the APISDK for processing the payment request. -// * -// * @throws Exception -// */ -// private void process() throws Exception { -// System.out.println(authenticationType.toUpperCase() + " Request"); -// try { -// response = apiController.paymentPost(merchantConfig); -// WriteLogAudit(Integer.parseInt(response.getResponseCode())); -// -// if (!StringUtils.isBlank(response.getResponseCode()) && !StringUtils.isBlank(response.getResponseMessage())) { -// new PostGenerateHeaders(merchantConfig); -// System.out.println(" URL : " + url); -// System.out.println(" Response Code : " + response.getResponseCode()); -// System.out.println(" v-c-Co-relation ID : " + response.getVcCorelationId()); -// System.out.println(" Response Message : " + response.getResponseMessage()); -// } -// } catch (Exception e) { -// System.out.println(e.getMessage()); -// WriteLogAudit(400); -// } -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/PutGenerateHeaders.java b/src/main/java/samples/authentication/AuthSampleCode/PutGenerateHeaders.java deleted file mode 100644 index 07d7fb2..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/PutGenerateHeaders.java +++ /dev/null @@ -1,109 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.time.ZoneId; -//import java.time.ZonedDateTime; -//import java.time.format.DateTimeFormatter; -//import java.util.Properties; -//import org.apache.logging.log4j.LogManager; -//import org.apache.logging.log4j.Logger; -//import com.cybersource.authsdk.core.Authorization; -//import com.cybersource.authsdk.core.MerchantConfig; -//import com.cybersource.authsdk.payloaddigest.PayloadDigest; -//import com.cybersource.authsdk.util.GlobalLabelParameters; -//import samples.authentication.harness.FileReader; -//import samples.authentication.harness.MerchantProperties; -// -///** -// * This class generates the Headers that are present in the token was sent the -// * server for transaction, for PUT operations. -// * -// */ -//public class PutGenerateHeaders { -// private static Properties merchantProp; -// private static MerchantConfig merchantConfig; -// private String authenticationType = null; -// private Authorization auth; -// private String requestType = "PUT"; -// private String date = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneId.of("GMT"))); -// private PayloadDigest digest; -// private Logger logger; -// private String jsonRequestData; -// private String TempSig; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// public PutGenerateHeaders(MerchantConfig merchantConfig) throws Exception { -// auth = new Authorization(); -// logger = LogManager.getLogger(getClass()); -// digest = new PayloadDigest(jsonRequestData); -// PutMethodHeaders(merchantConfig); -// } -// -// public PutGenerateHeaders() throws Exception { -// auth = new Authorization(); -// this.logger = LogManager.getLogger(getClass()); -// -// this.jsonRequestData = FileReader.readJsonFromFile("src/main/resources/TRRReport.json"); -// -//// merchantConfig.setRequestData(jsonRequestData); -// -// digest = new PayloadDigest(jsonRequestData); -// this.logger.info(GlobalLabelParameters.BEGIN_TRANSACTION + "\n******************* Generate PUT Headers *******************"); -// -// boolean isMerchant = merchantConfig.validateMerchantDetails(requestType); -// if(isMerchant){ -// PutMethodHeaders(merchantConfig); -// } -// -// this.logger.info(GlobalLabelParameters.END_TRANSACTION + "\n"); -// } -// -// private void PutMethodHeaders(MerchantConfig merchantConfig) throws Exception { -// authenticationType = merchantConfig.getAuthenticationType().trim(); -// -// this.logger.info(GlobalLabelParameters.AUTENTICATION_TYPE + authenticationType); -// this.logger.info(GlobalLabelParameters.REQUEST_TYPE + " : " + requestType); -// this.logger.info(GlobalLabelParameters.DATE + " : " + date); -// this.logger.info(GlobalLabelParameters.V_C_MERCHANTID + " : " + merchantConfig.getMerchantID().trim()); -// this.logger.info(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// this.logger.info(GlobalLabelParameters.HOST + " : " + merchantConfig.getRequestHost()); -// -// System.out.println("MerchantID : " + merchantConfig.getMerchantID().trim()); -// System.out.println("Date : " + date); -// System.out.println("Request Type : " + requestType); -// System.out.println("HOST : " + merchantConfig.getRequestHost()); -// System.out.println(GlobalLabelParameters.CONTENT_TYPE + " : " + GlobalLabelParameters.APPLICATION_JSON); -// -// if (authenticationType.equalsIgnoreCase(GlobalLabelParameters.HTTP)) { -// System.out.println(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// this.logger.info(GlobalLabelParameters.USERAGENT + " : " + GlobalLabelParameters.USER_AGENT_VALUE); -// -// System.out.println("Digest : " + digest.getDigest()); -// -// TempSig = auth.getToken(merchantConfig,requestType,jsonRequestData,null,date); -// System.out.println("Signature : " + TempSig.toString()); -// WriteLogAudit(200); -// -// } else { -// String jwtRequestBody = this.jsonRequestData; -//// auth.setJWTRequestBody(jwtRequestBody); -// TempSig = auth.getToken(merchantConfig,requestType,jwtRequestBody,null,date); -// System.out.println("Authorization, Bearer " + TempSig.toString()); -// WriteLogAudit(200); -// } -// } -// -// /* This method initiate the PUT Header program. */ -// public static void main(String[] args) throws Exception { -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -// -//// merchantConfig.setRequestType("PUT"); -// -// new PutGenerateHeaders(); -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/PutMethod.java b/src/main/java/samples/authentication/AuthSampleCode/PutMethod.java deleted file mode 100644 index e2a788d..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/PutMethod.java +++ /dev/null @@ -1,98 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import java.util.Properties; -// -//import org.apache.commons.lang3.StringUtils; -// -//import samples.authentication.Data.PayloadData; -//import samples.authentication.harness.MerchantProperties; -// -//import com.cybersource.apisdk.controller.ApiController; -//import com.cybersource.apisdk.model.Response; -//import com.cybersource.authsdk.core.MerchantConfig; -// -///** -// * Depending on the authentication type HTTP or JWT , this class performs the -// * PUT operation on the given working domain. -// */ -//public class PutMethod { -// private ApiController apiController; -// private String authenticationType; -// private Response response; -// private Properties merchantProp; -// private MerchantConfig merchantConfig; -// -// public static void WriteLogAudit(int status) { -// String filename = MethodHandles.lookup().lookupClass().getSimpleName(); -// System.out.println("[Sample Code Testing] [" + filename + "] " + status); -// } -// -// /** -// * REQUEST-TARGET [Editable] -// */ -// private String requestTarget = "/reporting/v3/reportSubscriptions/TRRReport?organizationId=testrest"; -// -// /** -// * REQUEST-TYPE. [Non-Editable] -// */ -// private String requestType = "PUT"; -// -// private String url; -// -// /* Request Data. */ -// private String requestData = PayloadData.readData(); -// -// /* This method initiates or begins the process. */ -// public static void main(String[] args) throws Exception { -// new PutMethod(); -// } -// -// /** -// * -// * @param -// * @return -// * @throws Exception -// */ -// public PutMethod() throws Exception { -// apiController = new ApiController(); -// merchantProp = MerchantProperties.getMerchantProperties(); -// merchantConfig = new MerchantConfig(merchantProp); -//// merchantConfig.setRequestType(requestType); -// -// authenticationType = merchantConfig.getAuthenticationType().trim(); -// -//// merchantConfig.setRequestTarget(requestTarget); -//// merchantConfig.setRequestData(requestData); -// -// url = "https://" + merchantConfig.getRequestHost() + requestTarget; -// -// /* Begin PUT process. */ -// process(); -// } -// -// /** -// * Calls the APISDK for processing the payment request. -// * -// * @throws Exception -// */ -// private void process() throws Exception { -// System.out.println(authenticationType.toUpperCase() + " Request"); -// try { -// /* Call payment method of Api Controller class */ -// response = apiController.paymentPut(merchantConfig); -// WriteLogAudit(Integer.parseInt(response.getResponseCode())); -// -// if (!StringUtils.isBlank(response.getResponseCode()) && !StringUtils.isBlank(response.getResponseMessage())) { -// new PutGenerateHeaders(merchantConfig); -// System.out.println(" URL : " + url); -// System.out.println(" Response Code : " + response.getResponseCode()); -// System.out.println(" v-c-Co-relation ID : " + response.getVcCorelationId()); -// System.out.println(" Response Message : " + response.getResponseMessage()); -// } -// } catch (Exception e) { -// System.out.println(e.getMessage()); -// WriteLogAudit(400); -// } -// } -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/StandAloneMetaKey.java b/src/main/java/samples/authentication/AuthSampleCode/StandAloneMetaKey.java deleted file mode 100644 index d3f9a59..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/StandAloneMetaKey.java +++ /dev/null @@ -1,109 +0,0 @@ -package samples.authentication.AuthSampleCode; - -import java.lang.invoke.MethodHandles; -import Api.PaymentsApi; -import Invokers.ApiClient; -import Model.*; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.util.Properties; - -public class StandAloneMetaKey { - 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 { - SimplePaymentsUsingMetaKey(); - } - - public static Properties getMerchantDetails() { - Properties props = new Properties(); - - // HTTP_Signature = http_signature and JWT = jwt - props.setProperty("authenticationType", "http_signature"); - props.setProperty("merchantID", ""); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - - // MetaKey Parameters - props.setProperty("portfolioID", ""); - props.setProperty("useMetaKey", "true"); - // HTTP Parameters - props.setProperty("merchantKeyId", ""); - props.setProperty("merchantsecretKey", ""); - - return props; - - } - - public static PtsV2PaymentsPost201Response SimplePaymentsUsingMetaKey() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - merchantProp = getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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 (Exception e) { - e.printStackTrace(); - WriteLogAudit(400); - } - return result; - } -} diff --git a/src/main/java/samples/authentication/AuthSampleCode/StandaloneHttpSignature.java b/src/main/java/samples/authentication/AuthSampleCode/StandaloneHttpSignature.java deleted file mode 100644 index 435d916..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/StandaloneHttpSignature.java +++ /dev/null @@ -1,405 +0,0 @@ -package samples.authentication.AuthSampleCode; - -import java.lang.invoke.MethodHandles; -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import java.io.*; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Base64; - -public class StandaloneHttpSignature { - /* Try with your own credentaials - * Get Key ID, Secret Key and Merchant Id from EBC portal - */ - public String merchantKeyId = "08c94330-f618-42a3-b09d-e1e43be5efda"; - public String merchantsecretKey = "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="; - public String merchantId = "testrest"; - - /* Sandbox Host: apitest.cybersource.com - * Production Host: api.cybersource.com - */ - public static String requestHost = "apitest.cybersource.com"; - - private final String USER_AGENT = "Mozilla/5.0"; - - public static String gmtDateTime = "DATE_PLACEHOLDER"; - public static String postRequestTarget = "REQUEST_TARGET_PALCEHOLDER"; - public static String APINAME = "APINAME_PLACEHOLDER"; - public static String resource = "resource_PLACEHOLDER"; - - public static String payload = null; - - 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 { - /* This Example illustrate two tests - HTTP GET and POST method with Cybersource Payments API. - * Each test will caluate HTTP Signature Digest and Authenticate Cybersource Payments API using HTTP Client - */ - StandaloneHttpSignature http = new StandaloneHttpSignature(); - - // POST Example for Payments - postRequestTarget = "post /pts/v2/payments"; - APINAME = "payments"; - resource = "/pts/v2/payments"; - - payload = "{\n" + - " \"clientReferenceInformation\": {\n" + - " \"code\": \"TC50171_3\"\n" + - " },\n" + - " \"processingInformation\": {\n" + - " \"commerceIndicator\": \"internet\"\n" + - " },\n" + - " \"orderInformation\": {\n" + - " \"billTo\": {\n" + - " \"firstName\": \"john\",\n" + - " \"lastName\": \"doe\",\n" + - " \"address1\": \"201 S. Division St.\",\n" + - " \"postalCode\": \"48104-2201\",\n" + - " \"locality\": \"Ann Arbor\",\n" + - " \"administrativeArea\": \"MI\",\n" + - " \"country\": \"US\",\n" + - " \"phoneNumber\": \"999999999\",\n" + - " \"email\": \"test@cybs.com\"\n" + - " },\n" + - " \"amountDetails\": {\n" + - " \"totalAmount\": \"10\",\n" + - " \"currency\": \"USD\"\n" + - " }\n" + - " },\n" + - " \"paymentInformation\": {\n" + - " \"card\": {\n" + - " \"expirationYear\": \"2031\",\n" + - " \"number\": \"5555555555554444\",\n" + - " \"securityCode\": \"123\",\n" + - " \"expirationMonth\": \"12\",\n" + - " \"type\": \"002\"\n" + - " }\n" + - " }\n" + - "}"; - - System.out.println("\n\nSample 1: POST call - CyberSource Payments API - HTTP POST Payment request"); - int responseCodePost = http.sendPost("https://" + requestHost + resource); - - // GET Example for Reports - resource = "/reporting/v3/reports?startTime=2020-04-01T00:00:00.0Z&endTime=2020-04-05T23:59:59.0Z&timeQueryType=executedTime&reportMimeType=application/xml"; - - System.out.println("\n\nSample 2: GET call - CyberSource Reporting API - HTTP GET Reporting request"); - int responseCodeGet = http.sendGet("https://" + requestHost + resource); - - if ((responseCodePost >= 200 && responseCodePost <= 299) && (responseCodeGet != 400)) { - WriteLogAudit(200); - } else { - WriteLogAudit(400); - } - } - - // HTTP GET request - private int sendGet(String url) throws Exception { - /* HTTP connection */ - URL obj = new URL(url); - HttpURLConnection con = (HttpURLConnection) obj.openConnection(); - - /* Add Request Header - * "v-c-merchant-id" set value to Cybersource Merchant ID or v-c-merchant-id - * This ID can be found on EBC portal - */ - con.setRequestProperty("v-c-merchant-id", merchantId); - con.setRequestProperty("v-c-correlation-id", "123"); - - /* Add Request Header - * "Date" The date and time that the message was originated from. - * "HTTP-date" format as defined by RFC7231. - */ - gmtDateTime = getdate(); - - con.setRequestProperty("date", gmtDateTime); - - /* Add Request Header - * "Host" Host to send the request to. - */ - con.setRequestProperty("Host", requestHost); - - /* Add Request Header - * "Signature" Contains keyId, algorithm, headers and signature as paramters - * Check getSignatureHeader() method for more details - */ - StringBuilder signatureHeaderValue = getSignatureHeader("GET"); - - con.setRequestProperty("Signature", signatureHeaderValue.toString()); - - /* HTTP Method GET */ - con.setRequestMethod("GET"); - - /* Establishing HTTP connection*/ - int responseCode = con.getResponseCode(); - String responseHeader = con.getHeaderField("v-c-correlation-id"); - - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/json"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tDate : " + gmtDateTime); - System.out.println("\tHost : " + requestHost); - System.out.println("\tSignature : " + signatureHeaderValue); - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - /* Reading Response Message */ - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - /* print Response */ - System.out.println("\tResponse Payload :\n" + response.toString()); - return responseCode; - } - - // HTTP POST request - private int sendPost(String url) throws Exception { - /* HTTP connection */ - URL obj = new URL(url); - HttpURLConnection con = (HttpURLConnection) obj.openConnection(); - - /* Add Request Header - * "v-c-merchant-id" set value to Cybersource Merchant ID or v-c-merchant-id - * This ID can be found on EBC portal - */ - con.setRequestProperty("v-c-merchant-id", merchantId); - con.setRequestProperty("v-c-correlation-id", "123"); - con.setRequestProperty("profile-id", "93B32398-AD51-4CC2-A682-EA3E93614EB1"); - - // Oleg's profile-ID - // con.setRequestProperty("profile-id", "DE14A8CD-CC3E-4889-AC46-67ACFB7CD27C"); - - /* Add Request Header - * "Date" The date and time that the message was originated from. - * "HTTP-date" format as defined by RFC7231. - */ - gmtDateTime = getdate(); - - con.setRequestProperty("date", gmtDateTime); - - /* Add Request Header - * "Host" Name of the host to send the request to. - */ - con.setRequestProperty("Host", requestHost); - - /* Add Request Header - * "Digest" SHA-256 hash of payload that is BASE64 encoded - */ - con.setRequestProperty("Digest", getDigest()); - - /* Add Request Header - * "Signature" Contains keyId, algorithm, headers and signature as paramters - * Check getSignatureHeader() method for more details - */ - StringBuilder signatureHeaderValue = getSignatureHeader("POST"); - - con.setRequestProperty("Signature", signatureHeaderValue.toString()); - - /* HTTP Method POST */ - con.setRequestMethod("POST"); - - /* Additional Request Headers */ - con.setRequestProperty("User-Agent", USER_AGENT); - con.setRequestProperty("Content-Type", "application/json"); - - // Send POST request - con.setDoOutput(true); - con.setDoInput(true); - - DataOutputStream wr = new DataOutputStream(con.getOutputStream()); - wr.write(getPayload().getBytes("UTF-8")); - wr.flush(); - wr.close(); - - /* Establishing HTTP connection*/ - int responseCode = con.getResponseCode(); - - String responseHeader = con.getHeaderField("v-c-correlation-id"); - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/json"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tDate : " + gmtDateTime); - System.out.println("\tHost : " + requestHost); - System.out.println("\tDigest : " + getDigest()); - System.out.println("\tSignature : " + signatureHeaderValue); - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - try { - /* Reading Response Message */ - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - /* print Response */ - System.out.println("\tResponse Payload :\n" + response.toString()); - } catch (Exception exception) { - // Output unexpected IOExceptions - BufferedReader in = new BufferedReader(new InputStreamReader(con.getErrorStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - /* print Response */ - System.out.println("Response Payload : " + response.toString()); - System.out.println(exception); - } - - return responseCode; - } - - private String getdate() { - /* This Method returns Date in GMT format as defined by RFC7231. */ - return(DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneId.of("GMT")))); - } - - private StringBuilder getSignatureHeader(String httpMethod) throws Exception { - /* This method return SignatureHeader Value that contains following paramters - * keyid -- Merchant ID obtained from EBC portal - * algorithm -- Should have value as "HmacSHA256" - * headers -- List of all header name passed in the Signature paramter below - * String getHeaders = "host date request-target" + " " + "v-c-merchant-id"; - * String postHeaders = "host date request-target digest v-c-merchant-id"; - * Note: Digest is not passed for GET calls - * signature -- Signature header has paramter called signature - * Paramter 'Signature' must contain all the paramters mentioned in header above in given order - */ - StringBuilder signatureHeaderValue = new StringBuilder(); - - /* KeyId is the key obtained from EBC */ - signatureHeaderValue.append("keyid=\"" + merchantKeyId + "\""); - - - /* Algorithm should be always HmacSHA256 for http signature */ - signatureHeaderValue.append(", algorithm=\"HmacSHA256\""); - - /* Headers - list is choosen based on HTTP method. Digest is not required for GET Method */ - String getHeaders = "host date request-target" + " " + "v-c-merchant-id"; - String postHeaders = "host date request-target digest v-c-merchant-id"; - - if(httpMethod.equalsIgnoreCase("GET")) - signatureHeaderValue.append(", headers=\"" + getHeaders + "\""); - else if(httpMethod.equalsIgnoreCase("POST")) - signatureHeaderValue.append(", headers=\"" + postHeaders + "\""); - - /* Get Value for paramter 'Signature' to be passed to Signature Header */ - String signatureValue = getSignatureParam(httpMethod); - signatureHeaderValue.append(", signature=\"" + signatureValue + "\""); - - return signatureHeaderValue; - } - - private String getSignatureParam(String httpMethod) throws Exception{ - /* This method returns value for paramter Signature which is then passed to Signature header - * paramter 'Signature' is calucated based on below key values and then signed with SECRET KEY - - * host: Sandbox (apitest.cybersource.com) or Production (api.cybersource.com) hostname - * date: "HTTP-date" format as defined by RFC7231. - * request-target: Should be in format of httpMethod: path - * Example: "post /pts/v2/payments" - * Digest: Only needed for POST calls. - * digestString = BASE64( HMAC-SHA256 ( Payload )); - * Digest: "SHA-256=" + digestString; - * v-c-merchant-id: set value to Cybersource Merchant ID - * This ID can be found on EBC portal - */ - StringBuilder signatureString = new StringBuilder(); - signatureString.append('\n'); - signatureString.append("host"); - signatureString.append(": "); - signatureString.append(requestHost); - signatureString.append('\n'); - signatureString.append("date"); - signatureString.append(": "); - signatureString.append(gmtDateTime); - signatureString.append('\n'); - signatureString.append("request-target"); - signatureString.append(": "); - - String getRequestTarget = "get " + resource; - - if(httpMethod.equalsIgnoreCase("GET")) - signatureString.append(getRequestTarget); - else if(httpMethod.equalsIgnoreCase("POST")) - signatureString.append(postRequestTarget); - - signatureString.append('\n'); - - if(httpMethod.equalsIgnoreCase("POST")) { - signatureString.append("digest"); - signatureString.append(": "); - signatureString.append(getDigest()); - signatureString.append('\n'); - } - - signatureString.append("v-c-merchant-id"); - signatureString.append(": "); - signatureString.append(merchantId); - signatureString.delete(0, 1); - - String signatureStr = signatureString.toString(); - - /* Signature string generated from above parameters is Signed with SecretKey hased with SHA256 and base64 encoded. - * Secret Key is Base64 decoded before signing - */ - SecretKeySpec secretKey = new SecretKeySpec(Base64.getDecoder().decode(merchantsecretKey), "HmacSHA256"); - Mac aKeyId = Mac.getInstance("HmacSHA256"); - aKeyId.init(secretKey); - aKeyId.update(signatureStr.getBytes()); - byte[] aHeaders = aKeyId.doFinal(); - String base64EncodedSignature = Base64.getEncoder().encodeToString(aHeaders); - - return base64EncodedSignature; - } - - private String getDigest() throws NoSuchAlgorithmException, IOException { - /* This method return Digest value which is SHA-256 hash of payload that is BASE64 encoded */ - String messageBody = getPayload(); - - MessageDigest digestString = MessageDigest.getInstance("SHA-256"); - - byte[] digestBytes = digestString.digest(messageBody.getBytes("UTF-8")); - - String bluePrint = Base64.getEncoder().encodeToString(digestBytes); - bluePrint = "SHA-256="+ bluePrint; - - return bluePrint; - } - - private String getPayload() throws IOException { - String messageBody = payload; - return messageBody; - } -} diff --git a/src/main/java/samples/authentication/AuthSampleCode/StandaloneJwt.java b/src/main/java/samples/authentication/AuthSampleCode/StandaloneJwt.java deleted file mode 100644 index b0874e8..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/StandaloneJwt.java +++ /dev/null @@ -1,431 +0,0 @@ -package samples.authentication.AuthSampleCode; - -import java.lang.invoke.MethodHandles; -import org.bouncycastle.jce.provider.BouncyCastleProvider; - -import com.nimbusds.jose.JOSEException; -import com.nimbusds.jose.JOSEObject; -import com.nimbusds.jose.JWSAlgorithm; -import com.nimbusds.jose.JWSHeader; -import com.nimbusds.jose.JWSObject; -import com.nimbusds.jose.Payload; -import com.nimbusds.jose.crypto.RSASSASigner; -import java.io.*; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.KeyStore; -import java.security.KeyStore.PrivateKeyEntry; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.security.MessageDigest; -import java.security.PrivateKey; -import java.security.interfaces.RSAPrivateKey; -import java.security.KeyStore.PasswordProtection; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.Base64; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.StringTokenizer; - -/* - * This class is not expected to run on Linux VMs on Travis CI. - * This sample will not pass due to issues with JWT and keystores on Linux machines. - * - */ -public class StandaloneJwt { - private static String merchantId = "testrest"; - private static String requestHost = "apitest.cybersource.com"; - - public static void WriteLogAudit(int status) { - String filename = MethodHandles.lookup().lookupClass().getSimpleName(); - System.out.println("[Sample Code Testing] [" + filename + "] " + status); - } - - /* - * This is standalone code that show cases how to generate headers for CyberSource REST API - POST and GET calls. - * This sample code has sample Mercahnt credentails (testrest) with .p12(At same dir level) that you can also use for testing. - * CyberSource Business Center - https://ebc2test.cybersource.com/ebc2/ - * Instructions on generating your own .P12 from CyberSource Business Center - https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/authentication/createCertSharedKey.html - * Also, To understand details about CyberSource JWT headers, please check Authentication guide - https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/authentication/GenerateHeader/jwtTokenAuthentication.html - * This sample app demonstrates calling the CyberSource REST API to fetch report and charge a credit card - * including building the JWT token for API authentication - * - */ - public static void main(String[] args) throws Exception { - try - { - String request = "{\n" + - " \"clientReferenceInformation\": {\n" + - " \"code\": \"TC50171_3\"\n" + - " },\n" + - " \"processingInformation\": {\n" + - " \"commerceIndicator\": \"internet\"\n" + - " },\n" + - " \"orderInformation\": {\n" + - " \"billTo\": {\n" + - " \"firstName\": \"john\",\n" + - " \"lastName\": \"doe\",\n" + - " \"address1\": \"201 S. Division St.\",\n" + - " \"postalCode\": \"48104-2201\",\n" + - " \"locality\": \"Ann Arbor\",\n" + - " \"administrativeArea\": \"MI\",\n" + - " \"country\": \"US\",\n" + - " \"phoneNumber\": \"999999999\",\n" + - " \"email\": \"test@cybs.com\"\n" + - " },\n" + - " \"amountDetails\": {\n" + - " \"totalAmount\": \"10.00\",\n" + - " \"currency\": \"USD\"\n" + - " }\n" + - " },\n" + - " \"paymentInformation\": {\n" + - " \"card\": {\n" + - " \"expirationYear\": \"2031\",\n" + - " \"number\": \"5555555555554444\",\n" + - " \"securityCode\": \"123\",\n" + - " \"expirationMonth\": \"12\"\n" + - " }\n" + - " }\n" + - "}"; - - // HTTP GET request - System.out.println("\n\nSample 1: GET call - CyberSource Reporting API - HTTP GET Reporting request"); - int getStatusCode = getCall(request); - - if (getStatusCode != 0) { - System.out.println("STATUS : ERROR (HTTP Status = " + getStatusCode + ")"); - } else { - System.out.println("STATUS : SUCCESS (HTTP Status = " + getStatusCode + ")"); - } - - // HTTP POST request - System.out.println("\n\nSample 2: POST call - CyberSource Payments API - HTTP POST Payment request"); - int postStatusCode = postCall(request); - - if (postStatusCode != 0) { - System.out.println("STATUS : ERROR (HTTP Status = " + postStatusCode + ")"); - } else { - System.out.println("STATUS : SUCCESS (HTTP Status = " + postStatusCode + ")"); - } - - if (getStatusCode == -1 && postStatusCode == 0) { - WriteLogAudit(200); - } else { - WriteLogAudit(400); - } - } - catch (Exception e) - { - System.out.println("ERROR : " + e.getMessage()); - System.out.println("STACKTRACE : " + e.getStackTrace()); - } - } - - private static int getCall(String request) { - int responseStatus = 0; - - String resource = "/reporting/v3/reports?startTime=2020-04-01T00:00:00.0Z&endTime=2020-04-05T23:59:59.0Z&timeQueryType=executedTime&reportMimeType=application/xml"; - - /* HTTP connection */ - URL url; - try { - url = new URL("https://" + requestHost + resource); - - HttpURLConnection con = (HttpURLConnection) url.openConnection(); - - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/json"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tHost : " + requestHost); - - String token = generateJWT(request, "GET"); - - System.out.println("\n -- TOKEN -- "); - System.out.println(token); - - con.setRequestMethod("GET"); - con.setRequestProperty("Authorization", token); - con.setRequestProperty("Accept", "application/hal+json"); - con.setRequestProperty("Content-Type", "application/json;charset=utf-8"); - con.setRequestProperty("Host", requestHost); - - int responseCode = con.getResponseCode(); - String responseHeader = con.getHeaderField("v-c-correlation-id"); - - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - if (responseCode == HttpURLConnection.HTTP_OK) { - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - System.out.println("\tResponse Payload :\n" + response.toString()); - } else { - responseStatus = -1; - } - } catch (Exception e) { - System.out.println(e.getStackTrace()); - } - - return responseStatus; - } - - private static int postCall(String request) { - int responseStatus = 0; - - String resource = "/pts/v2/payments"; - - /* HTTP connection */ - URL url; - try { - url = new URL("https://" + requestHost + resource); - - HttpURLConnection con = (HttpURLConnection) url.openConnection(); - - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/json"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tHost : " + requestHost); - - String token = generateJWT(request, "POST"); - - System.out.println("\n -- TOKEN -- "); - System.out.println(token); - - con.setRequestMethod("POST"); - con.setDoOutput(true); - con.setRequestProperty("Authorization", token); - con.setRequestProperty("Accept", "application/hal+json;charset=utf-8"); - con.setRequestProperty("Content-Type", "application/json;charset=utf-8"); - con.setRequestProperty("Host", requestHost); - - try(OutputStream outputStream = con.getOutputStream()) { - byte[] input = request.getBytes("utf-8"); - outputStream.write(input, 0, input.length); - } - - int responseCode = con.getResponseCode(); - String responseHeader = con.getHeaderField("v-c-correlation-id"); - - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - if (responseCode == 200 || responseCode == 201) { - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - System.out.println("\tResponse Payload :\n" + response.toString()); - } else { - responseStatus = -1; - } - } catch (Exception e) { - System.out.println(e.getStackTrace()); - } - - return responseStatus; - } - - /* - * This method demonstrates the creation of the JWT Authentication credential - * Takes Request Paylaod and Http method(GET/POST) as input. - * - * Value from which to generate JWT - * The HTTP Verb that is needed for generating the credential - * String containing the JWT Authentication credential - */ - private static String generateJWT(String request, String method) { - String token = "TOKEN_PLACEHOLDER"; - System.out.println("\tMethod : " + method); - - try { - KeyStore merchantKeyStore = KeyStore.getInstance("PKCS12", new BouncyCastleProvider()); - - //Replace below testrest.p12 file with your .p12 file. - //Steps to generate your P12 - https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/authentication/createCert.html - FileInputStream keyFile = new FileInputStream("src/main/resources/testrest.p12"); - - merchantKeyStore.load(keyFile, merchantId.toCharArray()); - - String merchantKeyAlias = null; - Enumeration enumKeyStore = merchantKeyStore.aliases(); - ArrayList array = new ArrayList(); - - while (enumKeyStore.hasMoreElements()) { - merchantKeyAlias = (String) enumKeyStore.nextElement(); - array.add(merchantKeyAlias); - if (merchantKeyAlias.contains(merchantId)) { - break; - } - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Initialize private key from certificate - PrivateKeyEntry e = (PrivateKeyEntry) merchantKeyStore.getEntry(merchantKeyAlias, - new PasswordProtection(merchantId.toCharArray())); - - RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) e.getPrivateKey(); - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Initialize certificate - merchantKeyAlias = keyAliasValidator(array, merchantId); - - e = (PrivateKeyEntry) merchantKeyStore.getEntry(merchantKeyAlias, - new PasswordProtection(merchantId.toCharArray())); - - X509Certificate certificate = (X509Certificate) e.getCertificate(); - - String encryptedSigMessage = ""; - - if (request != null && !request.isEmpty()) { - MessageDigest jwtBody = MessageDigest.getInstance("SHA-256"); - byte[] jwtClaimSetBody = jwtBody.digest(request.getBytes()); - encryptedSigMessage = Base64.getEncoder().encodeToString(jwtClaimSetBody); - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Get JWT - String claimSet = null; - if (method.equalsIgnoreCase("GET")) { - claimSet = "{\n \"iat\":\"" + ZonedDateTime.now().format(DateTimeFormatter.ISO_INSTANT) - + "\"\n} \n\n"; - } else if (method.equalsIgnoreCase("POST")) { - claimSet = "{\n \"digest\":\"" + encryptedSigMessage - + "\",\n \"digestAlgorithm\":\"SHA-256\",\n \"iat\":\"" - + ZonedDateTime.now().format(DateTimeFormatter.ISO_INSTANT) + "\"\n} \n\n"; - } - - /* Preparing the Signature Header. */ - HashMap customHeaders = new HashMap(); - if (merchantId != null) { - customHeaders.put(JWTCryptoProcessor.MERCHANT_ID, merchantId); - } - - if (merchantId != null) { - customHeaders.put("v-c-partner-id", merchantId); - } - - JWTCryptoProcessor jwtCryptoProcessor = new JWTCryptoProcessor(); - - System.out.println("\t JWT Body : " + claimSet); - - token = jwtCryptoProcessor.sign(claimSet, rsaPrivateKey, certificate, customHeaders); - } - catch (Exception ex) - { - System.out.println("ERROR : " + ex.toString()); - } - - return "Bearer " + token; - } - - /** - * @param array - * -list of keyAlias. - * @param merchantID - * -Id of merchant. - * @return merchantKeyalias for merchant. - */ - private static String keyAliasValidator(ArrayList array, String merchantID) { - int size = array.size(); - String tempKeyAlias, merchantKeyAlias, result; - StringTokenizer str; - for (int i = 0; i < size; i++) { - merchantKeyAlias = array.get(i).toString(); - str = new StringTokenizer(merchantKeyAlias, ","); - while (str.hasMoreTokens()) { - tempKeyAlias = str.nextToken(); - if (tempKeyAlias.contains("CN")) { - str = new StringTokenizer(tempKeyAlias, "="); - while (str.hasMoreElements()) { - result = str.nextToken(); - if (result.equalsIgnoreCase(merchantID)) { - return merchantKeyAlias; - } - } - } - } - } - - return null; - } -} - -class JWTCryptoProcessor { - public static String MERCHANT_ID = "v-c-merchant-id"; - - public String sign(String content, PrivateKey privateKey, X509Certificate x509Certificate, - Map customHeaders) { - return serializeToken(signPayload(content, privateKey, x509Certificate, customHeaders)); - } - - private String serializeToken(JOSEObject joseObject) { - return joseObject.serialize(); - } - - private JOSEObject signPayload(String content, PrivateKey privateKey, X509Certificate x509Certificate, - Map customHeaders) { - if ((content == null) || (content.trim().length() == 0) || (x509Certificate == null) || (privateKey == null)) { - return null; - } - String serialNumber = null; - String serialNumberPrefix = "SERIALNUMBER="; - String principal = x509Certificate.getSubjectDN().getName().toUpperCase(); - int beg = principal.indexOf(serialNumberPrefix); - if (beg >= 0) { - int end = principal.indexOf(",", beg); - if (end == -1) { - end = principal.length(); - } - serialNumber = principal.substring(beg + serialNumberPrefix.length(), end); - } else { - serialNumber = x509Certificate.getSerialNumber().toString(); - } - List x5cBase64List = new ArrayList<>(); - try { - x5cBase64List.add(com.nimbusds.jose.util.Base64.encode(x509Certificate.getEncoded())); - } catch (CertificateEncodingException e) { - return null; - } - RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey; - Payload payload = new Payload(content); - - JWSHeader jwsHeader = new JWSHeader.Builder(JWSAlgorithm.RS256) - .customParams(customHeaders).keyID(serialNumber) - .x509CertChain(x5cBase64List).build(); - JWSObject jwsObject = new JWSObject(jwsHeader, payload); - try { - RSASSASigner signer = new RSASSASigner(rsaPrivateKey); - jwsObject.sign(signer); - if (!jwsObject.getState().equals(JWSObject.State.SIGNED)) { - return null; - } - } catch (JOSEException joseException) { - return null; - } - return jwsObject; - } -} diff --git a/src/main/java/samples/authentication/AuthSampleCode/StandaloneOAuth.java b/src/main/java/samples/authentication/AuthSampleCode/StandaloneOAuth.java deleted file mode 100644 index d3c4aeb..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/StandaloneOAuth.java +++ /dev/null @@ -1,210 +0,0 @@ -package samples.authentication.AuthSampleCode; - -import java.lang.invoke.MethodHandles; -import Api.OAuthApi; -import Api.PaymentsApi; -import Data.Configuration; -import Invokers.ApiClient; -import Model.*; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.util.Properties; - -public class StandaloneOAuth { - - private static String responseCode = null; - private static String status = null; - private static String code; - private static String grantType; - private static String refreshToken; - private static String accessToken; - private static Properties merchantProp; - public static MerchantConfig merchantConfig; - public static boolean createUsingAuthCode = true; - - public static void WriteLogAudit(int status) { - String filename = MethodHandles.lookup().lookupClass().getSimpleName(); - System.out.println("[Sample Code Testing] [" + filename + "] " + status); - } - - public static Properties getMerchantDetails() { - Properties props = new Properties(); - props.setProperty("runEnvironment", "api-matest.cybersource.com"); - - // OAuth related properties. - props.setProperty("enableClientCert", "true"); - props.setProperty("clientCertDirectory", "src/main/resources"); - props.setProperty("clientCertFile", ""); - props.setProperty("clientCertPassword", ""); - props.setProperty("clientId", ""); - props.setProperty("clientSecret", ""); - - return props; - - } - - public static void main(String args[]) throws Exception { - AccessTokenResponse result; - if(createUsingAuthCode) - { - // Create Access Token using Auth Code - code = ""; - grantType = "authorization_code"; - result = postAccessTokenFromAuthCode(); - } - else { - // Create Access Token using Refresh Token - grantType = "refresh_token"; - refreshToken = ""; - result = postAccessTokenFromRefreshToken(); - } - - if(result != null && responseCode.equals("200")) { - refreshToken = result.getRefreshToken(); - accessToken = result.getAccessToken(); - - // Save accessToken and refreshToken before making API calls - merchantConfig.setAccessToken(accessToken); - merchantConfig.setRefreshToken(refreshToken); - - // Set Authentication to OAuth - merchantConfig.setAuthenticationType("OAuth"); - - //Call Payments SampleCode using OAuth, Set Authentication to OAuth in Sample Code Configuration - SimpleAuthorizationInternet(); - } - - } - public static AccessTokenResponse postAccessTokenFromAuthCode() { - CreateAccessTokenRequest requestObj = new CreateAccessTokenRequest(); - - AccessTokenResponse result = null; - try { - merchantProp = getMerchantDetails(); - - // Set Authentication to MutualAuth to call OAuth API - merchantProp.setProperty("authenticationType","MutualAuth"); - - ApiClient apiClient = new ApiClient(); - merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - requestObj.code(code); - requestObj.grantType(grantType); - requestObj.clientSecret(merchantConfig.getClientSecret()); - requestObj.clientId(merchantConfig.getClientId()); - - OAuthApi apiInstance = new OAuthApi(apiClient); - result = apiInstance.postAccessTokenFromAuthCode(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println(result); - - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } - - public static AccessTokenResponse postAccessTokenFromRefreshToken() { - CreateAccessTokenRequest requestObj = new CreateAccessTokenRequest(); - - AccessTokenResponse result = null; - try { - merchantProp = getMerchantDetails(); - - // Set Authentication to MutualAuth to call OAuth API - merchantProp.setProperty("authenticationType","MutualAuth"); - - ApiClient apiClient = new ApiClient(); - merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - requestObj.refreshToken(refreshToken); - requestObj.grantType(grantType); - requestObj.clientSecret(merchantConfig.getClientSecret()); - requestObj.clientId(merchantConfig.getClientId()); - - OAuthApi apiInstance = new OAuthApi(apiClient); - result = apiInstance.postAccessTokenFromAuthCode(requestObj); - - responseCode = apiClient.responseCode; - status = apiClient.status; - System.out.println("ResponseCode :" + responseCode); - System.out.println("ResponseMessage :" + status); - System.out.println(result); - - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } - - public static PtsV2PaymentsPost201Response SimpleAuthorizationInternet() { - - CreatePaymentRequest requestObj = new CreatePaymentRequest(); - - Ptsv2paymentsClientReferenceInformation clientReferenceInformation = new Ptsv2paymentsClientReferenceInformation(); - clientReferenceInformation.code("TC50171_3"); - requestObj.clientReferenceInformation(clientReferenceInformation); - - Ptsv2paymentsProcessingInformation processingInformation = new Ptsv2paymentsProcessingInformation(); - processingInformation.capture(false); - - - requestObj.processingInformation(processingInformation); - - Ptsv2paymentsPaymentInformation paymentInformation = new Ptsv2paymentsPaymentInformation(); - Ptsv2paymentsPaymentInformationCard paymentInformationCard = new Ptsv2paymentsPaymentInformationCard(); - paymentInformationCard.number("4111111111111111"); - paymentInformationCard.expirationMonth("12"); - paymentInformationCard.expirationYear("2031"); - paymentInformation.card(paymentInformationCard); - - requestObj.paymentInformation(paymentInformation); - - Ptsv2paymentsOrderInformation orderInformation = new Ptsv2paymentsOrderInformation(); - Ptsv2paymentsOrderInformationAmountDetails orderInformationAmountDetails = new Ptsv2paymentsOrderInformationAmountDetails(); - orderInformationAmountDetails.totalAmount("102.21"); - orderInformationAmountDetails.currency("USD"); - orderInformation.amountDetails(orderInformationAmountDetails); - - Ptsv2paymentsOrderInformationBillTo orderInformationBillTo = new Ptsv2paymentsOrderInformationBillTo(); - orderInformationBillTo.firstName("John"); - orderInformationBillTo.lastName("Doe"); - orderInformationBillTo.address1("1 Market St"); - orderInformationBillTo.locality("san francisco"); - orderInformationBillTo.administrativeArea("CA"); - orderInformationBillTo.postalCode("94105"); - orderInformationBillTo.country("US"); - orderInformationBillTo.email("test@cybs.com"); - orderInformationBillTo.phoneNumber("4158880000"); - orderInformation.billTo(orderInformationBillTo); - - requestObj.orderInformation(orderInformation); - - PtsV2PaymentsPost201Response result = null; - try { - ApiClient apiClient = new ApiClient(); - apiClient.merchantConfig = merchantConfig; - PaymentsApi apiInstance = new PaymentsApi(apiClient); - result = apiInstance.createPayment(requestObj); - - 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 (Exception e) { - e.printStackTrace(); - WriteLogAudit(400); - } - return result; - } - -} diff --git a/src/main/java/samples/authentication/AuthSampleCode/Test.java b/src/main/java/samples/authentication/AuthSampleCode/Test.java deleted file mode 100644 index 9533480..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/Test.java +++ /dev/null @@ -1,10 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import org.apache.commons.lang3.StringUtils; -// -//public class Test { -//static String test = ""; -//public static void main(String[] args) { -// System.out.println(StringUtils.isEmpty(test)); -//} -//} diff --git a/src/main/java/samples/authentication/AuthSampleCode/reportDownload.java b/src/main/java/samples/authentication/AuthSampleCode/reportDownload.java deleted file mode 100644 index 4f630ed..0000000 --- a/src/main/java/samples/authentication/AuthSampleCode/reportDownload.java +++ /dev/null @@ -1,272 +0,0 @@ -//package samples.authentication.AuthSampleCode; -// -//import java.lang.invoke.MethodHandles; -//import javax.crypto.Mac; -//import javax.crypto.spec.SecretKeySpec; -// -//import java.io.*; -//import java.net.HttpURLConnection; -//import java.net.URL; -//import java.security.MessageDigest; -//import java.security.NoSuchAlgorithmException; -//import java.time.ZoneId; -//import java.time.ZonedDateTime; -//import java.time.format.DateTimeFormatter; -//import java.util.Base64; -// -//public class reportDownload { -// // Before using this example, replace the generic values with your merchant ID, -// // shared secrect key, etc -// // Note: please use %20 for space if your report name has space eg.your report -// // name is "my test", then use "my20%test" -// private final String USER_AGENT = "Mozilla/5.0"; -// public String merchantKeyId = "08c94330-f618-42a3-b09d-e1e43be5efda"; -// public String merchantsecretKey = "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE="; -// public String merchantId = "testrest"; -// -// /* -// * Add Request Header :: "Host" Sandbox Host: apitest.cybersource.com Production -// * Host: api.cybersource.com -// */ -// public String requestHost = "apitest.cybersource.com"; -// public String gmtDateTime = ""; -// public static String resourceURI = "/reporting/v2/reportSubscriptions/TRRReport?organizationId=testrest"; -// public static String resourceFile = "report"; -// private static final String FILE_PATH = "src/main/resources/"; -// -// 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 { -// -// /* -// * Calculate HTTP Signature Digest and Authenticate Cybersource Report API using -// * HTTP Client -// */ -// reportDownload http = new reportDownload(); -// -// try { -// http.sendGet(resourceURI, resourceFile); -// WriteLogAudit(200); -// } catch (Exception e){ -// WriteLogAudit(200); -// throw e; -// } -// } -// -// // HTTP GET request -// private void sendGet(String resourceURI, String resourceFile) throws Exception { -// -// String url = "https://" + requestHost + resourceURI; -// -// /* HTTP connection */ -// URL obj = new URL(url); -// HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -// -// /* -// * Add Request Header :: "v-c-merchant-id" set value to Cybersource Merchant ID -// * or v-c-merchant-id This ID can be found on EBC2 portal -// */ -// con.setRequestProperty("v-c-merchant-id", merchantId); -// -// /* -// * Add Request Header :: "Date" The date and time that the message was -// * originated from. "HTTP-date" format as defined by RFC7231. -// */ -// gmtDateTime = getDate(); -// con.setRequestProperty("Date", gmtDateTime); -// -// /* -// * Add Request Header :: "Host" Sandbox Host: apitest.cybersource.com Production -// * Host: api.cybersource.com -// */ -// con.setRequestProperty("Host", requestHost); -// -// /* -// * Add Request Header :: "Signature" Signature header contains keyId, algorithm, -// * headers and signature as paramters method getSignatureHeader() has more -// * details -// */ -// StringBuilder signatureHeaderValue = getSignatureHeader("GET", resourceURI, resourceFile); -// con.setRequestProperty("Signature", signatureHeaderValue.toString()); -// -// /* HTTP Method GET */ -// con.setRequestMethod("GET"); -// -// /* Addition Request Headers */ -// con.setRequestProperty("User-Agent", USER_AGENT); -// con.setRequestProperty("Content-Type", "application/json"); -// -// /* Establishing HTTP connection */ -//// int responseCode = con.getResponseCode(); -//// String responseHeader = con.getHeaderField("v-c-correlation-id"); -// -// /* Download Report */ -// ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); -// org.apache.commons.io.IOUtils.copy(con.getInputStream(), outputStream); -// byte[] bytes = outputStream.toByteArray(); -// BufferedReader br = new BufferedReader(new InputStreamReader((new ByteArrayInputStream(bytes)))); -// -// String output; -// String reportType = "csv"; -// System.out.println("Output from Server .... \n"); -// while ((output = br.readLine()) != null) { -// if (output.contains("xml")) { -// reportType = "xml"; -// } -// } -// -// BufferedReader br_write = new BufferedReader(new InputStreamReader((new ByteArrayInputStream(bytes)))); -// BufferedWriter bw = new BufferedWriter(new FileWriter(new File(FILE_PATH + resourceFile + "." + reportType))); -// while ((output = br_write.readLine()) != null) { -// bw.write(output + "\n"); -// } -// -// con.disconnect(); -// bw.close(); -// -// } -// -// private String getDate() { -// /* This Method returns Date in GMT format as defined by RFC7231. */ -// return (DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneId.of("GMT")))); -// } -// -// private StringBuilder getSignatureHeader(String httpMethod, String resourceURI, String resourceFile) -// throws Exception { -// -// /* -// * This method return SignatureHeader Value that contains following paramters -// * keyid -- Merchant ID obtained from EBC2 portal algorithm -- Should have value -// * as "HmacSHA256" headers -- List of all header name passed in the Signature -// * paramter below String getHeaders = "host date request-target" + " " + -// * "v-c-merchant-id"; String postHeaders = -// * "host date request-target digest v-c-merchant-id"; Note: Digest is not -// * passed for GET calls signature -- Signature header has paramter called -// * signature Paramter 'Signature' must contain all the paramters mentioned in -// * header above in given order -// */ -// -// StringBuilder signatureHeaderValue = new StringBuilder(); -// -// /* KeyId is the key obtained from EBC */ -// signatureHeaderValue.append("keyid=\"" + merchantKeyId + "\""); -// -// /* Algorithm should be always HmacSHA256 for http signature */ -// signatureHeaderValue.append(", algorithm=\"HmacSHA256\""); -// -// /* -// * Headers - list is choosen based on HTTP method. Digest is not required for -// * GET Method -// */ -// String getHeaders = "host date request-target" + " " + "v-c-merchant-id"; -// String postHeaders = "host date request-target digest v-c-merchant-id"; -// -// if (httpMethod.equalsIgnoreCase("GET")) -// signatureHeaderValue.append(", headers=\"" + getHeaders + "\""); -// else if (httpMethod.equalsIgnoreCase("POST")) -// signatureHeaderValue.append(", headers=\"" + postHeaders + "\""); -// else if (httpMethod.equalsIgnoreCase("PUT")) -// signatureHeaderValue.append(", headers=\"" + postHeaders + "\""); -// -// /* Get Value for paramter 'Signature' to be passed to Signature Header */ -// String signatureValue = getSignatureParam(httpMethod, resourceURI, resourceFile); -// signatureHeaderValue.append(", signature=\"" + signatureValue + "\""); -// -// return signatureHeaderValue; -// } -// -// private String getSignatureParam(String httpMethod, String resourceURI, String resourceFile) throws Exception { -// -// /* -// * This method returns value for paramter Signature which is then passed to -// * Signature header paramter 'Signature' is calucated based on below key values -// * and then signed with SECRET KEY - host: Sandbox (apitest.cybersource.com) or -// * Production (api.cybersource.com) hostname date: "HTTP-date" format as defined -// * by RFC7231. request-target: Should be in format of httpMethod: path -// * Example: "post /pts/v2/payments" Digest: Only needed for POST calls. -// * digestString = BASE64( HMAC-SHA256 ( Payload )); Digest: -// * “SHA-256=“ + digestString; v-c-merchant-id: set value to -// * Cybersource Merchant ID This ID can be found on EBC portal -// */ -// -// StringBuilder signatureString = new StringBuilder(); -// signatureString.append('\n'); -// signatureString.append("host"); -// signatureString.append(": "); -// signatureString.append(requestHost); -// signatureString.append('\n'); -// signatureString.append("date"); -// signatureString.append(": "); -// signatureString.append(gmtDateTime); -// signatureString.append('\n'); -// signatureString.append("request-target"); -// signatureString.append(": "); -// -// String getRequestTarget = "get " + resourceURI; -// -// if (httpMethod.equalsIgnoreCase("GET")) -// signatureString.append(getRequestTarget); -// signatureString.append('\n'); -// -// if (httpMethod.equalsIgnoreCase("POST") || httpMethod.equalsIgnoreCase("PUT")) { -// signatureString.append("digest"); -// signatureString.append(": "); -// signatureString.append(getDigest(resourceFile)); -// signatureString.append('\n'); -// } -// -// signatureString.append("v-c-merchant-id"); -// signatureString.append(": "); -// signatureString.append(merchantId); -// signatureString.delete(0, 1); -// String signatureStr = signatureString.toString(); -// -// /* -// * Signature string generated from above parameters is Signed with SecretKey -// * hased with SHA256 and base64 encoded. Secret Key is Base64 decoded before -// * signing -// */ -// SecretKeySpec secretKey = new SecretKeySpec(Base64.getDecoder().decode(merchantsecretKey), "HmacSHA256"); -// Mac aKeyId = Mac.getInstance("HmacSHA256"); -// aKeyId.init(secretKey); -// aKeyId.update(signatureStr.getBytes()); -// byte[] aHeaders = aKeyId.doFinal(); -// String base64EncodedSignature = Base64.getEncoder().encodeToString(aHeaders); -// -// return base64EncodedSignature; -// } -// -// private String getDigest(String resourceFile) throws NoSuchAlgorithmException, IOException { -// -// /* -// * This method return Digest value which is SHA-256 hash of payload that is -// * BASE64 encoded -// */ -// String messageBody = getPayload(resourceFile); -// MessageDigest digestString = MessageDigest.getInstance("SHA-256"); -// byte[] digestBytes = digestString.digest(messageBody.getBytes("UTF-8")); -// -// String bluePrint = Base64.getEncoder().encodeToString(digestBytes); -// bluePrint = "SHA-256=" + bluePrint; -// return bluePrint; -// } -// -// private String getPayload(String resourceFile) throws IOException { -// -// URL path = reportDownload.class.getResource("resource/" + resourceFile); -// File fr = new File(path.getFile()); -// BufferedReader buf = new BufferedReader(new FileReader(fr)); -// String line = buf.readLine(); -// StringBuilder sb = new StringBuilder(); -// while (line != null) { -// sb.append(line).append("\n"); -// line = buf.readLine(); -// } -// String messageBody = sb.toString(); -// buf.close(); -// return messageBody; -// } -//} \ No newline at end of file diff --git a/src/main/java/samples/authentication/Data/Configuration.java b/src/main/java/samples/authentication/Data/Configuration.java deleted file mode 100644 index 5d4b5f5..0000000 --- a/src/main/java/samples/authentication/Data/Configuration.java +++ /dev/null @@ -1,39 +0,0 @@ -package samples.authentication.Data; - -import java.util.Properties; - -public class Configuration { - public static Properties getMerchantDetails() { - Properties props = new Properties(); - - // HTTP_Signature and JWT - props.setProperty("authenticationType", "http_signature"); - props.setProperty("merchantID", "testrest"); - props.setProperty("runEnvironment", "apitest.cybersource.com"); - props.setProperty("requestJsonPath", "resources/request.json"); - - // JWT Parameters - 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", "resources"); - // HTTP Parameters - 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 - props.setProperty("logDirectory", "log"); - props.setProperty("logFilename", "cybs"); - - // Log file size in KB - props.setProperty("logMaximumSize", "5M"); - - return props; - - } - -} diff --git a/src/main/java/samples/authentication/Data/PayloadData.java b/src/main/java/samples/authentication/Data/PayloadData.java deleted file mode 100644 index edb2e11..0000000 --- a/src/main/java/samples/authentication/Data/PayloadData.java +++ /dev/null @@ -1,77 +0,0 @@ -//package samples.authentication.Data; -// -//import com.cybersource.apisdk.model.AmountDetails; -//import com.cybersource.apisdk.model.BillTo; -//import com.cybersource.apisdk.model.Card; -//import com.cybersource.apisdk.model.ClientReferenceInformation; -//import com.cybersource.apisdk.model.OrderInformation; -//import com.cybersource.apisdk.model.Payment; -//import com.cybersource.apisdk.model.PaymentInformation; -//import com.cybersource.apisdk.model.ProcessingInformation; -//import com.cybersource.apisdk.model.SubMerchant; -//import com.google.gson.Gson; -//import com.google.gson.GsonBuilder; -// -//public class PayloadData { -// -// public static String readData() { -// -// ClientReferenceInformation client = new ClientReferenceInformation(); -// client.code("TC50171_3"); -// -// ProcessingInformation processingInformation = new ProcessingInformation(); -// processingInformation.commerceIndicator("internet"); -// -// SubMerchant subMerchant = new SubMerchant(); -// subMerchant.cardAcceptorID("1234567890"); -// subMerchant.country("US"); -// subMerchant.phoneNumber("650-432-0000"); -// subMerchant.address1("900 Metro Center"); -// subMerchant.postalCode("94404-2775"); -// subMerchant.locality("Foster City"); -// subMerchant.name("Visa Inc"); -// subMerchant.administrativeArea("CA"); -// subMerchant.region("PEN"); -// subMerchant.email("test@cybs.com"); -// -// BillTo billTo = new BillTo(); -// billTo.country("US"); -// billTo.lastName("VDP"); -// billTo.address2("Address 2"); -// billTo.address1("201 S. Division St."); -// billTo.postalCode("48104-2201"); -// billTo.locality("Ann Arbor"); -// billTo.administrativeArea("MI"); -// billTo.firstName("RTS"); -// billTo.phoneNumber("999999999"); -// billTo.district("MI"); -// billTo.buildingNumber("123"); -// billTo.company("Visa"); -// billTo.email("test@cybs.com"); -// -// AmountDetails amountDetails = new AmountDetails(); -// amountDetails.totalAmount("102.21"); -// amountDetails.currency("USD"); -// -// OrderInformation orderInformation = new OrderInformation(billTo, amountDetails); -// -// Card card = new Card(); -// card.expirationYear("2031"); -// card.number("5555555555554444"); -// card.securityCode("123"); -// card.expirationMonth("12"); -// card.type("002"); -// -// PaymentInformation paymentInformation = new PaymentInformation(card); -// -// Payment payments = new Payment(client, processingInformation, null, orderInformation, -// paymentInformation); -// -// Gson gson = new GsonBuilder().setPrettyPrinting().create(); -// // Gson gson=new Gson(); -// String paymentsRequesString = gson.toJson(payments); -// return paymentsRequesString; -// -// } -// -//} \ No newline at end of file diff --git a/src/main/java/samples/authentication/harness/FileReader.java b/src/main/java/samples/authentication/harness/FileReader.java deleted file mode 100644 index cbca6e4..0000000 --- a/src/main/java/samples/authentication/harness/FileReader.java +++ /dev/null @@ -1,19 +0,0 @@ -package samples.authentication.harness; - -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; - -public class FileReader { - public static String readJsonFromFile(String fileName) throws IOException { - if (fileName != null) { - InputStream jsonIn = new FileInputStream(fileName); - byte[] jsonBytes = new byte[jsonIn.available()]; - jsonIn.read(jsonBytes); - jsonIn.close(); - return new String(jsonBytes); - } else { - return null; - } - } -} diff --git a/src/main/java/samples/authentication/harness/MerchantProperties.java b/src/main/java/samples/authentication/harness/MerchantProperties.java deleted file mode 100644 index 0ccb18e..0000000 --- a/src/main/java/samples/authentication/harness/MerchantProperties.java +++ /dev/null @@ -1,22 +0,0 @@ -package samples.authentication.harness; - -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -public class MerchantProperties { - private static String propertiesPath = "src/main/resources/cybs.properties"; - - public static Properties getMerchantProperties() throws IOException { - InputStream merchantInput = getPropertyFile(propertiesPath); - Properties merchantProperties = new Properties(); - merchantProperties.load(merchantInput); - return merchantProperties; - } - - private static InputStream getPropertyFile(String fileName) throws FileNotFoundException { - return new FileInputStream(fileName); - } -} diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar deleted file mode 100644 index 52417d0305867652f59fae1dcb08ca47d00d591c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24960 zcmbTe1#lcek~J&~Ew-4MnVFfHnVFd-iy226F*8dRqs7e3U@6)0#sOrkBSD96>Mo|U~90ues7lN;z%3lkA|A78{%8988(MidRGbsLD>?;WTr&zF? zpuFSf&tac8>VFrL6Oxw_7gJHCmlMB}n;4gsp`)LLm!YGcnwV}-W?W#|IdGe-eh&Eg{MnoV7eI(K(_Hy6#K;?MUXysyR^KX=h|92%52YY)n6IUw-`~TniuFej& zwr0-%MxWq+uiwtd#m36s;@>Fa{TpQmQ#0Ftqxx^^bun{xxB72A{WsrYZ94DQfE~IBJ+5c+RWefI6*_)ppdz0B0@ja`m!B$n~JG z@5(`{)j75ZqkZNampP0F)huy{{KuKu+tK3udD?JfY5Kb9o=0Mi*;-B?p?ZW{GPw?8B74UW%VjT5$J@2iS-P5(FP;ybv_ zKB{JCl(qDP{O-w@irUpl&2tW!zu(b4^UAr9oNnFn z_6Q5}1aUEx-9vgPTcV_lT0jaNXclc-s?e^}bh^bJ#GG-HsHad&2O3t+0x|KeX;WFs z6E5{fjYh#)s}_2gvGzW3b;G(iyCRWUR|T?fhvt3ARb>oouoeIxD?#2Oui?}?$-0re zt*v3AQmC1=%4S3*9qX4(po0fpO8=I*=sb+#Fl6^kUHRUZ?uF}=xY`@VVUB0ugqtHO zYZ`adH|}OZ5E6#=#BwcnB~NZ?&SA$3Gc0In*J*dyjj7w9I*qnr8sQ{-kpQi+Q`c|f z1!v>?y2=t*z&JbJB0<;l9{YJ^Bmgih3IU2fr36n%L~YpPdJX)66+UYY17H+<(>0d?aE3OhvQW@`M#&VgcJ3^JiDP~ zJmcP`heD%s4^)vU&1edfi&N7bc39LbttsST8=wB>A+eh!DkYF7Vf@0SflnpopdCl% zFdL>}g^zwxoNMkL`{|$;NdFF1^8O z|7{Y&7lu=+`+n+pS}pyYNJr1r)fI8gyX-?0MN;j`FU>y}ko+3b2Uoj?D|qJB6oijK z|E)_>C-7UrfRD2o!8r)tILh1CgNP8sZ|SfKc!aMs?cyh>eo@yf+%^h{8W!3vfB@p= z7andDy|j1S;>Oj1r(e{EX7{~Lk^f3(X!-W2u!kv zg^40Dt~*%Vj4@8W@j{)k!@bzTNxvua;*Y&vCAz-bN10+eByC|@#qM#>;?mFeNaqK! zx;us1T8wzZ2pD1u^!6~cM#+TKeZ|(oBs^mhm0SyN`ASs4EKHdi498ED#d<&!mJ4ka zi+OMan*yA7B2t z-+av0?DpY6Ko+n;K-m9p{pRZG_^*JStpV++x`_5ip_v0qUz7Zt5K;+RD(s8aLIf<) zmjdVkTTI0pCNEMjK)S1WP*A~Um0kH_yIPeDN97{D_9XZ~h23U#Q?qqtbMumQWs|jr zjoxv>%eQ?L+mpVoEH>7?+rh*kS!xn;!+ ztbqAmDrC;>uGOZmc(?)9a}xmz<4%7Aw?JwCo%A0Zu%8cmj-7e^S8%_#!Z99(2z))I z(B2CX7-$Y?_U^{7}pYc)ey2 zVEE7pZ*hB$N4$EzG3Y$&_u=on>W6CYNDUU$_*h6ePLP01suc+&3gyOlnWcneL(Wx* zii~-7vq(lLK_HW6TT5W_uTpZuPpH=&<;(@YFH#j4dNU20LUBto9WfOtIo?$jU>{)> zpiQsoC*n>n!)I~jTwpL`R;k4`AEEt;OD}=xTtw6WPlbUhwx_4(F3i|KlyeND)urCL zj&Nd5x>S7ECzlTyzR%fvjL(B~*=$^HcC#`hnM%0wE$%6#PlsbA(zKHSsaZtbpn_+$ zjSDr7;#_f$f8SJb4(sFxpq$*sMr7j@l@|NPzqW}@8ab7JVc&m|+h89+5H}1ykHfB| zQ>8c|AF5uW++{ZjkBZvRUoOcjUZ4d1X5v@mu(@Uf3rg>_P@qLu4qin+0HhFwrxoPP*2rEx!T|!aWmshC-#*gu9rLo@9n$|4lq}9_!i8~u6QVLm$9Rm{T6&kA=YH3`0M@bN!zT`AoR%a1&+!$r`lE}RClJ`R1#7%2@oZ;$ztSFWIn!duE&(f)wQ*BmGnFw9YoP`T-tF+m`C;= z?wSzI;QhU_7trF|DLa}d7JIlV6`^&h2!QV~LCt9;u3FUkL!Pwb=(XA^K*MmVVOXXd z)}YkmukZ_|Zj`2Dkb3Yv>E< zS9)=8I*G?ArLEPrUgCIbVZb+;8JA8kV#WL9yF=N@!mrhvjZ(X54`vibz%A1?s_-=B z%KM9BnCK9NYWZWVV;rJI3)L-WH@x0|_nvxGQ3 z7R8i!n-$8+u{m}1F}LwI4@QY|k2_E6uBcl->lbicdll0f3K>GzavYdK-_HAm!(^zp zC?5STX;w!`rMZ#Et6AEGL2!;@O`D^HM`cqsV=_yrDyb|UO;$#3_@Q0cZ#756`RluN7?q7#HdSfm;}>`r(6qWj1ZVl8++Nj0mWNi-Gx2H_>QJE{ z`fll*zD*|ZW4H^$KY*NhLtWbqsKMpE{Enjp8Q(< zuCiRN_WLQ0g-kl`l!@W$tXkV>h5X~Re&k_xv`a~>5+x}+;XBuebUk*s#8m7?EXeGu zD>~`-x@!TPA~D(-qE2U(n0*-!|#Na_`a zwKh`b_qdRf=7ryQNTe7VM-xk{ZzkDI98ZKEXZl}MzK}W}*-lQ@BDoAjQX?KmWG_4y zcrRF{_%$zS@nfu24Q(=yYEl|hUcY3^mF`?0kbBuHig!g&;w zqrv07UDMq(qp@~t_q$9a;S;-@j#MnFxZ(O7ws^J%iUl0quha>QDy=uFFTjeAH?7HP({egBM3!Hu|j?5pIKdwH_m>4 z$5eBoh!K>+F7z;Nzl>cCt$)XS0s{vv=EZ5j*}HS%Sv}lS!KJYT|5i}uMLFav+oQw@ z4(kYxP8=b|i5{&KT{s(K?VFK|qL<=G#1Fc(*Vgo3_puL(r}0! zHKL(ZF&fe{Ft(Yd3S!Nge#Tm|5h4}q&1%O{auiruvB^mqp8>-l*QffY4SV`~Z#^WL z=FmIZM(rT$g3{hWT69Vr(5xssOxgDf2G48QkJm8VV?96k{c5)BL1q6R26y+q5gHHD zJiR%yOy5Po%&aDga=Zq(I!BN*sEr&BwRjYCEDdR}XNG>VX#vm;QM*INM+%2n^v=-xcF60R-qzmyRvLov?6;P+02Qn}H6p}3g zr#Iabu=6i9CP$FM!8r%vXWCHFURcYA#!R8IPi}S`Xc3M-!znT`V=^P>hY5{J`C1Fa?>zK|j)P>W4ak z8)4TRoXF#j-7-QM7+thY&Hf0=iz#%dA$s)U#hciN$m!-+P5PtF0FX&+NsZYUbHN*E z`1NZ0P4_}AH!u3uDR?nltB$nr7|r#KGwUJ!eC-$YF@q7e}p?EwfC; znH9m@gen5Z*=E`*2WT+3EGbEMhc84Fg^7=$(TbU?m^c*Kj-N6lg|H#xkuN^4zC6x} z-a#Oq2Soe8j&WLYlYijw^y2!^padg{P0?Mx``AZ1u1v8K!Y=i6>BnbvZ$;|12C2mR z*`Ue_Aum_R6^jnKJodq!TI4s1UuEQ*wWP^rhrvCksdGTtMjtyr&)FZU*W~ftLjVtq zInGgSEmHYOHU;5uCTEmWC-<%^Zrg%uTR&Z&%`QvV2@L%*aIqc=hj+3c>=^gEo*rW; zy4`shz3(@&UMg0T!;H+w?)*%>kRqOE!V-0Gt(p0V<3`xb3fPK!PnSiz)s|cIAu>lO zliFNpKa8P0eeXB_*9W1cknm?nz8G)bFmc|gAMfDY*Q8TDDz@l3=Am9;WV;$Mp$05} zatAqXaQ6^<$@6FYPcEE3$H>ks*Oiph3T&);OI?z(A3aO`t-l1)B$ zWCaFXhhP6Bjq)hMxRQps8ufY>q#w{K!e_&;4IyG+lRmn zvfE*&`H69>=i(~Q5V8y084aqMr(w{v1fb+w0y?XA+y)l7o^4&WgU%(v!uiOP!ul@o z&v}!aU)M7P0tkrH=gJz}|0!>h_Hg~zw5eM2Gi_RS`xD>%#L5f(?JFs$CnIJEI;5?w ziBONWkTC305M3RfKx|G?;OxZn9rMDF4K+f*MQLJjAt9YkIZlJ@6|c)9pAif zxU&7WdbZE*U}dfmpCwQ}On*gtpUV)P_oa$F!*o}yPoJGFC$BEMJx+V?<8b?`ggcyE z+u?N=_ItQJW1xIk|Js)Q?ep~`@I&=+dtS$2X7cLn9E$vpOlm+GgTUPGFu6Z+U%+0e z_w2OrGr{j#gb#}yv91Rz6o!-f)Q1DK93)KQFx1dGg(#5~8nUqDu$idRhvFC(CRau| zDhd!}W>cxJdd5m*% zEvNlhN_H!$;yA!gIq4_~NihwkTBeSU4YP$Yf>Xe8){|r(M;AGTTeX(#%A?K6N^{ih z4a+IwL8@1Acb$toHl}6DpUxg8=G#i#3>tH_B{s4s(JLjpY{d%1MG7ex743^OHy#Z! zw3}vn3&E4(Odko9C1>NEnFp?`L8`>zWH+K<)x-^xgUj*F?yHh=vz)e`>^I`L5kI<` zGxNFgBFnYQ7kTtLF;nKa@0qd$z&h;wIN&}}WlnToOEN(iJVmCRq<`Q(Y2@o&q|T+b zSE=ufk$IQYaysvptp%jZ#=%b(d6v2Mjk?A{15HQYB;ui)b*as%OO)krx;;$^IXl)1 zJ3Q8;EVKb8ETSF?v`FLUXtuQ-)M738=*iFRv=@^BP(U$0k8D6uQx3U z;09z&B@~({l-Fs^Pnu@2BBJBju@%kstn*p?7;Z;yn-A)8<6`$Z(;!+-(&X8&+9X4f3$l_2d5Y6ey92?P4&rRU^IG3A5^J}&>PdbPPRI7+M&c>}I^oY$G^DS} zTcUzrNsv@10CQYJBNV%&hz=!(26)%R$G+R90&&!>wssLC*ZZSQZa%z?0vl0Sfc02v z3G2?-LnzNq#gz6pvAj;2aGx+T73@=A6Jsy{{c?F%D2vrJlMHFqeiUKVe&hkTLC6EK z%uw>%l^i|(Jf1@0!ZV)lbO3R+Mh@O94sv6gNfb=Sxo|^taGl4SJB*vQEq&vLy>qn> z>={DFeUuKp#7VfWK+sf&Gp?0r5_k^ebIlNW4;IZ=$|;kGBjISFzi6L!?q@43_K=<*y073t&7 zR0TbkfN-#GHR{i0$aLeO<4GZ}<*e9#Vru8a!;XgU%8Xx+e_CIp@k)D=Dl+ldFOn_S z0oOK}^aZQYR5A?f7KjU6r)v`_ZoQ29l^(`7i)vRe-zL9t*IcraMnyVv3_5mKJ1RiG11tj zn4=rC3q&Igud7w!0wdp8#8;1fs?0mXNHSNbq~@o0a?7H-Tf&wvDpe^j8rNOQb=Fk? z>e50JYiRv|PyazmBo)LL0JV;K$xNc3vl=8E@UrJ0Cu6}9=xr5{b58@SHV;woGDU6K z8if#%&yzSl*NvzCgMw3N7^EdGKGE+)UajLw+D7T|FSp50B-E1C>Ie!D4JA8w~#X>Kh< z&s&&EAojGQFU+&Q3D${ko}0XMF~NFguHad#_?0TYC-vYMIyeoV%|tPkW5FebAhDjb zid^P5b12-cH6mw?ep2eS8}(A1*R-gnqT~G2iq2%xXnUx3lm=$yWomhXv|*HrfgX{x zsY?gYB&EoK;mfQx*^+Q?dgwYyk?IuPxz*yDl~3@5Wa7b-@G)9ef+dabfr&z=@iMFV zRf7b0nI>KCDNFO(#E&imHL6#4v*;{an_bt%NLwnpn$^H!Ai=J2!dlz4A%IZ#WiL$> z$(S>Y?5ow&*XwM)+9%WXGrrXqZv}RWEdYGklPS~*pGDBodoQ56;>mZ$#{kC2;m$kG zVP~DERe#{<^0gu1^_Ldv;y7)T8|7@iYB)1q%qygxOJpqK_2W zqR~oc=kJVEIkJW;h_iGz(QO_=e>S;j zV#sP_^}llIs$A8EQB6Q@dIeFt8-sfollA&iY)x9!L!EJ2b8W>?pA#py7?KFBg>|)} zy-Cgn@i!*b1Si|I!d~!h3lW?aZ9W0IVSfhN-=2{T2YX`jc?uxhfc;|U4gTVb9{da% zb}a_ybNKacs>8C=V6YbHceo2n5JB28-ETSxFFDFa@0A{%>O~UVaj%fv&&~GiQ<{4a zGAXE`Rv@?iz5}2;b!wM;io-?QbqvhZYY_;NO>xUemZRpTrsLOhI$f9#{>OZ;f$JP+ zx`3*VYrFa80$Ts9&>e-Ea|;Zmu#PdzY@j&orU|%WYZ}7F-0jZzm#I^C;WuPp67up;O&?fZL6UfA{pqM+kQB8r&6CudLv?9T< zqJaB)qwc-7?#SVUNd~GSx&uG3!{_-m{kR+=#^)xkL0^1{d;YcmdA%aU?xS3EzpEuRl4d9|pD~ zi!qq=^^ic~vt9qes870ssCoM`wwwCBw6$cli9@l=S|H`2>sioVeF{tMis)G{O6`dj zp+W{POJsU@c05UlU>;X<(F6ZojB`(HM&G>D7G39xigVnVariy}=%e8DgzK{GbyyUC z_+y&9iir1=sk$m~^?W`PBl>{yl}bC!O?czgP(Gdm!h7L`oL|*#y%YA@3;|3F32NGe zlE#=0MOb}+O%(ANJn=W_vOs^fLcP6T2HRPiZnbtQg{oeTB4pGhoTzt<`Gc4>B1~#= z3j&8{zJLL}$kx`;F@5edO{n@51a13}R4uAMW$FHOnJH6lKZax4P$5xd ziP>@Z@v($_erI>c!|xcVp4lp=t0E#CKawB5l1PQ4sFzGqf&;+9#?RRx4m zlw}aNB9Ji{0RmZE7w0sN8N?v@ZOhU@b#o_ny@>>O^Bhh)aGZhWI=AhRwa2-AkeB9* z-NR4&%m#ONbxjj*?eT|R{rDyARa48#{5w7|Cm4#cS1Ne~jvvFkHzL3-0;R&-{jA3& z-V207IL~hcH*lD!34GOo#0^|7mn5NEI=dD}Wy`*kK9a?y2hpxIsmJgPM~fvG15E)<2O|EZd8+n94_}3wQ1c2gzs%xYLDPu`^NW+Ui$Wjg3MSSFiE4n z37;v22NX${^>1AA9MK1?s|s8i@sb(ndKPg&zlHzr9wHR<0Hn3_`UNs}vKgfJgjNUS@{}B+^LH#To8dm9?4mh_#(oLn{K=q}v^F`}j zrY>lug03;fZ;yibiWV&?!;BJ0^i=#6SX@v}SXqF_fu>1qyN|kIT*h?as?7;^lYCJG z;2nO5k(4emDn8iynJoK4T#7}^du3+6JXA&W;teKPVGF?}_Lztoci-yFm!LtO9CTgz!3uo(DD&V z8!cA^$}VOx(f0F16Z=Axy{O=$Yk#*%{4#MD8TrRft{HjH+m4J(X~N(bS*y!TYR?P(Uaw- zp773#qQ|C{slQ;1Q~1fdXjl!Nc>AE_s!}&wLpKoLN8e}__Fg*t=D}ze> zHW>A|!?N0OUNhn%8NWYDiGBnB^eD@bSERN6OZpE2Gq_C$+guP|B??jxE^^f0MY|Ti zg~1$Xv{<((e}7UGOmW}b857sGncb|+v6c!Z9V_-0do$K9&7k5s!6%DTI~*Z{NJgc#J%f2VvE@QcOFc|@6yh9*N0i6AZus@`2d|ef*Ic={r1_@CwswU= zJz}DAnoBMafjo3a{9RnGEA7ad-_}JjD=^xIPn>w}ODf`=qTf=gi%o6S+kRq>B#i2% z>c_TpjojZ3pM*mw!mA0DodD-+f=1KDY?8`IFJwr`CR}7i5Gwd6gNoO0kYd_jS?px zs_E$Q$#zb8veABKI=p%%gAHcdRS6E_mNx{y)aIs8^c0lRJ%cL3)AFici6H$&l*fTH3+oe?aMhh2Aj&g?vY-`i&z3Gqt>sT9mdm%}9jUhx#-Y(#Sv9 z?N$bz9%QldGmhFA-!sA->!p{_`B!I0ob_stkS^3$2tq{(fiRr}aU5n>Sl~#zmTKM> zX!jPeZ;Ih4Xq`K95e5x-vuwCB6TM#x->?swYQkfigNjb^vA0wOb;hi!AS#*5 zcbN@dCkMdpV!;_2Vj>)5ENkJ8Fm%XlUo4+k@jT~Hi~iH1 z^C?5ep%o&Vs(_?Fb}vRi_#;eT(r-&nxD=T?Exq$-v*9S~iEEncXmgw3{T`$Tyj%Vk z$f2t4!gW|!RajP-7d$LBy_Kg*zYg`SRHKnReJWrjz6EgHU+}p++gVURn4$q-bgYK| zWYV#B#v|_E=0_E?pNAF~P#UaPv;LO61gce8I;vJxw9@A#PrwWsF5Swcn{6AoUraa; zJ~3moO|-j@KK8MI(gEU*LR3I+7DkA>%zqcq)zO@JKKeE_nnI;clBHskoavNwSVG46 z*3hIl4wio{DqyK{)7JQHZMcfnaIPA)%z_-WM`z*8HoC_>7O2M#)=`6mDQ~7RiDN#* zW|fKvX2pJ66eajxthNpV0glMO!CLvd9V5f0!3L;@fVW);_#xc{zD=6-%RcahAs)^jp zWYxxug3)YqIz8WZmriWzsSgdG=7Nms!LE97ov*=^!E+vXph4oumWD1fzf3zSW3E^a zhDYYft=~7!?VAjNz%L?l`i$AD(znz)f5SUvH z`V7Yb@#;aD8#jFu8WW&6ocbIk=4)(Oxf_+WMtKjhY{0x()n?i;k%k)Dh+^3__w3}F zYj@hR=$OwxFr<#`5@Q?2A1Reg)&e@5u?5YuZK8e5@mff;cn><8J%&Cz>*tYTKg)V( zNA1qBL9D7eYGargbU0;F$G1L#BQ+zT$3%1Yh+U1wfV_Ugi@)?}=T@~z8(pG9_Qfe| zM{Ons(l{=2(3my&!@*Yq{Y7bQTA&9%IkrbH$Y%;`*@)kaGIXKjN@(MNJPf0?S#%7c zsP&W$EQU~SHA*RFF*_hMi1R?V^byuLv=wO@165=c16iEdz>-P(7GhEH4q|fVHgpQT zFs0I(^lmkGR=pL9uPg9zW92yh7<0X+hNtZw50XDhD@%d`Ooq@e1l0d`Tmb<9vxgP( z#hrlOkPAi9^tkU7~=T5wo zv(5WJubj<%#s|Z}{4I{u!ts#|y-#`~%X^8DnUtWf*8QwTk4qXw?me31f6)oK*y52MFa#>8_nG zo|FUUNz~O^if!qu+1UYynX_9Pf4U*-V%advI?D~=98$ED%~yM)g4M#T*^m9utQ;ry zvhp{flSUBfy@@B2gs{Kn=8m3UFT^K_%szD#ZXm)Hr%41EwY&69w{0Ie9edoV4iR;E z@xrMf-SSHPJZDN47}GrDfpfQc|DK#%hAYxVVp1;|U0Ke|D4q(_<66xP z5kK4QpjIkH?)ac>%t0fu*J$tsTASSs+1Xb7!snIsbY#5D2VE9Hqwin3^B8C33VL7S zK@y51d(}33b!Der43r027x=09K*@edsGgmqm>!953JBCYY2;r0fv}cFdbUYn2s6Kr zWzP5}_#14=Oh}h03da&*kSE!${QPl9L9=kFCQd$~q=bg`sv!(*L29xX`)7{~ScD#U zI&;v3(H6Kdh7fj<6+dVJdL{Nx=Ah&#LKpFbW%C4OB-23F==krd;e@c-4W3Z{>?MWC z#XeP^UUCfv0>bzoy~NJJ&E8ei%+<)s_V3Kkl*GwT??4Tm9*Df)wEqqgC>&sz3Le67 z9+mfXfSMZi+gl`7XntJmIrOJ%Ab*X7K%5D$@aA(8af|`~;d(W3oWrtx^ZVuP9?lSF z8&~zZEs9xv?uYembZ9Lc8yXebrku>I$-(@s~)&oF2A8ED?Wko`<6 zG@38bHN7zwu`hT}W4w#+zPgtV>sFNTvtCD5@L&t#u`HZ4F=a+RHS%e>v*RnCZp0nL z@z*4c%%V@uYMLk3$WHb$h7X~R@=3RFC3zE#@}e`}*ozxmCw1UT2D9Fw5FTO<;0CV@ zmdBK<$}#JBlcZ#)f9^dn-8!80iW4>{iQz~enScji+}S8BENL~s4A!F7Fg!3L85bkTag?&5B9*b5#R z3VwaIx=B0*s2Lk&pN`NTdTKwPr(d1!Ht(L%ZnDLso)K0f^qa5Yq>UW$5y#D>L2aEa z!&0%h*nDu7uwk9Kn!4orkkRTwu(r@+rR=1nSjZH*I@=6BXr6_q)r?2fVD%oZY<70XU0MMT$*LwhnxX%11gf}>|R!$JX>y2 zvwC}8*=%sBy3EN|LOojRkg&U=I=eg&xUZW0sj&MRd+8^+Ivj>2z3d~x+nkiy;!uzdx@O;X|c%1JN9zd`B!*9ysWI*{EJWIBh zFiW!cn-q{#f?1YXm{~fB0*eHTBAt*b0ac28Hw028-l>E2_-ZTptfM71Dj4bYCIFNW z?2B}e!WWpmrK&P6rEoDkBsbNC&N7pNxM*%7YoUdLGJt(HSS&xtDQcXwCR^3+>b4M% zb1GjXwvz$mE~<4!7f4Rfyyi_R%zVKMa}9!F?9|jdOyDY1_G8E!_b0<~nRr>Boc1^} z&FTm%?SbqC0u-@`)Qf!-Hw$TUoLFi=&Y2W~%21)6Lb3>jbPk$%Kn222m15RbT8NEw zBFDTuhVcN7ye2AgzHF3ewnoRO`fXcnp!Sqw9(3QN1ll|xOcqSuon z29bh6I;;}vrz&IVE+v$LVtz-frdgtGR6cd5YLsq`=fjSws-Iw#L;b6;J<5C;RkgqG z91BQItYY^=6_!^`w4^O`>kCBrW-Zw$6U z3`k9{(xh4ODbXtH7QshAUDiox!mHLN@qm=!SCxm2VveCz5hD8lEz>lhLS|Z_P=Cbo z`9h{yrP8lu{1OcesH%H?=g2ZC$>rUq?#FM#q>1i-778-I$F@m`*nfogt6 ztClPKfFaY=tMV|a8elRl@R!b$v7a9Q0Q(m}Qz|pn0|fy=f&u}d_)mZ)V&rW4cQ{L0 zx1axvZ!BEuG6%Rm@hdN(q>&3myZ~7;8MGn_9Oi&ntyrHsF2!Eze8l~mSEV{Aky9_& zwPM8T1$q8i(~h}0U(UzVNA>Tsr}$iuI@tIhb)bmMdHw7(JXNe(R`qjB`Gx%=pb$sn zA+PF^d`}DYzMv_WZ4ax=5iz+cMmy)OMM zpyiJ2y%=lwZdR=dgsZmMJE~P4)6?v{ASa}X)x24f_bw|UG-Me zjy%^T-4|&~A&|iehnSP%hk*x(jB5?%td3_tlMnJy@TKo7CxKBvaYZ#MD-cO+AnoD@ z+{}Uw+9K|@9@b&^r4F=7or+TgnHHSx(hQpLClprk!~JAd$;>eiOn@`riId?*1edL9slz0YDSjN8AyLvP2|P~Y@q}>y5uOeWH9Q2s&>dJTSix8 zKK0jz_9SUQIYNqRrZu%(iFbI$6O-y4A$-m1>%VxYocw^E?PstB@)>OL{YMYAwKB7J zRW>s>b2hU#G5a5Jd9kvAOrIj^$0iqtp0>6118P^fkPkF5jL)~A9vEid+&k-*M~Y^w z`)bsvyl{R&0&4CKdf28^@3y0j{;TcP&9~t*obP_NSc*!c#Gw^&@OYVU6&FujBISNI ze3~UDULp-B5PdlKOqRoaC`te#wMq}@wWOJ*=IiIdk&Bz1wNtL7^L5~S6DZO)ARl`( zB4M}A?ybg30GazpC`T}j1< zhyuZ_WxGh5xR)Ir0Uqnot6aw;`w3w~j@QF0aG_U(sa-nu z5-a&oswYBN$(mW*Dc-jQEHWGb>cR~B&hK(%N`^D#qed_^u7@Qc6<$=yL)OClM2*5~ z4(I$LRxuW?B5^F>lhTo=s6fd9J#Fn7f}lR(BnryCHqw`3sVGXaee)zyfE2llP}Bg` z``3cWAj<~Avm}*2;QtIXU~-IZqn~E9{EVJh{*xIMoIj6A{SV`%DC^mv2%+);WwQUmH+qf)o7y@`v(f!qkeb+-|IA zBAe$a%jeR_|NYMm$|rS@U9n#eQEh`|{hb?s;YP6s?}QS&2sHjx2zz|zj&kDGH3=eL zmB5XkALzu5K+@(go&(LQmL;F`%S@9J?*MciWAE`#4f%#&4T|153>-HsTPKW<2c@E4 zFI3<`w|pN5AgwhJTWq57%_^@Tf2^@Bb=3Ms$OY2NDK*#@*Sr?+WQATSTnasWjnHrW z)78FmUT=nnK|sU}J#%|v!MLF-KySOP>Zt0f+BZ%_zrb*7V@OBmQ5xq;-NJ5_OF1_= z9+KU+wd}1GQekH_rK(u5pO_>CcPw~T2@@4mzLaNxJisp2psi2L9jE@wGa@$*H zm&w*{+r}HhtdDPyw8IO;SsWu06)mGq;rqte zeXA|&E{8H-E;0|hA6C%sRzgygj$j-z*EQKei|X6yjbW2D-{za)T1wPPlQxu*Cy&-U zzgeh{oVE$u?@f6LXK4}H3{-tcL^utw>Nli4{0prSCxZZL>2nIQ`aDri{hvHT(a6j0 zbA79J?u^`kOFZvi&;hg|JK z&5D}*f))5qFy=W`oK)3O%(%VbBjK){zWqe_A<&0l8esc8D@UgZa~ z;Z6EgPsSoU`J0Y-wGT^NZlJ>r*&18r1gzD-GapbLsOD|fi*XZ*ukX=4?y_ea@Cy7H zavuX$X+DwV>!6``JuTUcu3g@l<`?FZ92K;{hSP_haveH>*60lxHS|&Vm)^+v8q=*R zS44p(_*s;gL3dFR69 zYgYr=H|3ea&Q_iHTAFA=mby|q>eV<y>!}!hGM(?QCbZ4_Z%+?*Z_-WX)tYs=`r!P!Uysj#B4MzzRQ*l+ z@(26!Xb19QRsX`dkWFFY)jms-iO$l{gkZ{Qh8f(e z&`GhuvXnwOJLNE>I8f;&S?S>4@X;}H23a5?(4o@Rf+lv`U__&Xlc`FRK>F-=`^=(_ z!AA#$Dx|-G-BBm#;+jS}15pH5YIIwpLM6{w2JamSVhIwDVyGwAHS_dw$YSvqC=b>u zWM|L5R0;J%df5ZKJH-wIgxH!#d3k=^UZxzn9h{70`x^V`%EcW4QYh>b$Q5MM3P;4W zrhmi!Gj1{sKR79U;%3U{2>Cagvvz+wQUABm@jsC>QBMX`2s3oLsxq^(T+6BjDHNL( zd=qW!t1uxN>Q?-jxyc(+ht1AUYRVw`*Dvp7$JtKnd4%VO@4vDv5GMXQ>yg-^CHA+& zqu`*k)3IX8N{E_-We1|XZluR=P$F0)?m0VA?A_2k_1B->;77(`RYhjrH~P0M>W>*c zTAGw0nC|3E`XU=dCQ78f61s+PpeCyNc(Vda#CCsk*@jP=-{Fq&O&noVoc&d6 z=~GRX)D#XEih?y#G;U~Mtz}RFH@W>BT;7Udwy#847)B2EVZk4kA?&CCj^fXs(JtSY zVAB-7Qi8~I;(!S^SV|?)5QXX;|U9KrF9$i{>9QMnD8hk}wMn*>w zdvbfj2i#*?o1Gt>RXi~(dPQl%70unRCIPQF>`VG{O^SSVW#Y)>CY3v--dqD6^FvWXkJfG z;uspE^veZ9p^!i;p};*ASG7v&%%h`h!yv~-LJ{ZNYEeeY3dFSUwWGCZ2Xm5aW9~7BJryVJNsE|WA-FrQ%A;-$o9bT zASnj3wwD0fE+sO09*Kq^I(Glf_Oc=6`-%bLP#=PmphLwR4h!Y1?wIP>XxJ3*CT&!V zaq|l#d#PxkP$@bF%Sv8Don@Y843t@Ydc<^@PJS5&qCq~Zg-jb#s>?z~yu<>!-Dm{m z_z?PiZeFAKEvQ+uu(B)}Rbf)ZI&>sDU_wK1tf>4q=q!+M4cU}uDQ)|oE$NLx1pM)7 zN$}4oh2}raMapI_jt=%NW`9qK0Mmb2@*VmaD8m#!EI(IM2=K2yz*dGh5ZP##nL^R* z)SI+i>MwuMh$KL}<&aDNMwY(GH?(w9cp*bH$${(N;{}X5hW7>lFG|7Y{$D3o0uE*O zzNsW+DH+C|tb;6r>{}sZ-$RUj9cy81F_vtF!AI6Hwo&#yOCiaUktIvC5tXfcWlQ7=N5xK4!IeVJ};_8MS8T(GUH*;jrO;09~nw* z%?49rHiAXo#Vrc0bQc9MerW6lqcJMgH*?Q-y+<(>qJ-~o)M*G+pO4tKC~Y^B%y;ne zH>9D_^5I<-ZMSgjJp9ZMF|;{Qpl@)-xu?2b1$CXf{JdFmJHLHZ8_2Q6wq`tR#1$hO z`WfvU6m)f^v$K}kBvZNw*mie8gTcWHur;her+57_>@{QS-GfD+_3ry>&dAMJ#yW9N z0Hq^mft%<@GL=l^Ag9E#i~{)8+X?_{fYxwP4JftfgzaOY`B^Cu^fwTdYaEdf5f}ALg^%=Y!Xx9bQt>G!Sjtk)YF*(r&YB zUP*KT+Ntc^_qaMjk%%dp>!bbg*6Ry>u+G6wV1H~C%;`VfdV|Y0TK3+yPLMrUBo$$< zgY`|jF>Ccp^(QV)hWjhEq=lb2(Smep;<_2D8ZYmZ-*@F;oIAZ=1LwvIIQP~Ic*qHL zF>d({;%(gr;668WjpOm)&D@N)+dDoX;AyM7q1%V9nwgH~QI{989~{f*2RF6PawAB% z8`7s7^lhsj+Nnp{(;1(5$arVC1Q^vcGck~DPqO;SJ=ml|;?tVLoOxduvQf4}HPvp%ms6uq^_k9@<(k_MANxjOrPBC$Lks zZ0a^ZZ~H9mHAolDbmf-I;!Eh*vSgImsGmT?hw90WN{7p>HC`Csc)`}CljF)#@iJc( zh_N;2=Eut`by`?cCt^qkaHz!UdCOe)(IwU z@ah#0nW&rZ=~14{;y#tc+Ie)IS&@jTAPPUV%F@&r4;pmP+ez_Ispz5>Ha+R_2dBob ziBuuFUl^7kDrh!2eDyhGq$nL51H$~0-^)zUGXj+`k8@OyPvd?MJC!mpe-aTxh%{gb8KQFWY#T&xmj^$X9HnsAP) z+yrsyUmmRCN0KuF^U<|5qpVS_X}XjjDm6J%x%FF5q8*$;S_QDU96#J(AlRToKI{gB zjnlAG*6n(MMw}s=dTF1S(ZzzTh#U;=6#lmPcLeorq$!y(<5+hJgROa!-hZZlQySWJ zs`Tx>F5CO~8tm#1?LPCf4Fj>Wo@U3Lk9B0`3r$kA$0P?cd)|S3Q$2R07aO7r$(5ev-MW*Uvo|VJFC# zq`{u>^$^rrF%u5RVm#^`INovoKwTrc%Zc)VKs=9b@sjjZwdd0gmMHE^di)(GL$5*a z|7NmpAI!3Ry)gBm(aP5wloH~VjBMjn_KW-sqTTSYPlB*79Omkt=Dj9N4np!XQ_=}m zNI_}H=X;Qz2PDBC$_bV=a6vK}!LE59FmlXStBP*Hv9k=UN3J5GuL1G{h?9l; z^lDG|mmt)394|32u6y*=bbwBZ)}{*rCI7~(No&t0!_q$Mh-{0+sURKJDoVC})Xbd$ zH<}6)LRa2CrRhB$a7}zYe=}dlUR0JNzJ6Bk+6ce&U#Vxm6k2e2l|UNL?cC(vqU&;c zY{-ysxV6ERqzExj;exJ6;}=!t}jeEugU7pr8;R`|IzQ0}yt_U9Wl z&@r=$Y|2bG#Okf1nXIOq6`iVVNFKCytTChQo9;u0kKT$q@l@${pt|iWx~R>9J3(?$ zv{hM$xoY{eg*aoUIIKL=WBD@)eq}t06>cMwAitV|b&683bA}o>Ujl4=PJ4QLc-njW zI@|l$>-A}O3e(7*(fz$=#b8|d(Nw;IHhDuQPWM8tl zj7&2a`uv>U#vMS0UH#CJ3*43du|YSCB-ETq9F2K_qvjDl{!h)G^XvVcr5-2)2e7bD zqfQCpI*;$GRt zdk9?iq)PtfNpO^%d8LU0=u*sq6?KxYCQl)uMCZZ;YXXRT)Dc%ND3``Y z3m1HBkbDr5r<-z+TM69RAE63OEzf)%KWBNSP}7$2#si>t6RVW;{VUO*+^en1{dzH~ zosbHI_EvHBI2;RJs9C|lytZMVy`^nD& zeYhL=O`y*ma>f38{WwB3Kb#I5!O2)nywkr{ydyNmNh1Bh*Z|`0>1L0sCjMXC_M0Ny z5h5_m(%}44U|0;+5jQxts}uAe!91}&^>=q`H8Jy;lAsCE4*N|UBRDJV& zeeQwpyxEf>QksY>DUZU=8#$g~tEi#%R-{^MncGCnq1I+*P6fzbfvJ&_Mo&B+V{`DY zEaan~)NLoyaSkbG`5SIG;>mZ#GtF(tf2h#0Nc#qRtI77p+2q+W0pun{iYj#^?c4-8 z#(7j@ZTfSybv2ipR~*L#|KR|MBUu2WD3cUmfn)6wW8<3*qfVuC+02Jo%V&i>9=ANI ziH&qlv}J+d&=!Z>(Xo}*oB@YC!;Fvd5=**>m{jI6Q1cj1WLv8Uj)ZQx+%`6?|g|3bm3~A zSB16%#IBTN)XZD1k1{kIEju!=;xQ*#*2vaavl>ESD$_`%(_l3pv1Z%93JrYbZyPZ7 zaolUnaFFq$FSCVzJzL-@U`bu}!hEnKpo@Mw!u&vb()BZW`k}J{DG13MJ?LpNe!p-V zZk4WuOHCIjEm{QrvTwFAud)ALpVq%~6x# zQC6yWNsV5Q1svI(DJ{oKy%*oX3hAu|3<^FnPiVN@~-=3^%VBx)16-YY#JhOy?5Q2{>? zzg6asqGpSOrYh)(pUyQF=}#vcLw`vr>fsVw6(MT_kkJ>i9M7X=W>8m4Am%!5CN;#W z<%^-@bbhB*a;aYcHU1p4Hcbzq95qFv?0m(2&|eUjdiXO0P)zOtL4F^xS+5Q^8wY3* z)e0}-0@bnG!|4pX^x^ecmPaN9#Kt1|F*<|l_8+Y|o|t{`2tM|jYDyO@6!P`>vj?+j zF1$@!Jf}FtV1SXAWaG!J+#oh>$o%DFeh?Icc6@&fhip|*0}0(7a@ruhF>)7|0+>)` z@x?KQ(=2yQon6frSr~embQvlLCX4=?o`$> z4Py*Rtsy9nb=mz|jj zw~JD^eSy9^tglO^#OZmuaFz|!>CMK59Wm4*43qYv1_;oqLViRg(a9xc4aFI_+V|v6 zy3;+{_HR)&a2=kyNNdDAqAk+OT|ntd?tXbKOmr%bCk+BMh1Mqo*0|jx)}I}B%d6W^6#B}PKY3AM*1L(m%=xAK=F?YFc4c36HHiQDNa27ue?aY#r z_WmHY--JuC%jLhtyZ&3ey=^_e!^61(yA9XBf&KCJD#?EbhLeWHgHd4p%6+cbKVj|P zjPu8SsqPQ;?RD-O*srBy_j*hD>8 zu0SP3C#-A4qc33Plz)rVA&(e494=g{XX9$4_!~J;R2daMn{werRh)oz^#A8=#?2G+vecC_V z_&v|B0yB7?7g|`JAHy_wRP!JK38RP!@KRyn9^8f$< diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.md5 b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.md5 deleted file mode 100644 index fdd9e12..0000000 --- a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.md5 +++ /dev/null @@ -1 +0,0 @@ -357550535baa72ef8690f00ac964b540 \ No newline at end of file diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.sha1 b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.sha1 deleted file mode 100644 index 8993502..0000000 --- a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -84cbd36a63f6b0566e516a38fd48329bf20bc569 \ No newline at end of file diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.pom b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.pom deleted file mode 100644 index 5e12b1c..0000000 --- a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/SampleApiClient-0.0.5.pom +++ /dev/null @@ -1,152 +0,0 @@ - - 4.0.0 - com.cybersource - SampleApiClient - 0.0.5 - - - - org.apache.logging.log4j - log4j - 2.13.3 - pom - - - org.apache.logging.log4j - log4j-api - 2.13.3 - - - org.apache.logging.log4j - log4j-core - 2.13.3 - - - org.slf4j - slf4j-api - 1.6.4 - - - com.google.code.gson - gson - 2.2.4 - - - junit - junit - 4.8.1 - test - - - org.mockito - mockito-core - 2.18.3 - test - - - com.cybersource - AuthenticationSdk - 0.0.17 - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.7.0 - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - false - 1 - true - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.4.0.905 - - - - - - - - src/main - src/test - - **/*Suite.class - - jacoco - reuseReports - ${project.basedir}/../target/jacoco.exec - java - - **/AggregatorInformation.java,**/AmountDetails.java,**/BillTo.java,**/Card.java, - **/ClientReferenceInformation.java,**/OrderInformation.java,**/Payment.java,**/PaymentInformation.java, - **/ProcessingInformation.java,**/SubMerchant.java - - - - - sonar-coverage - - true - - - - - - org.jacoco - jacoco-maven-plugin - 0.7.8 - - - - - - org.jacoco - jacoco-maven-plugin - - true - - - - agent-for-ut - - prepare-agent - - - - agent-for-it - - prepare-agent-integration - - - - jacoco-site - verify - - report - - - - - - - - - - diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/_remote.repositories b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/_remote.repositories deleted file mode 100644 index c5f7f1f..0000000 --- a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/0.0.5/_remote.repositories +++ /dev/null @@ -1,4 +0,0 @@ -#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice. -#Fri Oct 29 15:35:40 GMT+05:30 2021 -SampleApiClient-0.0.5.jar>= -SampleApiClient-0.0.5.pom>= diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml deleted file mode 100644 index f7a159e..0000000 --- a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - com.cybersource - SampleApiClient - - 0.0.5 - - 0.0.5 - - 20211029100540 - - diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.md5 b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.md5 deleted file mode 100644 index c6f8faa..0000000 --- a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.md5 +++ /dev/null @@ -1 +0,0 @@ -ca7285117c99fbb79aad45f38d48dad1 \ No newline at end of file diff --git a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.sha1 b/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.sha1 deleted file mode 100644 index 25d34a8..0000000 --- a/src/main/java/samples/authentication/lib/com/cybersource/SampleApiClient/maven-metadata.xml.sha1 +++ /dev/null @@ -1 +0,0 @@ -ecfd00a0fa5e0e2fce0e668c6a03728392161aa5 \ No newline at end of file diff --git a/src/main/java/samples/core/SampleCodeRunner.java b/src/main/java/samples/core/SampleCodeRunner.java deleted file mode 100644 index 097c910..0000000 --- a/src/main/java/samples/core/SampleCodeRunner.java +++ /dev/null @@ -1,123 +0,0 @@ -package samples.core; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; -import com.google.common.reflect.ClassPath; - -public class SampleCodeRunner { - - public static String timeoutVoidTransactionId; - public static String timeoutReversalTransactionId; - - public static void main(String[] args) throws ClassNotFoundException, IOException, - NoSuchMethodException, SecurityException, - IllegalAccessException, IllegalArgumentException, - InvocationTargetException, InterruptedException { - int sampleCount = 1; - - Set files = new HashSet<>(); - - getListOfPackages("src/main/java/", files); - - for(String pkg : files) { - Class[] classList = getClasses(pkg); - - if (classList.length > 0) { - for(Class sampleClass : classList) { - // IGNORE LIST PART 1 : Classes inside Data, lib and SampleCodeRunner packages are not tested. - if (sampleClass.getName().contains("Configuration") - || sampleClass.getName().contains("lib") - || sampleClass.getName().contains("SampleCodeRunner") - || sampleClass.getName().contains("Webhooks") - || sampleClass.getName().contains("CsvUploadApp")) { - System.out.println("\n#### SKIPPED - " + sampleClass.getName() + " ####"); - continue; - } - - Method sample; - try { - sample = sampleClass.getDeclaredMethod("main", String[].class); - } catch (Exception e) { - // IGNORE LIST PART 2 : Classes without a main() method are not runnable. - System.out.println("\n#### SKIPPED - " + sampleClass.getName() + " ####"); - continue; - } - - final Object[] methodArgs = new Object[1]; - methodArgs[0] = new String[] {}; - - try { - System.out.println("\n" + sampleCount + ". **** RUNNING - " + sampleClass.getName() + " ****"); - sampleCount++; - - sample.invoke(null, methodArgs); - - //Thread.sleep(3000); - - System.out.println("\n\n**** ENDING - " + sampleClass.getName() + " ****"); - } - catch (Exception e) { - System.out.println("\n\n**** ENDING - " + sampleClass.getName() + " ****"); - continue; - } - } - } - } - - System.out.println("\n\nTotal number of sample codes : " + sampleCount); - } - - /** - * Recursively extract the names of all packages from the given path - * - * @param directoryName Path in which to extract packages - * @param pack List of all packages - */ - public static void getListOfPackages(String directoryName, Set pack) { - File directory = new File(directoryName); - - // get all the files from a directory - File[] fList = directory.listFiles(); - for (File file : fList) { - if (file.isFile()) { - String path = file.getPath(); - boolean pathSeparator = path.contains("\\"); - if (pathSeparator) { - String packName = path.substring(path.indexOf("src") + 4, path.lastIndexOf('\\')).replace("main\\java\\", ""); - pack.add(packName.replace('\\', '.')); - } else { - String packName = path.substring(path.indexOf("src") + 4, path.lastIndexOf('/')).replace("main/java/", ""); - pack.add(packName.replace('/', '.')); - } - } else if (file.isDirectory()) { - getListOfPackages(file.getAbsolutePath(), pack); - } - } - } - - /** - * Scans all classes accessible from the context class loader which belong to the given package and subpackages. - * - * @param packageName The base package - * @return The classes - * @throws ClassNotFoundException - * @throws IOException - */ - private static Class[] getClasses(String packageName) throws ClassNotFoundException, IOException { - ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); - assert classLoader != null; - - ArrayList> classes = new ArrayList>(); - ClassPath cp = ClassPath.from(Thread.currentThread().getContextClassLoader()); - for(ClassPath.ClassInfo info : cp.getTopLevelClassesRecursive(packageName)) { - classes.add(info.load()); - } - - return classes.toArray(new Class[classes.size()]); - } -} diff --git a/src/main/java/samples/merchantmanagementservice/MMSStandaloneHttpSignature.java b/src/main/java/samples/merchantmanagementservice/MMSStandaloneHttpSignature.java deleted file mode 100644 index 5d5c560..0000000 --- a/src/main/java/samples/merchantmanagementservice/MMSStandaloneHttpSignature.java +++ /dev/null @@ -1,423 +0,0 @@ -package samples.merchantmanagementservice; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Base64; -import java.util.UUID; - -/** - * Created by shashank929 on 11/4/19. - */ -public class MMSStandaloneHttpSignature { - /* Try with your own credentaials - * Get Key ID, Secret Key and Merchant Id from EBC portal - */ - public String merchantKeyId = "cc085277-1e0e-4cd4-bb3a-fd63b0511c31"; - public String merchantsecretKey = "4EU+9YgmAxlqKYSrNi/p1zz7MYyuDcmdLRNpZa9XkcA="; - public String merchantId = "testmmsv2auth"; - - /* Sandbox Host: apitest.cybersource.com - * Production Host: api.cybersource.com - */ - public static String requestHost = "apitest.cybersource.com"; - - private final String USER_AGENT = "Mozilla/5.0"; - - public static String gmtDateTime = "DATE_PLACEHOLDER"; - public static String postRequestTarget = "REQUEST_TARGET_PALCEHOLDER"; - public static String APINAME = "APINAME_PLACEHOLDER"; - public static String resource = "resource_PLACEHOLDER"; - - public static String payload = null; - - public static void main(String[] args) throws Exception { - /* This Example illustrate two tests - HTTP GET and POST method with Cybersource MMS Boarding API. - * Each test will caluate HTTP Signature Digest and Authenticate Cybersource MMS API using HTTP Client - */ - MMSStandaloneHttpSignature http = new MMSStandaloneHttpSignature(); - - // POST Example for MMS Boarding API - postRequestTarget = "post /merchant-mgmt/v3/merchant-batch-jobs"; - APINAME = "mms"; - resource = "/merchant-mgmt/v3/merchant-batch-jobs"; - - String boardingRequestId = UUID.randomUUID().toString(); - String mid = "testmmsv2auth_sdkmid_" + boardingRequestId.substring(0,7); - payload = "\n" + - "\n" + - " testmmsv2auth\n" + - " "+ boardingRequestId +"\n" + - " \n" + - " \n" + - " "+mid+"\n" + - " \n" + - " \n" + - " Visa\n" + - " \n" + - " 900\n" + - " Metro Center Blvd\n" + - " Foster City\n" + - " CA\n" + - " 94404\n" + - " USA\n" + - " \n" + - " test@visa.com\n" + - " 5107897418\n" + - " Pacific/Pago_Pago\n" + - " http://www.cybersource.com\n" + - " \n" + - " \n" + - " Shashank\n" + - " Wankhede\n" + - " test@visa.com\n" + - " 4153697852\n" + - " \n" + - " \n" + - " Shashank\n" + - " Wankhede\n" + - " test@visa.com\n" + - " 4153697852\n" + - " \n" + - " \n" + - " Shashank\n" + - " Wankhede\n" + - " test@visa.com\n" + - " 4153697852\n" + - " \n" + - " true\n" + - " EXTERNAL\n" + - " \n" + - ""; - - System.out.println("\n\nSample 1: POST call - CyberSource MMS API - HTTP POST Boarding request"); - System.out.println("\n Merchant " + mid + " being boarded with boardingRequestId " + boardingRequestId + "\n"); - http.sendPost("https://" + requestHost + resource, boardingRequestId); - - // GET Example for MMS API get file result - // pass requestId received from the post call to get that file's result - resource = "/merchant-mgmt/v3/merchant-batch-jobs/eacc383a-0498-4481-8f2f-b85896772cb0"; - - System.out.println("\n\nSample 2: GET call - CyberSource MMS API - HTTP GET File result request"); - http.sendGet("https://" + requestHost + resource, boardingRequestId); - } - - // HTTP GET request - private void sendGet(String url, String corrId) throws Exception { - /* HTTP connection */ - URL obj = new URL(url); - HttpURLConnection con = (HttpURLConnection) obj.openConnection(); - - /* Add Request Header - * "v-c-merchant-id" set value to Cybersource Merchant ID or v-c-merchant-id - * This ID can be found on EBC portal - */ - con.setRequestProperty("v-c-merchant-id", merchantId); - con.setRequestProperty("v-c-correlation-id", corrId); - - /* Add Request Header - * "Date" The date and time that the message was originated from. - * "HTTP-date" format as defined by RFC7231. - */ - gmtDateTime = getdate(); - - con.setRequestProperty("date", gmtDateTime); - con.setRequestProperty("Content-Type", "application/xml"); - con.setRequestProperty("Accept", "application/xml"); - /* Add Request Header - * "Host" Host to send the request to. - */ - con.setRequestProperty("Host", requestHost); - - /* Add Request Header - * "Signature" Contains keyId, algorithm, headers and signature as paramters - * Check getSignatureHeader() method for more details - */ - StringBuilder signatureHeaderValue = getSignatureHeader("GET"); - - con.setRequestProperty("Signature", signatureHeaderValue.toString()); - - /* HTTP Method GET */ - con.setRequestMethod("GET"); - - /* Establishing HTTP connection*/ - int responseCode = con.getResponseCode(); - String responseHeader = con.getHeaderField("v-c-correlation-id"); - - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/xml"); - System.out.println("\tAccept : " + "application/xml"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tDate : " + gmtDateTime); - System.out.println("\tHost : " + requestHost); - System.out.println("\tSignature : " + signatureHeaderValue); - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - /* Reading Response Message */ - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - /* print Response */ - System.out.println("\tResponse Payload :\n" + response.toString()); - } - - // HTTP POST request - private void sendPost(String url, String corrId) throws Exception { - /* HTTP connection */ - URL obj = new URL(url); - HttpURLConnection con = (HttpURLConnection) obj.openConnection(); - - /* Add Request Header - * "v-c-merchant-id" set value to Cybersource Merchant ID or v-c-merchant-id - * This ID can be found on EBC portal - */ - con.setRequestProperty("v-c-merchant-id", merchantId); - con.setRequestProperty("v-c-correlation-id", corrId); - - /* Add Request Header - * "Date" The date and time that the message was originated from. - * "HTTP-date" format as defined by RFC7231. - */ - gmtDateTime = getdate(); - - con.setRequestProperty("date", gmtDateTime); - - /* Add Request Header - * "Host" Name of the host to send the request to. - */ - con.setRequestProperty("Host", requestHost); - - /* Add Request Header - * "Digest" SHA-256 hash of payload that is BASE64 encoded - */ - con.setRequestProperty("Digest", getDigest()); - - /* Add Request Header - * "Signature" Contains keyId, algorithm, headers and signature as paramters - * Check getSignatureHeader() method for more details - */ - StringBuilder signatureHeaderValue = getSignatureHeader("POST"); - - con.setRequestProperty("Signature", signatureHeaderValue.toString()); - - /* HTTP Method POST */ - con.setRequestMethod("POST"); - - /* Additional Request Headers */ - con.setRequestProperty("User-Agent", USER_AGENT); - con.setRequestProperty("Content-Type", "application/xml"); - - // Send POST request - con.setDoOutput(true); - con.setDoInput(true); - - DataOutputStream wr = new DataOutputStream(con.getOutputStream()); - wr.write(getPayload().getBytes("UTF-8")); - wr.flush(); - wr.close(); - - /* Establishing HTTP connection*/ - int responseCode = con.getResponseCode(); - - String responseHeader = con.getHeaderField("v-c-correlation-id"); - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/xml"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tDate : " + gmtDateTime); - System.out.println("\tHost : " + requestHost); - System.out.println("\tDigest : " + getDigest()); - System.out.println("\tSignature : " + signatureHeaderValue); - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - try { - /* Reading Response Message */ - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - /* print Response */ - System.out.println("\tResponse Payload :\n" + response.toString()); - } catch (Exception exception) { - // Output unexpected IOExceptions - BufferedReader in = new BufferedReader(new InputStreamReader(con.getErrorStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - /* print Response */ - System.out.println("Response Payload : " + response.toString()); - System.out.println(exception); - } - } - - private String getdate() { - /* This Method returns Date in GMT format as defined by RFC7231. */ - return(DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneId.of("GMT")))); - } - - private StringBuilder getSignatureHeader(String httpMethod) throws Exception { - /* This method return SignatureHeader Value that contains following paramters - * keyid -- Merchant ID obtained from EBC portal - * algorithm -- Should have value as "HmacSHA256" - * headers -- List of all header name passed in the Signature paramter below - * String getHeaders = "host date request-target" + " " + "v-c-merchant-id"; - * String postHeaders = "host date request-target digest v-c-merchant-id"; - * Note: Digest is not passed for GET calls - * signature -- Signature header has paramter called signature - * Paramter 'Signature' must contain all the paramters mentioned in header above in given order - */ - StringBuilder signatureHeaderValue = new StringBuilder(); - - /* KeyId is the key obtained from EBC */ - signatureHeaderValue.append("keyid=\"" + merchantKeyId + "\""); - - /* Algorithm should be always HmacSHA256 for http signature */ - signatureHeaderValue.append(", algorithm=\"HmacSHA256\""); - - /* Headers - list is choosen based on HTTP method. Digest is not required for GET Method */ - String getHeaders = "host date request-target" + " " + "v-c-merchant-id"; - String postHeaders = "host date request-target digest v-c-merchant-id"; - - if(httpMethod.equalsIgnoreCase("GET")) - signatureHeaderValue.append(", headers=\"" + getHeaders + "\""); - else if(httpMethod.equalsIgnoreCase("POST")) - signatureHeaderValue.append(", headers=\"" + postHeaders + "\""); - - /* Get Value for paramter 'Signature' to be passed to Signature Header */ - String signatureValue = getSignatureParam(httpMethod); - signatureHeaderValue.append(", signature=\"" + signatureValue + "\""); - - return signatureHeaderValue; - } - - private String getSignatureParam(String httpMethod) throws Exception{ - /* This method returns value for paramter Signature which is then passed to Signature header - * paramter 'Signature' is calucated based on below key values and then signed with SECRET KEY - - * host: Sandbox (apitest.cybersource.com) or Production (api.cybersource.com) hostname - * date: "HTTP-date" format as defined by RFC7231. - * request-target: Should be in format of httpMethod: path - * Example: "post /merchant-mgmt/v3/merchant-batch-jobs" - * Digest: Only needed for POST calls. - * digestString = BASE64( HMAC-SHA256 ( Payload )); - * Digest: SHA-256= digestString; - * v-c-merchant-id: set value to Cybersource Merchant ID - * This ID can be found on EBC portal - */ - StringBuilder signatureString = new StringBuilder(); - signatureString.append('\n'); - signatureString.append("host"); - signatureString.append(": "); - signatureString.append(requestHost); - signatureString.append('\n'); - signatureString.append("date"); - signatureString.append(": "); - signatureString.append(gmtDateTime); - signatureString.append('\n'); - signatureString.append("request-target"); - signatureString.append(": "); - - String getRequestTarget = "get " + resource; - - if(httpMethod.equalsIgnoreCase("GET")) - signatureString.append(getRequestTarget); - else if(httpMethod.equalsIgnoreCase("POST")) - signatureString.append(postRequestTarget); - - signatureString.append('\n'); - - if(httpMethod.equalsIgnoreCase("POST")) { - signatureString.append("digest"); - signatureString.append(": "); - signatureString.append(getDigest()); - signatureString.append('\n'); - } - - signatureString.append("v-c-merchant-id"); - signatureString.append(": "); - signatureString.append(merchantId); - signatureString.delete(0, 1); - - String signatureStr = signatureString.toString(); - - /* Signature string generated from above parameters is Signed with SecretKey hased with SHA256 and base64 encoded. - * Secret Key is Base64 decoded before signing - */ - SecretKeySpec secretKey = new SecretKeySpec(Base64.getDecoder().decode(merchantsecretKey), "HmacSHA256"); - Mac aKeyId = Mac.getInstance("HmacSHA256"); - aKeyId.init(secretKey); - aKeyId.update(signatureStr.getBytes()); - byte[] aHeaders = aKeyId.doFinal(); - String base64EncodedSignature = Base64.getEncoder().encodeToString(aHeaders); - - return base64EncodedSignature; - } - - private String getDigest() throws NoSuchAlgorithmException, IOException { - /* This method return Digest value which is SHA-256 hash of payload that is BASE64 encoded */ - String messageBody = getPayload(); - - MessageDigest digestString = MessageDigest.getInstance("SHA-256"); - - byte[] digestBytes = digestString.digest(messageBody.getBytes("UTF-8")); - - String bluePrint = Base64.getEncoder().encodeToString(digestBytes); - bluePrint = "SHA-256="+ bluePrint; - - return bluePrint; - } - - private String getPayload() throws IOException { - String messageBody = payload; - return messageBody; - } -} diff --git a/src/main/java/samples/merchantmanagementservice/MMSStandaloneJwt.java b/src/main/java/samples/merchantmanagementservice/MMSStandaloneJwt.java deleted file mode 100644 index c832751..0000000 --- a/src/main/java/samples/merchantmanagementservice/MMSStandaloneJwt.java +++ /dev/null @@ -1,451 +0,0 @@ -package samples.merchantmanagementservice; - -import org.bouncycastle.jce.provider.BouncyCastleProvider; - -import com.nimbusds.jose.JOSEException; -import com.nimbusds.jose.JOSEObject; -import com.nimbusds.jose.JWSAlgorithm; -import com.nimbusds.jose.JWSHeader; -import com.nimbusds.jose.JWSObject; -import com.nimbusds.jose.Payload; -import com.nimbusds.jose.crypto.RSASSASigner; -import java.io.*; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.KeyStore; -import java.security.KeyStore.PrivateKeyEntry; -import java.security.cert.CertificateEncodingException; -import java.security.cert.X509Certificate; -import java.security.MessageDigest; -import java.security.PrivateKey; -import java.security.interfaces.RSAPrivateKey; -import java.security.KeyStore.PasswordProtection; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; - - -/** - * Created by shashank929 on 11/4/19. - */ -public class MMSStandaloneJwt { - private static String merchantId = "testmmsv2auth"; - private static String requestHost = "apitest.cybersource.com"; - - /* - * This is standalone code that show cases how to generate headers for CyberSource REST API - POST and GET calls. - * This sample code has sample Merchant credentails (testmmsv2auth) with .p12(At same dir level) that you can also use for testing. - * CyberSource Business Center - https://ebc2test.cybersource.com/ebc2/ - * Instructions on generating your own .P12 from CyberSource Business Center - https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/authentication/createCertSharedKey.html - * Also, To understand details about CyberSource JWT headers, please check Authentication guide - https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/authentication/GenerateHeader/jwtTokenAuthentication.html - * This sample app demonstrates calling the CyberSource MMS REST API to create a new merchant under a portfolio/reseller - * including building the JWT token for API authentication - * - */ - public static void main(String[] args) throws Exception { - try { - String boardingRequestId = UUID.randomUUID().toString(); - String mid = "testmmsv2auth_sdkmid_" + boardingRequestId.substring(0, 7); - String request = "\n" + - "\n" + - " testmmsv2auth\n" + - " " + boardingRequestId + "\n" + - " \n" + - " \n" + - " " + mid + "\n" + - " \n" + - " \n" + - " Visa\n" + - " \n" + - " 900\n" + - " Metro Center Blvd\n" + - " Foster City\n" + - " CA\n" + - " 94404\n" + - " USA\n" + - " \n" + - " test@visa.com\n" + - " 5107897418\n" + - " Pacific/Pago_Pago\n" + - " http://www.cybersource.com\n" + - " \n" + - " \n" + - " Shashank\n" + - " Wankhede\n" + - " test@visa.com\n" + - " 4153697852\n" + - " \n" + - " \n" + - " Shashank\n" + - " Wankhede\n" + - " test@visa.com\n" + - " 4153697852\n" + - " \n" + - " \n" + - " Shashank\n" + - " Wankhede\n" + - " test@visa.com\n" + - " 4153697852\n" + - " \n" + - " true\n" + - " EXTERNAL\n" + - " \n" + - ""; - - //HTTP POST request - System.out.println("\n\nSample 1: POST call - CyberSource MMS API - HTTP POST Boarding request"); - System.out.println("\n Merchant " + mid + " being boarded with boardingRequestId " + boardingRequestId + "\n"); - int postStatusCode = postCall(request); - if (postStatusCode != 0) { - System.out.println("STATUS : ERROR (HTTP Status = " + postStatusCode + ")"); - } else { - System.out.println("STATUS : SUCCESS (HTTP Status = " + postStatusCode + ")"); - } - - // HTTP GET request - System.out.println("\n\nSample 2: GET call - CyberSource MMS API - HTTP GET File result request"); - //pass requestId received from the post call to get that file's result - int getStatusCode = getCall(request, "772aab5e-efe7-49ed-a6f3-8252052c9f1c"); - - if (getStatusCode != 0) { - System.out.println("STATUS : ERROR (HTTP Status = " + getStatusCode + ")"); - } else { - System.out.println("STATUS : SUCCESS (HTTP Status = " + getStatusCode + ")"); - } - } catch (Exception e) { - System.out.println("ERROR : " + e.getMessage()); - System.out.println("STACKTRACE : " + e.getStackTrace()); - } - } - - private static int getCall(String request, String responseId) { - int responseStatus = 0; - - String resource = "/merchant-mgmt/v3/merchant-batch-jobs/" + responseId; - - /* HTTP connection */ - URL url; - try { - url = new URL("https://" + requestHost + resource); - - HttpURLConnection con = (HttpURLConnection) url.openConnection(); - - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/xml"); - System.out.println("\tAccept : " + "application/xml"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tHost : " + requestHost); - - String token = generateJWT(request, "GET"); - - System.out.println("\n -- TOKEN -- "); - System.out.println(token); - - con.setRequestMethod("GET"); - con.setRequestProperty("Authorization", token); - con.setRequestProperty("Accept", "application/xml"); - con.setRequestProperty("Content-Type", "application/xml"); - con.setRequestProperty("Host", requestHost); - - int responseCode = con.getResponseCode(); - String responseHeader = con.getHeaderField("v-c-correlation-id"); - - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - if (responseCode == HttpURLConnection.HTTP_OK) { - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - System.out.println("\tResponse Payload :\n" + response.toString()); - } else { - responseStatus = -1; - } - } catch (Exception e) { - System.out.println(e.getStackTrace()); - } - - return responseStatus; - } - - private static int postCall(String request) { - int responseStatus = 0; - - String resource = "/merchant-mgmt/v3/merchant-batch-jobs"; - - /* HTTP connection */ - URL url; - try { - url = new URL("https://" + requestHost + resource); - - HttpURLConnection con = (HttpURLConnection) url.openConnection(); - - System.out.println("\n -- RequestURL -- "); - System.out.println("\tURL : " + url); - System.out.println("\n -- HTTP Headers -- "); - System.out.println("\tContent-Type : " + "application/xml"); - System.out.println("\tv-c-merchant-id : " + merchantId); - System.out.println("\tHost : " + requestHost); - - String token = generateJWT(request, "POST"); - - System.out.println("\n -- TOKEN -- "); - System.out.println(token); - - con.setRequestMethod("POST"); - con.setDoOutput(true); - con.setRequestProperty("Authorization", token); - con.setRequestProperty("Accept", "application/xml"); - con.setRequestProperty("Content-Type", "application/xml"); - con.setRequestProperty("Host", requestHost); - - try(OutputStream outputStream = con.getOutputStream()) { - byte[] input = request.getBytes("utf-8"); - outputStream.write(input, 0, input.length); - } - - int responseCode = con.getResponseCode(); - String responseHeader = con.getHeaderField("v-c-correlation-id"); - - System.out.println("\n -- Response Message -- " ); - System.out.println("\tResponse Code :" + responseCode); - System.out.println("\tv-c-correlation-id :" + responseHeader); - - if (responseCode == 200 || responseCode == 201 || responseCode == 202) { - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - System.out.println("\tResponse Payload :\n" + response.toString()); - } else { - // Output unexpected IOExceptions - BufferedReader in = new BufferedReader(new InputStreamReader(con.getErrorStream())); - String inputLine; - StringBuffer response = new StringBuffer(); - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - in.close(); - - /* print Response */ - System.out.println("Response Payload : " + response.toString()); - //System.out.println(exception); - responseStatus = -1; - } - } catch (Exception e) { - System.out.println(e.getStackTrace()); - - } - - return responseStatus; - } - - /* - * This method demonstrates the creation of the JWT Authentication credential - * Takes Request Paylaod and Http method(GET/POST) as input. - * - * Value from which to generate JWT - * The HTTP Verb that is needed for generating the credential - * String containing the JWT Authentication credential - */ - private static String generateJWT(String request, String method) { - String token = "TOKEN_PLACEHOLDER"; - System.out.println("\tMethod : " + method); - - try { - KeyStore merchantKeyStore = KeyStore.getInstance("PKCS12", new BouncyCastleProvider()); - FileInputStream keyFile = new FileInputStream("src/main/resources/testmmsv2auth.p12"); - - merchantKeyStore.load(keyFile, merchantId.toCharArray()); - - String merchantKeyAlias = null; - Enumeration enumKeyStore = merchantKeyStore.aliases(); - ArrayList array = new ArrayList(); - - while (enumKeyStore.hasMoreElements()) { - merchantKeyAlias = (String) enumKeyStore.nextElement(); - array.add(merchantKeyAlias); - if (merchantKeyAlias.contains(merchantId)) { - break; - } - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Initialize private key from certificate - PrivateKeyEntry e = (PrivateKeyEntry) merchantKeyStore.getEntry(merchantKeyAlias, - new PasswordProtection(merchantId.toCharArray())); - - RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) e.getPrivateKey(); - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Initialize certificate - merchantKeyAlias = keyAliasValidator(array, merchantId); - - e = (PrivateKeyEntry) merchantKeyStore.getEntry(merchantKeyAlias, - new PasswordProtection(merchantId.toCharArray())); - - X509Certificate certificate = (X509Certificate) e.getCertificate(); - - String encryptedSigMessage = ""; - - if (request != null && !request.isEmpty()) { - MessageDigest jwtBody = MessageDigest.getInstance("SHA-256"); - byte[] jwtClaimSetBody = jwtBody.digest(request.getBytes()); - encryptedSigMessage = Base64.getEncoder().encodeToString(jwtClaimSetBody); - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Get JWT - String claimSet = null; - if (method.equalsIgnoreCase("GET")) { - claimSet = "{\n \"iat\":\"" + ZonedDateTime.now().format(DateTimeFormatter.ISO_INSTANT) - + "\"\n} \n\n"; - } else if (method.equalsIgnoreCase("POST")) { - claimSet = "{\n \"digest\":\"" + encryptedSigMessage - + "\",\n \"digestAlgorithm\":\"SHA-256\",\n \"iat\":\"" - + ZonedDateTime.now().format(DateTimeFormatter.ISO_INSTANT) + "\"\n} \n\n"; - } - - /* Preparing the Signature Header. */ - HashMap customHeaders = new HashMap(); - if (merchantId != null) { - customHeaders.put(JWTCryptoProcessor.MERCHANT_ID, merchantId); - } - - if (merchantId != null) { - customHeaders.put("v-c-partner-id", merchantId); - } - - JWTCryptoProcessor jwtCryptoProcessor = new JWTCryptoProcessor(); - - System.out.println("\t JWT Body : " + claimSet); - - token = jwtCryptoProcessor.sign(claimSet, rsaPrivateKey, certificate, customHeaders); - } - catch (Exception ex) - { - System.out.println("ERROR : " + ex.toString()); - } - - return "Bearer " + token; - } - - /** - * @param array - * -list of keyAlias. - * @param merchantID - * -Id of merchant. - * @return merchantKeyalias for merchant. - */ - private static String keyAliasValidator(ArrayList array, String merchantID) { - int size = array.size(); - String tempKeyAlias, merchantKeyAlias, result; - StringTokenizer str; - for (int i = 0; i < size; i++) { - merchantKeyAlias = array.get(i).toString(); - str = new StringTokenizer(merchantKeyAlias, ","); - while (str.hasMoreTokens()) { - tempKeyAlias = str.nextToken(); - if (tempKeyAlias.contains("CN")) { - str = new StringTokenizer(tempKeyAlias, "="); - while (str.hasMoreElements()) { - result = str.nextToken(); - if (result.equalsIgnoreCase(merchantID)) { - return merchantKeyAlias; - } - } - } - } - } - - return null; - } -} - -class JWTCryptoProcessor { - public static String MERCHANT_ID = "v-c-merchant-id"; - - public String sign(String content, PrivateKey privateKey, X509Certificate x509Certificate, - Map customHeaders) { - return serializeToken(signPayload(content, privateKey, x509Certificate, customHeaders)); - } - - private String serializeToken(JOSEObject joseObject) { - return joseObject.serialize(); - } - - private JOSEObject signPayload(String content, PrivateKey privateKey, X509Certificate x509Certificate, - Map customHeaders) { - if ((content == null) || (content.trim().length() == 0) || (x509Certificate == null) || (privateKey == null)) { - return null; - } - String serialNumber = null; - String serialNumberPrefix = "SERIALNUMBER="; - String principal = x509Certificate.getSubjectDN().getName().toUpperCase(); - int beg = principal.indexOf(serialNumberPrefix); - if (beg >= 0) { - int end = principal.indexOf(",", beg); - if (end == -1) { - end = principal.length(); - } - serialNumber = principal.substring(beg + serialNumberPrefix.length(), end); - } else { - serialNumber = x509Certificate.getSerialNumber().toString(); - } - List x5cBase64List = new ArrayList<>(); - try { - x5cBase64List.add(com.nimbusds.jose.util.Base64.encode(x509Certificate.getEncoded())); - } catch (CertificateEncodingException e) { - return null; - } - RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey; - Payload payload = new Payload(content); - - JWSHeader jwsHeader = new JWSHeader.Builder(JWSAlgorithm.RS256) - .customParams(customHeaders).keyID(serialNumber) - .x509CertChain(x5cBase64List).build(); - JWSObject jwsObject = new JWSObject(jwsHeader, payload); - try { - RSASSASigner signer = new RSASSASigner(rsaPrivateKey); - jwsObject.sign(signer); - if (!jwsObject.getState().equals(JWSObject.State.SIGNED)) { - return null; - } - } catch (JOSEException joseException) { - return null; - } - return jwsObject; - } -} diff --git a/src/main/java/samples/networkTokenization/CreateInstrumentIdentifierCardEnrollForNetworkToken.java b/src/main/java/samples/networkTokenization/CreateInstrumentIdentifierCardEnrollForNetworkToken.java deleted file mode 100644 index 0882ca4..0000000 --- a/src/main/java/samples/networkTokenization/CreateInstrumentIdentifierCardEnrollForNetworkToken.java +++ /dev/null @@ -1,64 +0,0 @@ -package samples.networkTokenization; - -import Api.InstrumentIdentifierApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.PostInstrumentIdentifierRequest; -import Model.TmsEmbeddedInstrumentIdentifierCard; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class CreateInstrumentIdentifierCardEnrollForNetworkToken { - 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 { - run(); - } - - public static PostInstrumentIdentifierRequest run() { - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - PostInstrumentIdentifierRequest requestObj = new PostInstrumentIdentifierRequest(); - - requestObj.type("enrollable card"); - TmsEmbeddedInstrumentIdentifierCard card = new TmsEmbeddedInstrumentIdentifierCard(); - card.number("5204245750003216"); - card.expirationMonth("12"); - card.expirationYear("2025"); - requestObj.card(card); - - PostInstrumentIdentifierRequest result = null; - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - InstrumentIdentifierApi apiInstance = new InstrumentIdentifierApi(apiClient); - result = apiInstance.postInstrumentIdentifier(requestObj, profileid,false); - - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } -} diff --git a/src/main/java/samples/networkTokenization/NetworkToken.java b/src/main/java/samples/networkTokenization/NetworkToken.java deleted file mode 100644 index e506e75..0000000 --- a/src/main/java/samples/networkTokenization/NetworkToken.java +++ /dev/null @@ -1,120 +0,0 @@ -package samples.networkTokenization; - -import Data.Configuration; -import Model.PostInstrumentIdentifierRequest; -import Model.TmsEmbeddedInstrumentIdentifier; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.PKCS8EncodedKeySpec; -import java.util.Properties; - -import com.google.gson.Gson; -import com.google.gson.JsonObject; -import com.google.gson.GsonBuilder; -import org.bouncycastle.asn1.ASN1Sequence; -import org.bouncycastle.asn1.DERNull; -import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; -import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; -import org.bouncycastle.asn1.x509.AlgorithmIdentifier; -import org.bouncycastle.util.io.pem.PemObject; -import org.bouncycastle.util.io.pem.PemReader; -import utilities.JWEResponse.JWEUtility; - -public class NetworkToken { - - private static Properties merchantProp; - - public static void main(String args[]) throws Exception { - run(); - } - public static void run() { - try { - merchantProp = Configuration.getMerchantDetails(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - - //Step-I - PostInstrumentIdentifierRequest tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifier = CreateInstrumentIdentifierCardEnrollForNetworkToken.run(); - - //Step-II - String encodedJWEResponse = PaymentCredentialsFromNetworkToken.run(tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifier.getId()); - - //Step-III - // The following method JWEUtility.decryptJWEResponse(String, MerchantConfig) has been deprecated. - // String decodedResponse = JWEUtility.decryptJWEResponse(encodedJWEResponse, merchantConfig); - - // Using the new method JWEUtility.decryptJWEResponse(PrivateKey, String) instead - PrivateKey privateKey = fetchPrivateKeyFromFile(merchantConfig.getPemFileDirectory()); - - if (privateKey != null) { - String decodedResponse = JWEUtility.decryptJWEResponse(privateKey, encodedJWEResponse); - System.out.println("Decoded Response"); - System.out.println(decodedResponse); - - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - JsonObject responseJson = gson.fromJson(decodedResponse, JsonObject.class); - System.out.println(gson.toJson(responseJson)); - } else { - System.out.println("Private key not found"); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * This method takes in the file path of a PEM file and extracts the private key from it. - * The private key can be of the form PKCS#1 or PKCS#8. - * @param pemFilepath The file path to the network tokenization private key PEM file - * @return the private key from inside the PEM file - */ - private static PrivateKey fetchPrivateKeyFromFile(String pemFilepath) { - PemReader pemReader; - PemObject pemObject = null; - try { - pemReader = new PemReader(new FileReader(pemFilepath)); - pemObject = pemReader.readPemObject(); - } catch (FileNotFoundException exception) { - System.out.printf("No such file '%s' found.%n", pemFilepath); - } catch (IOException exception) { - System.out.printf("Cannot open file '%s'.%n", pemFilepath); - } - - byte[] pkcs8Encoded; - try { // This checks for a PKCS#1 Private Key - AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(PKCSObjectIdentifiers.rsaEncryption, DERNull.INSTANCE); - PrivateKeyInfo privateKeyInfo = new PrivateKeyInfo(algorithmIdentifier, ASN1Sequence.getInstance(pemObject.getContent())); - pkcs8Encoded = privateKeyInfo.getEncoded(); - PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(pkcs8Encoded); - KeyFactory keyFactory = KeyFactory.getInstance("RSA"); - PrivateKey privateKey = keyFactory.generatePrivate(keySpec); - return privateKey; - } catch (IOException exception) { - System.out.println("IOException: Could not able to load the PEM Object from PEM file"); - } catch (NoSuchAlgorithmException exception) { - System.out.println("NoSuchAlgorithmException: Unable to find the required algorithm"); - } catch (InvalidKeySpecException exception) { - System.out.println("InvalidKeySpecException: Unable to generate the PKCS#1 private key"); - } - - try { // This checks for a PKCS#8 Private Key - pkcs8Encoded = pemObject.getContent(); - PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(pkcs8Encoded); - KeyFactory keyFactory = KeyFactory.getInstance("RSA"); - PrivateKey privateKey = keyFactory.generatePrivate(keySpec); - return privateKey; - } catch (NoSuchAlgorithmException exception) { - System.out.println("NoSuchAlgorithmException: Unable to find the required algorithm"); - } catch (InvalidKeySpecException exception) { - System.out.println("InvalidKeySpecException: Unable to generate the PKCS#8 private key"); - } - - return null; - } -} \ No newline at end of file diff --git a/src/main/java/samples/networkTokenization/PaymentCredentialsFromNetworkToken.java b/src/main/java/samples/networkTokenization/PaymentCredentialsFromNetworkToken.java deleted file mode 100644 index b54bec7..0000000 --- a/src/main/java/samples/networkTokenization/PaymentCredentialsFromNetworkToken.java +++ /dev/null @@ -1,62 +0,0 @@ -package samples.networkTokenization; - -import Api.TokenApi; -import Data.Configuration; -import Invokers.ApiClient; -import Invokers.ApiException; -import Model.PostPaymentCredentialsRequest; -import com.cybersource.authsdk.core.MerchantConfig; - -import java.lang.invoke.MethodHandles; -import java.util.Properties; - -public class PaymentCredentialsFromNetworkToken { - 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 { - if (args != null && args.length > 0) { - String tokenID = args[0]; - run(tokenID); - } else { - run(null); - } - } - - public static String run(String tokenID) { - String result = null; - String profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; - if (tokenID == null) { - tokenID = CreateInstrumentIdentifierCardEnrollForNetworkToken.run().getId(); - } - try { - merchantProp = Configuration.getMerchantDetails(); - ApiClient apiClient = new ApiClient(); - MerchantConfig merchantConfig = new MerchantConfig(merchantProp); - apiClient.merchantConfig = merchantConfig; - - TokenApi apiInstance = new TokenApi(apiClient); - PostPaymentCredentialsRequest postPaymentCredentialsRequest = new PostPaymentCredentialsRequest(); - result = apiInstance.postTokenPaymentCredentials(tokenID, postPaymentCredentialsRequest, profileid); - 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()); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } - -} diff --git a/src/main/resources/NetworkTokenCert.pem b/src/main/resources/NetworkTokenCert.pem deleted file mode 100644 index 0b7e396..0000000 --- a/src/main/resources/NetworkTokenCert.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC4aEj4mUxdBAea -YVtGmuJ1e4+QNj80t/K5kYP2xKc576t5V08Z643O6T+kNYoFRRBADhs0yPfBM0rK -p+f8y6EiMTI/IjlB99OS16CXgprQKYoFAV8xUvUntbkOkCpyn157l05XLgnnIP+P -Y1Y7/vlcq/ODpZPj6l4kKyeQwx3OQ8fQ1zsSPJ0SYhKu+M+oVGGH2ybEUaIBirWC -v3XA/x32lz6AIyRF+IDqthBTTurWtwiYBWm6xJuTw8zZT+etm8bSNbRFnTNIkEtt -DglA5qCeKQWKM6vgFO9+cnUaV7egT9rbS/DyxJXGP3yfJbWwaaWs5xRZHrlJUioB -XSN/jOzVAgMBAAECggEAB++xCEXss+oa+6lp+LlsupqlPJMhGD88aoEZOVMQUV1/ -tzqrNFXfZgLC0unc9UoaH2+b+yMVCpMPCna8dLQ8zJBqda4e4bhtOhoelravu/q1 -rm53LtO/qkRXYQmSUhmKwu3pmLXqBjD03rJrQSzBhZv+4HENUtdA0vSqgL/s9fYB -BQHnq1wYPSHGonMdQCOBh2JeLqoJVnrU3tdrfu9gppS0a/olKN5s5+5jO4tf3wWH -DeDUDwIN7+vw/pzYOzTTJOs/hWIbxzr4wxYhG2RRBbKwyrbBRwS7GMSQfPA+BuYW -ZF9fPUP7L8SMwME/cIQ4ZKQVyun+5QDQvDSWxG7hIQKBgQDwSvIyRjuTlVP9zkWR -ihyYW6I5BQivnd5kjEHFWYoH/XXwEJTk/lB8hFVJx02S0iBxxQW+3AUF52ejKWVq -7AI6khhooBcc0iImh0Dm2qy912N0SLn29lfz8Lgb47lvCOvvgUUZqZDuugYPhCaU -zbRBEaXXXzZq64JvI0GNDjM2hQKBgQDEdidphv/ZItWOhsaaRBav56jVsRscXcIR -Xe+Fnz5NTDE8OJeJwCNLkmrV5GZTlHVc1aQ6eUOPgOUiJhr4MNN4CIf+fDbhpw6d -m8sHfGEmKt18Ei7fXaSlvICNz5SHkZ3M52nDfKUcp8W+2zB8iIUdXokhHJk4/drT -sI9nsoF2EQKBgAGmYhdaSBpxUgxSGEQxkJSzPF/r2u1pxhcmp2T1gm8fnGmzk3In -FOJl/jfteGjjrHlbgviWhipONnX2WM3tJO7GBgjh4IbAIp/lGdr78We0TOiFf1Fk -y6HPK1R1sdZDV2tjldfhRC9/c38zxxgKeYxg1KSv8K23REQDF/Yh/NQJAoGBAMLq -Ks4S5zGJ0vEWHGKfXRbmsuZYUXqCNvG+Dc63oDtWdZ620voTC7GFscNGWJNhvlL9 -j3OILhRpIGwR/D3zS0tSw4IjwNt+QAz0raleqJAShS38aE6p/JmGfNC1ezpJqZLK -oW8W8kWM2q8xjlhvpgnuagTU99vIWFwgVxbdzn3RAoGBANmfExNfl/WhPby8BRCU -OAt39sWZbm5j6USdUcnENs7XQ6vRLLFbPn1oUJiw8YSFn0QSmZXAHYPmLBoSKo9N -xXrEdoDF22Exktb9/Htq/Iw0V+2xmKss7OCYOZS8erNPQ9BgqMmQC7faoEgDiGOS -MMtHbJvYmrSvZgBF1E3snHE+ ------END PRIVATE KEY----- diff --git a/src/main/resources/TRRReport.json b/src/main/resources/TRRReport.json deleted file mode 100644 index 99910cf..0000000 --- a/src/main/resources/TRRReport.json +++ /dev/null @@ -1,11 +0,0 @@ -{ "startDay":"23", - "timeZone":"America/Chicago", - "reportDefinitionName":"TransactionRequestClass", - "startTime":"1100", - "reportFrequency":"DAILY", - "ReportName":"TRRReport", - "reportFormat":"csv", - "orgId":"testrest", - "reportType":"detail", - "reportFields": ["Request.RequestID","Request.TransactionDate","Request.MerchantReferenceNumber","Request.MerchantID"] -} \ No newline at end of file diff --git a/src/main/resources/authRequest.json b/src/main/resources/authRequest.json deleted file mode 100644 index 2bd8364..0000000 --- a/src/main/resources/authRequest.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "clientReferenceInformation": { - "code": "TC50171_3" - }, - "processingInformation": { - "commerceIndicator": "internet" - }, - "aggregatorInformation": { - "subMerchant": { - "cardAcceptorID": "1234567890", - "country": "US", - "phoneNumber": "650-432-0000", - "address1": "900 Metro Center", - "postalCode": "94404-2775", - "locality": "Foster City", - "name": "Visa Inc", - "administrativeArea": "CA", - "region": "PEN", - "email": "test@cybs.com" - }, - "name": "V-Internatio", - "aggregatorID": "123456789" - }, - "orderInformation": { - "billTo": { - "country": "US", - "lastName": "VDP", - "address2": "Address 2", - "address1": "201 S. Division St.", - "postalCode": "48104-2201", - "locality": "Ann Arbor", - "administrativeArea": "MI", - "firstName": "RTS", - "phoneNumber": "999999999", - "district": "MI", - "buildingNumber": "123", - "company": "Visa", - "email": "test@cybs.com" - }, - "amountDetails": { - "totalAmount": "102.21", - "currency": "USD" - } - }, - "paymentInformation": { - "card": { - "expirationYear": "2031", - "number": "5555555555554444", - "securityCode": "123", - "expirationMonth": "12", - "type": "002" - } - } -} \ No newline at end of file diff --git a/src/main/resources/batchapiTest.csv b/src/main/resources/batchapiTest.csv deleted file mode 100644 index 0b8df03..0000000 --- a/src/main/resources/batchapiTest.csv +++ /dev/null @@ -1,5 +0,0 @@ -merchantID=qaebc2,batchID=rgdltnd0,recordCount=2,statusEmail=ynachire@visa.com,targetAPIVersion=1.86,creationDate=2025-03-05,reference= -merchantID,merchantReferenceCode,merchantDefinedData_field1,ccAuthService_run,billTo_firstName,billTo_lastName,billTo_email,billTo_street1,billTo_city,billTo_state,billTo_country,billTo_postalCode,card_accountNumber,card_expirationMonth,card_expirationYear,card_cardType,purchaseTotals_currency,purchaseTotals_grandTotalAmount,item_#_productCode -qaebc2,1,4837,true,Jay,Smith,ynachire@visa.com,8 Mission Street,San Francisco,CA,US,94101,4111111111111111,12,2036,001,GBP,8.00,1 -qaebc2,2,7209,true,Jay,Smith,ynachire@visa.com,8 Mission Street,San Francisco,CA,US,94101,4111111111111111,12,2036,001,GBP,8.00,1 -END,SUM=16.00 \ No newline at end of file diff --git a/src/main/resources/cybs.properties b/src/main/resources/cybs.properties deleted file mode 100644 index 18cef5f..0000000 --- a/src/main/resources/cybs.properties +++ /dev/null @@ -1,20 +0,0 @@ -#HTTP_Signature and JWT -authenticationType = http_signature -merchantID = testrest -runEnvironment = apitest.cybersource.com -# JWT Parameters -keyAlias = testrest -keyPass = testrest -keyFileName = testrest -#P12 key path. Enter the folder path where the .p12 file is located. -keysDirectory = src/main/resources -# HTTP Parameters -merchantKeyId = 08c94330-f618-42a3-b09d-e1e43be5efda -merchantsecretKey = yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE= -#Logging to be enabled or not. -enableLog = true -#Log directory Path -logDirectory = log -#Log file size in KB -logMaximumSize = 5M -logFilename = cybs \ No newline at end of file diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml deleted file mode 100644 index dcca641..0000000 --- a/src/main/resources/log4j2.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - ./logs - application - - - - - - - - %d{MM/dd/yy HH:mm:ss,SS:} [%t] %5p (%C{1}:%-1L) - %m%n - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/qaebc2.p12 b/src/main/resources/qaebc2.p12 deleted file mode 100644 index a66a4e26c3f3fb490651b6cdaeda737a405de531..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4929 zcmc(ic|6qZ*T=uJSO?h&*|KN(&SHinO_nH2Sz2skX++lS62s7F+)|1rB!q~pAxk1; zDMgIRzRPlliiq$VJ@<3}-1qbRe!u6x=a1`pUFS33bH3MHbKciE1Csf)p%55I=3ZlF zQ=%ABRyiRokPI^SES$_e#gNB9GMnySK4Qbb$!s7)RtCv1HfF>hUL5QYSOysy0+OKt z%xpKgc~(bvK|z}K0mOZ4@}2l%^!;zFD#br6jLk!W=d49=Qi;&z!J z3b}_7@|QpJB}bx@GYTmI?%NTV`2N)v$Pnq>+kh|uFfwEhz}P!Glnj9YSkEv6=Y?E#bFe%hDHLUWNW z+%4<9BzHdQ@RmhLpe6lmPzvRQgX6L{ny2ZseArA~?V8Wa$s8@8qU3vWbW+(9*}emB zQ;1eLf}q?vSIY@tBXTunl*#w!=7;Rbbi6P1vnw@Wwj#vpitr&^_GxbPZa`k>V)q?9iRno2vEGU5LrKRmSQv|l{8=hY%-C=3EXcApUAhk`{$ z0y3^>LqGcboRy604J~ zERkE4+sCS}CyQ*z&6QCb8z@0oqDm`!7gk4_MYLtFSZ?8a#k&^Gr>7K-X@*$SPGy-S z{)p^TR7L4@c`2$s*N@paJ3T>Rl36hN;f)Lfx&O=_HUT6I4uODf|5W&qw&K=+A3y|r z0XM)A@BmDK0KgM)`lVImY&*Hj%m=lyKyreJ9fO?%e%j5?5y=no?wAM;#4b>fC=lFHVH}FPR7p!; zM=w7|XMZ-OrfScC^NnQLesL&t|g+*$jkmz4fVRxC}VWcRy_rId@ z?utsVIIc@z?CYO^{fn>lp8zYX7oX67+_Rbf-e2S;qDtxGotSMO0PVjX-*l_}P0zv= zlNN;OSg!6T^0!EjhtFJf6L|RhFSsN&#XqKAXAzckvhUDc@{GzCgy98Vc%7&>)--S- zG{4}Ld@f(%TAccMkAugv#6|;~{m-lKMF&!=m4%ae615eA>cutCBUJ0!BuZmftB4Ho zoNBog#63Bo=ozASaM8oKR?PW#tDC*DA#N9>C8RUO5?KP+L&CZ%-`y8XPrKx=!WF6X z)s^#v8Xl>;np-Nz6t8GzKheH5*glUaRCOL<3T-Q5hI#Eb=v`Uu3gkVOa8K%VeVwqc zQbFx^y;3jNzWVA|BF&ne_`d?SbMvr>E>Az)E)VWIo;1#VhVZ_iHAn3g)l+}gUY^|@ z@5WRvY!_*k+Q7Ul`7^{*iD}RLdAbWmzq1wv2%OXKX-KyxWof?TMrG z&Y5~|N~r!TgmdW^MPYHv<#uPqln_#1H2TMN*SX_&R-+~EqWb&{9pD=#;p5E}-f&09FN7U*d- zyTz#N`I&}?eeRmJN21Lf)2CqFR+-=g<`$y5z^^@Ze?9TvMC$?}f7}QbfH&iQ@MW+~1PFiyaGb$B0k8rr7~mrRMmmI1CLu$A zB^~kxPKLBI^p}jG`UmM~6a#e(7KK7g^RonfRR)v;~KBF5V@PL*EybY)Z|=^x^T+dQmsx0>2?yu%MrQt zWA9sol1Yk#w&nhCPU89to4#9FGB+XvAri+gej~2u6upnmIVXXt?*g!3rCxm* zsdqDpPngqVd-7sQJF?Sg=v5D=-`x5Dw;aapFz*nWbidwAE<(AZD=l$+?mB(@yoar{J`w-tp0abIE3hBMn5k>Sc2sPU!N# zOzN+vC15_y(&})IhqsJODLG=Rdir%gn;vj+&2P{ge#t+ zD-H*mHq#NI?(_MbtSl8TwRwtidSZFdRd}gJq&BFvJM~n>|9#5n{wgc}0G^RV{(vh; zX1VjH`%Z_&5(6i*L@{I%V}$O`Cujzlc^)J)e_|w>(4RTQvD2kNSs1Mp;5@r9AZr%7 za0IaEX=86340^I}3UU8VwqXB7?tHIR?nTa({5Mgy8CAz`GgtB~J=&WYRS0kENZ!O3 zeStlNtL2~P(B|zO^L_R8>#)$fLViv6Z`Ug~xQs&bs8?C3ToyHg>G%>) z^IA#sq4^jQEw{9*-P<{k{-|sZ=6N+IQFqTaz8qxAiQLOE?&HEXDc8@Eb=SVZk^s_W z!NhKjhnv5N?JJM-;B5JjKOH7Q`6e7sk~g_2^N~6;|B$KeqLSw{Y4wTh`mhw7-5qnwOgnWLmzb{F$kmwh zMva8QT{SFR>+T(5A3G=!7g%u|L11BEO_59KbCTH#n_TbFs3{)Lx<)R+wSCV5ZsH!VJ$$7m z8+^&Ee&BANa$|oUJF*b7k?pK%)>-5;2B z{0Osxi0oCSeR36#7mOp4Kd-oGv(hc_ylj2Ro8nxHIm1#FWEm?fQ62rQLiG{42cOnx z2dz~vZv)j-&va}IJdVW=-FDST=wWI+tdcuSc`K?58&+gkyQ0h$Y&_+~Hmpk(+BGj~)8? zOlCxSK2-ASHLi|YsoeG3C*1bY4ssAGnI9+DO!)*nI<6hbbv5Ae{mqc?6qN?&wu80` zO=a|@Q)4AY0m}DQ@dT~e_!^y*^iO^Y~_w3LzeeHXCj7paMdBYa$H zJy#Pp{07{9vb=dPMJz;!@OEl*%*FO1MT{?1L=UTMPYeh5I|Z$yKb;mh|6=Id-u++N zlaJl=Q?lkSWid30C@uckP-;2rB&pliH}q=2B=sZre<=5y zrPt_qNVM8I)AD*)O*+h;*mOT8@n>!n$sfu#buhLRS}(!#F&$9$x4PswVn_Vk!TjUy zS?l#;hs}ij5fx}H`Rr*aMPwF#nB3Xr=(xZG7D8X_)bR>W@(*ke(Bukkk}W){Y%kZp zAW?L?@~;gJK(DSmB6GpplRO9}2i=Ip4%*Tc_4P7FrF&eV6b+j4_-Int7p~V2^Dq2% zTi~*5UA}5xWA-o!r@;3yc<(ZCnuDt8UcCt|kYgvybB|UKXdAWn% z`ap!*o4Sy3x+=wPYgqx!Wt7?CB_s^zv32=VJ|j)F;W>(#{H?PXav^i!!NqcFJh7*7cVm(er0u&qX(K z3~qay4y1YB7pIO(&D^iX`>Q~E-==3ulW8WCWP)Rzr>#Z_djmXgCKIJA#$J?LWnRp zl+h5uB_9cb#mcodM|60B*zp6pS!7ZX>Bm@UY8~%w#dr4v>vjt9LRVqT8S|Z2+7TM*;;VIE(ys8eClhoe#XQ{7w-?3IU5_stTtXIt^j z^GzBHVJoOLDp(YNnXESNa22Rnj)`blk9kkD6xl!l}Z0jn#R+Um)J!D zZymm@NS25ntFu;VR>d9)(631Pc4MZ(RFeC zrlU%8jn>4Itj`*RI98GcnO?8Gx-pLhp=R3yb_Am|3TSF87ON%e>8Vd2E&lp859Q(^kvX^T^~w^hj1_nO zOmV3&zWKy3vq1hGPNnoSGL|&v>2{U_uFEP*GYb0;KHXIL=z(dpBV?Sd6wvD8S$LG4 z7mT*ia(PscnkB)C`Z(J#`G&pi8-A))Ns*O6`y`rhBx0giZC?7sb570eM3aIVyUfX- zxvkWORoCek1#Q@ZjTZmL3tj;Q>LRQH9-4tl^oa9BA6Af*hkYScWz^U sB&tzSjy*8Aw$6LifncC&DYH-`KQaltNsPKa9yy?y9o*Pdz$nE30Dh$AsQ>@~ diff --git a/src/main/resources/qaebc2.rgdltnd0.csv b/src/main/resources/qaebc2.rgdltnd0.csv deleted file mode 100644 index 0b8df03..0000000 --- a/src/main/resources/qaebc2.rgdltnd0.csv +++ /dev/null @@ -1,5 +0,0 @@ -merchantID=qaebc2,batchID=rgdltnd0,recordCount=2,statusEmail=ynachire@visa.com,targetAPIVersion=1.86,creationDate=2025-03-05,reference= -merchantID,merchantReferenceCode,merchantDefinedData_field1,ccAuthService_run,billTo_firstName,billTo_lastName,billTo_email,billTo_street1,billTo_city,billTo_state,billTo_country,billTo_postalCode,card_accountNumber,card_expirationMonth,card_expirationYear,card_cardType,purchaseTotals_currency,purchaseTotals_grandTotalAmount,item_#_productCode -qaebc2,1,4837,true,Jay,Smith,ynachire@visa.com,8 Mission Street,San Francisco,CA,US,94101,4111111111111111,12,2036,001,GBP,8.00,1 -qaebc2,2,7209,true,Jay,Smith,ynachire@visa.com,8 Mission Street,San Francisco,CA,US,94101,4111111111111111,12,2036,001,GBP,8.00,1 -END,SUM=16.00 \ No newline at end of file diff --git a/src/main/resources/report.csv b/src/main/resources/report.csv deleted file mode 100644 index c44501f..0000000 --- a/src/main/resources/report.csv +++ /dev/null @@ -1 +0,0 @@ -{"_links":{"self":{"href":"https://apitest.cybersource.com/reporting/v2/reportSubscriptions/TRRReport?organizationId=testrest"}},"organizationId":"testrest","parentId":"testrest_acct","reportDefinitionId":"210","reportDefinitionName":"TransactionRequestClass","reportFields":["Request.RequestID","Request.TransactionDate","Request.MerchantReferenceNumber","Request.MerchantID"],"reportFilters":{},"reportFormat":"CSV","reportFrequency":"DAILY","reportName":"TRRReport","reportPreferences":{"signedAmounts":false,"supportEmailAddresses":null,"additionalEmailAddresses":null,"fieldNameConvention":null},"selectedMerchantGroupId":null,"selectedOrganizationId":null,"startDay":0,"startTime":"1100","subscriptionStatus":"ACTIVE","subscriptionType":"CUSTOM","timeZone":"America/Chicago"} diff --git a/src/main/resources/report.txt.csv b/src/main/resources/report.txt.csv deleted file mode 100644 index 9a9ad77..0000000 --- a/src/main/resources/report.txt.csv +++ /dev/null @@ -1 +0,0 @@ -{"_links":{"self":{"href":"https://apitest.cybersource.com/reporting/v2/reportSubscriptions/TRRReport?organizationId=testrest"}},"organizationId":"testrest","reportDefinitionId":"210","reportDefinitionName":"TransactionRequestClass","reportFields":["Request.RequestID","Request.TransactionDate","Request.MerchantReferenceNumber","Request.MerchantID"],"reportFilters":{},"reportFormat":"CSV","reportFrequency":"DAILY","reportName":"TRRReport","reportPreferences":{"signedAmounts":false,"supportEmailAddresses":null,"additionalEmailAddresses":null,"fieldNameConvention":null},"selectedMerchantGroupId":null,"selectedOrganizationId":null,"startDay":0,"startTime":"1100","subscriptionStatus":"ACTIVE","subscriptionType":"CUSTOM","timeZone":"America/Chicago"} diff --git a/src/main/resources/reports.json b/src/main/resources/reports.json deleted file mode 100644 index 9979530..0000000 --- a/src/main/resources/reports.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "organizationId": "Test_Merchatnt_id", - "reportDefinitionName": "TransactionRequestClass", - "reportFields": [ - "Request.RequestID", - "Request.TransactionDate", - "Request.MerchantID" - ], - "reportMimeType": "application/xml", - "reportName": "My Transaction Request report", - "timezone": "America/Chicago", - "reportStartTime": "2017-10-01T10:10:10+05:00", - "reportEndTime": "2017-10-02T10:10:10+05:00", - "reportFilters": { - "property1": [ - "string" - ], - "property2": [ - "string" - ] - }, - "reportPreferences": { - "signedAmounts": true, - "fieldNameConvention": "SOAPI," - }, - "selectedOrganizationId": "myMerchantid", - "selectedMerchantGroupName": "myGroup" -} \ No newline at end of file diff --git a/src/main/resources/testmmsv2auth.p12 b/src/main/resources/testmmsv2auth.p12 deleted file mode 100644 index 06ab99e34716126a82e926222e652df19c6d2369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3577 zcmVWsf(`Wo0Ru3C4Z#KpDuzgg_YDCD0ic2nvIK$+t}ucPsxX2LrUnTrhDe6@ z4FLxRpn?sTFoF$}0s#Opf(?uY2`Yw2hW8Bt2LUh}1_~;MNQU8;HM4!7E0#!z>_T*|pC)B8CRSQCkTSCtd(qy>l}(&xJNiOB=P{s} zF(6ecKCe5S+&a*~^i2~+HY%<%IL+Cd&NXgJ0yp19rAY~I0%=`|hvESvFB92xUFD#d zZxt1#YOVg5I~XX>3IFnZyCxs0tItlV8fmOFz@``r^l2FcyI4hMI;9|TwYVy+DRkv* zH{dE72A}uI))t0+&sTI2E3*72Aw>ryN)Zu7fjP`xI>pA|VTbm^PGkjGM6Li(RXW$=PVoBjPK5k;TF zGaFvk)4po}skY(^-xY0s%BNSgvd?b9tD(@uJU;TcD~->&q!l+_DFfT*DGT)Rp{25R= zV8p*EU5wi6q#k;pB-n&6TQjAcOHis{hamhjNkPcrH$MNy@)eO_Q*kIxgTmR=^n2uh zp$D~fKGIvl#cwYvP`g1W)anPpWs&)0+Zg%rOu*|c{uZkZ8(Egg()33X5>F>hSPX&f ze>!#C+!J6*f%8*5v@c6F{!WTawfxI3uKa|M^7~az19qT~O)*CYzqPRV^d^R*g#j(& zj%WpGn@ae#o&(-JfA5iVmLB%500=KWm><0I4Nt?w>loa#|Awh9D|isyv+AsRbMNOl z;2$u*C@RX$p4Fp1U3mZ7GmY;{aY%TP8v|0T+nz^GGA~O>h>!`M#!o&{ZWnF%WU2Rp zJFdojHQlBVXD=J-7Wv(nBvi&w9=dkw9tBo48bDe|+JhbHk6QRV(l(rc_kvoceSUFW zAz5P#Wff}Z4kLglMNe+my09dU^=f(MzO>EcR!IFv$=x0fnVg1RA$cR^q9_861WcI}EABC8AU3%Ov0%JEThU6zuF`SJRWu0wpfFuRjboG| zBU~Oi|7SGA)h&o+aj7ZXMV1g$R6sd;zpPVv70)hI!wD3Uq@zgF)AF=r(hly~SlmgM z%7<~?t#PI4%rL7yHXw~9!RXg8_SB&3_e1<(B2lr%3F(UpI7jc5h>=5;lv7s{SQSu) zn9L&eAu)h_eA{mqX0fz#V&>=+lzJI|h5aKG1~5HO)nrk=Y|380v~|Ib^JT2iw&B63 zAjQQX8v1t9{vf5Ne060z*$-?%ev=78s%B9PW0Y;T0EL>nt;h(Qqp(GJQJbehxa^!< zZ01y|_I$DxQ&UiYK9P@(#5Gf!IY_L{cmo#i9F=A`{cU63hMcu-iifaqsi1 z3!AVs&`TRCtDHf2yF;8~9G?oB=x4O)j2hlqMlUM5}Ze zsd){z@7#k*z3eN*!oaMkDC)+psEX#m-d>Ra4<$ma#(^|Yh^VUYM}iqf#JhyJU5G?B zr%|PC3l%#li3gCL$*sF7qcJ|0Xl3vYB#iiSb7Jg{&gWT7Pt*4j6II}WpDC{#5NmhVEXqU?bX1(cF!i}hS1h(g}bY2YA}oAx7r-1 zIm>6Ov1|eh>Gpds6s_LxEJ`A_!?CLxX_or&J|C18TCwZhN4%Zv&f=C2*v}Mwttnct z_)_?WZh1?RS4WlZ7DQ>5Jrzk6^zfZWuz4(k71s|-?X^17hPXDJ6@M?f-}|tI_m2wr z?ZYcH0SruO3W4F6Xh}qKgxLI)t7+F&-*w`UyvfUMi(OPr*QKK17zQ~amJVtfb!gt! z7r#(=^?z6`#`rr>aWM>EP?GG}?EZ2Xka3w{D3Z?}p_I6&9M&MJH?7d9Hav`E-$(jCL$Z;M;2v z+TqugpbhrQwouQuofr3(q~It@aoxJMF4Y1lc;qatiqxCa6zI#LaIVuVx>rXRAq z1Ge|>%REgdoJkp@Afb-C&y=i+xa^A@x#*pkQ}$}_E3kSGA!7WN8P$6dE>i4-Bb{g# zEv_zm{bq2Qu7n;ui`5h*H1hKEh2)|^X=DNqnbp#Zk#O4;$=wmW#{-ausg%Xxd^!_q zG%!DCfC$NBBX}#3(+j^}2TfQ!&w`(`fND2CmpyJ3KCLB@dWfzuENSc1H>X3@^b)4!2Sehw8TLNW&&^ zM9143$D;o#PW-Zq75|z53UzYXiL{hOJWK3NKU^}Z90nJ5myw~_Ao?wtH99Gmno_4d zDYjfwy$0}3h+AukT!q-J0oyRIN=H-_iC?Loshs89l`)Z1#)kIidrc+?x+jvcgr{`& zJT|P!dvUOA{|PesK92OCloB3O-p#mI#h<9m8E^JHT{jmH!HG7Eqigqfk(NMl=g{sg z9oxJ7?;rWe?3(MEC)S0^o=><8C_nQm(Md3<%I%lrV)c3vJe(ENNwQ7>$iLQgXD#DH zXOb%BWj3l(7Ju>`Kzj%nfsvGI&VPJw&W=DPiF5C>w%TfHiC6e9v+F4C$;C;1nAbuY ztTElrkW+%K6WWp-{~%bJQi^8gS9|Mcke%p)Z9rV9g1;ItcY_%Lfzj9~=qoNej_<%{ zxTkyfEegxWsY1zpbQ4j1%3;4e%Y1xqW?G_2Cnl6GD$65Z|9eX+9{1 zpD_yaja_Z1t*@)yg!)o4&M{;i{XV1&4VavgE4}k(uF_2{OOWMH)_Tb6wB41GZ*Ge$$IPeS!N&hTu=4<5pg`Hd= zVrBZ7Wy(IL<3<&MNL#OnrFyV^0`|fjNQK8KXLt$i&JR0&u-=sqk3<~PIZCW^!LJN} z(?`X!Vtj7YYMz{MtgxS2XPM~;NUT{RVT@?0!Nh$^mnix~5!i;;SI^l~ERvpKa;51?65Bbgrq0aTl{@ z>xkhLglKfo_{aKITwgVLHVrADC@D4&0+WsXiGeIy{pH~=*UIMw45!ib>yhqKWrbP* zM|nBDaS>h64F#M%2H~==MEKkYPO)Rv7B!XfTHgE!Hm5*qe8h{@Mjgck&n_CLD}%Z- z8Bu~`cK9EQK+ZpQ4oYpuk3XrrRiu`s$+nG8%pHGAK@)JQ+S7037};DdT$ za#{~45pfE?n%~k{)bwbia6GL&qaN6WIa~;uT#CWHp^*ae>8Sp6gH&+$?DZ)3V)0~J zLcw_BYv}WzLX^U7B7q@C>b{1f`(eA0NfwYl^EW$~y) zDqwX|dL(*Ts2imuTu>_8@&@YMh zFBdf4##5hwy_QVF7dL)9eYuS$xvh6V2)}OVY(nlKJ57?}dMk53WafwP_&IdyQSa`dd diff --git a/src/main/resources/testrest.p12 b/src/main/resources/testrest.p12 deleted file mode 100644 index 8d5a74b54d14dbed6eee248e9be0c9fafce47198..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3553 zcmV<74Ic6^f(_jQ0Ru3C4XFkRDuzgg_YDCD0ic2nngoIkmN0@1k}!e|js^)ThDe6@ z4FLxRpn?s5FoF$x0s#Opf(>*A2`Yw2hW8Bt2LUh}1_~;MNQU4c6s znN`$KQ(W0tgr{#EliW90*D3b>xLmZeo%u(T{LYtmR@2cA_u)jY07lOO3^6+2w5kul zgQO#Ye&jdf9Jd6W7bcgTBlIsZQ5TD1->xs7dEd>~kj{OI#*Ta+MRDITI=7gMD)I{xFIDWIT8p@#-RMH%SQRaF5Q5`Kf}Qka6+))^ zTKGi^6@v1oR3Bi^YGD8_5?5s`7uYrbohO*K_1EiBJV&la)9Sr8@D1b8Fh2P^GWO-# zNZ2Ns9OplMi34Lig}?spkIhSTC|rQIH-@ypph2$YOn9$t*uZI?#w3@syu?}z)za(^ zjB|c%r&h$bxMwlmhq<7{jLs1ZM@*Yas)ODE{0FSc?nbp_cQMb`7c{}7Iw1V*;*(@R z-!{M8{=}tr0mrVtF;z3cAK}G3IIf^u@E!FG&@>z9OMc;Km+x^QtgS@M>4C){uh>NA zue=TIeu@kMb&muJc?ARm3AobG#LjNJI+8B@6i43w4X1#QpLk?BR{j62*<++sLu!%6 z%R>e%kIX_j=9ONI&V(QE@~w>U)ZCu(JnySc?h`|!47Qo7=^iR+nGxmzD3d?Rhw(D_ z=g>)-{&tN)Y7LZz5^Ze(jH1hqP3b>Rw4U-}{t_^$oi2A*BwEgz=$vy_*c8mt9alho z^tDa?9S)mOhW^u4$8nD(nsPc%L94-uS=A}$#F~FrSWgqPIgvfc$f)+N2mfr83LSWg zkpg`pBx0U%WgiLaK16l@@r&lKOyI*i_&<&X1ydok3>=Iv#CcT{3?Q`lacUr*5JS3G z7LySVk-aP!%Pw{g7EY`fuU@S{TdOZi%|RI#7Mo^ z>rba=*H0oaHeuTd{9(MG6ZS@LZ{E@4x0FN*2Kc`nK8g)aiQ7mU2Hh7@;u1M2h#NA1Wqsm1_7}wn^;u!6pric?_#37pgX{qK*V0bgYJ91VsY4rdpr$A|5^YtLnNG_73>%FZ{*-jR^f#Es;{@$Ws*t*^Pf-oRJ}BGWT`r!c_SpzoROGn0VK>*m_5df13ak zY_4?>0+BSCQK6z??y-n)Op^_vf z=;ilziTi`a{0*Vo6;~C1*y~VfRY~kiU1*~cyofxecT&&!u#D^&9lT_*z-H8An^c;S zz0Y)IxIlcNFv@xG#>5Gkyof<`9{y~9&%G8t8Z!>afpXJF*P~fp-VbEEUr4C$yh1cp z*ejwuBqB!%pvpL7N#pD8?4yJX~szC*~8^@47LteA{!37e^abXZ!jI z6ihI3Ch>dth>k=_zJ!Mt_a+#|oK>418{H~zvIogI3{G7nWCT-~;cfPoobb>IB+5{TH^XRPLakxn(b&xFKZuA{Ra zWkO9*887fGy_3<10>aAIKM8R4)U{)TBx90`yhAr=KcWgLY{faPIrs?QeHvcXAz|T2 zG>N8M{qH)dIV!Y?z>jS;`UP{LqMwA;V08A#FV<0Fds<(eEnps zff47i7uIzA?M!#9R1cGFU(+)`qG7_PyyV}1UC_o8nR}7z9$!^2d@S&t5GUjr$Wvt9 z65Jfg0=FR+92SGF{~KGpjC=`>avD^i(9Dlu$BR9NQxSQ_8~Hx2#R`tW#|XDLR1&l6 zSVs8Kf~7VhB56mxfAtu;VsTuRT*CKDd)pjkt+O(z{lf%XBolKqQ#@b2<^v6DvWF@- zA7St@c4G3FGGs={Ko#AyGJt+xNvC#0q##Dv`}n!!*J}GLx)n&6ggoph`0U&2yP?>k;B&xJhS9qgvKxzL+fk9`!Lcs0O2J zw}Jg^t&rc_%d|MLF?A*(Y}Pv?hQqP(K5#U#3GcRR!4qItq-uJK%UaJ5&t&CcLU zz5k?g<8cm-qjn)V0{f}Ay;)x%*gA6}5j$;7x7A8llX)?rKKFw=8}@y3t%CzU>V0~T zN_IbOUkpIOA$;k4W+ip#^I< z!rR{EB_KR?*%M^x{SNcm+}UgW*CNs^#6qfs4)-Ct=#YU%B1GCR~+X6oD^ z#)>nJ66uq4gRZjLB_)u3_yh!OII4n>zm?$Aq*g;Z!Mf9-)c}xJg*xaog0c3%p=SwRVWgT#@~=Nd$5mPp(}4OGoNC+HmtN2 z2C7z)f1i~1Xml~`wCI>+*}j!$prr)uM^u<6PprO$&zAttp*=AOGK{IfLzCuSZtMO4 z3|b&Uv}fOoP_N+xc`9rI6BFtdI97;+Cgm6_S{tY;McdD#d@G>r0{{m zGn;Yla6~edW0sbFssq;d2=d%oo}T3da-EGN8|6JQp3&zSf*ZX#7sE|S+5!&<>>c9m zki?jLJsn4x6w+~D0rO`jY})z3jj6>yuJy>rP3}xjz`iYh>OaVP^1mMzq}87VnYtaC zx4bfMM)RBpvt0x>eBtB-*xfcrl}fgx-GbtixnEy4R-3bN2eK0FCuK(Z)67Afp@vwn z)eyYkA>$%i#HJ#u;cA38#@(oH?WQz6bk1+kVtNv94Re=PUMV+^cdw!Be*(fMM|8IM zOG){`D$bA^bxlAx&&{{3)^qL+&P5Azx6Z;tYcVU?9ozF`_*?4*n?`T@6z=*WNC6-r zrEO%ER`X9ND%^Z`mN|uzt*)?xLMWhfJJ^$8L>5K$_{GlSmYcm!s%*G2=<;z*yfH(Z z)Qpf_5xWrX0y%qIelbktKb&pK+QT@ejvUd%X2OWjA0cD0He}kLTL?K16%ue-u^lI> zwVzm4ZX5S{Pw@k`H=af`H0PT~{48K2&qZM%kh%AQD`- zfz9#P$FoJ8ZxCKe!XGCa`mlKpn1YU7nhdpi-w{+H#_O~EwaG35kz-ZLqrsXL%v{5L zHc3#*OOR-Oj%FeFMP#=oob zGnquwDeV5=;SELzbBr(x*xIp_lW(_fmZO(rQMAkP$i##ZN=EKKl9SED$y-P#ji=!d zwMOD-Iqb#5x*g8rtY9*(N_hzGTNk0_+h^)p@q<&ZPxN8SF)p%$f|7`G>dMi<{;r z0?Ek%zrwrN-3xY1J;V8eaOO^O8bpeUqQrbcRqb6Z2;$!HF?_esv4ud7B@yZ07@Ibm z02WkZ>{0$@(`>R0U6XSKfBYtFH4HiktUicrzCY%wY5D=;502L=Tz4g&%j1QZ^X5`l0q b)AgkkCr?Gh@9pSQ7bye?cTJUe5$}_z+bzAC diff --git a/src/main/resources/testrest.pem b/src/main/resources/testrest.pem deleted file mode 100644 index 11b4d28..0000000 --- a/src/main/resources/testrest.pem +++ /dev/null @@ -1,87 +0,0 @@ -Bag Attributes - localKeyID: 01 - friendlyName: serialNumber=5112108039940177031860,CN=testrest -subject=/CN=testrest/serialNumber=5112108039940177031860 -issuer=/CN=CyberSourceCertAuth ------BEGIN CERTIFICATE----- -MIICXzCCAcigAwIBAgIWNTExMjEwODAzOTk0MDE3NzAzMTg2MDANBgkqhkiG9w0B -AQsFADAeMRwwGgYDVQQDDBNDeWJlclNvdXJjZUNlcnRBdXRoMB4XDTE3MTEyMDIw -NDY0M1oXDTE5MTEyMDIwNDY0M1owNDERMA8GA1UEAwwIdGVzdHJlc3QxHzAdBgNV -BAUTFjUxMTIxMDgwMzk5NDAxNzcwMzE4NjAwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQC+BtdMcokaKwTes9O+snqjWsehO0/Y4CJrwo4cdGCafRO6ows3 -mC1xmpSYttTKIdeGR1qOYpTSeY9uJh2cCfayMKXmhQf4d5v8pNDnmYBMGBwU1wWj -lYsMLFbcPFWjdPtKlou2RIWZ566YWIbWCBf+G4dHkA0D7Csp3FT3lnUN2me4lJkl -ysfqp1X8q3JDqVIQFVAduamhWCYMRS5Kg8sKwMjldGQUby88S+MOwcCA3HOHT64b -arvPId2ExqAqvfyBCPAR49V6/ywDVsH9SyHewg121ckMcA9g55tIqdsyHGRZN9fs -20kMyqEP78L4cxfisuVQC8knlfZtdcqVAY7FAgMBAAEwDQYJKoZIhvcNAQELBQAD -gYEAuM+OjmBwvd4HuquFo7C7ySUpRnsEHLE+F0c/RFyeeVFlUJqv/ysbC1UQPi+M -XLufFAfoGcpg0Qb4PzU0XsDCQ2xAkx7CcAnlHLLEtQXMX3eJr8CM2SgB5jGl5aLu -bBpVQzn7BqCIFoDmcLst4pHb/gTWhiHvIYFXiHhLMgzGCeI= ------END CERTIFICATE----- -Bag Attributes - friendlyName: serialNumber=4285458474900176195847,CN=CyberSource_SJC_US -subject=/CN=CyberSource_SJC_US/serialNumber=4285458474900176195847 -issuer=/CN=CyberSourceCertAuth ------BEGIN CERTIFICATE----- -MIIB5TCCAU6gAwIBAgIWNDI4NTQ1ODQ3NDkwMDE3NjE5NTg0NzANBgkqhkiG9w0B -AQUFADAeMRwwGgYDVQQDDBNDeWJlclNvdXJjZUNlcnRBdXRoMB4XDTE1MDQwOTAy -MTcyN1oXDTE4MDQwOTAyMTcyN1owPjEbMBkGA1UEAwwSQ3liZXJTb3VyY2VfU0pD -X1VTMR8wHQYDVQQFExY0Mjg1NDU4NDc0OTAwMTc2MTk1ODQ3MIGfMA0GCSqGSIb3 -DQEBAQUAA4GNADCBiQKBgQCySptbugHAzWUJY3ALWhuSCPhVXnwbUBfsRExYQitB -CVny4V1DcU2SAx22bH9dSM0X7NdMObF74r+Wd77QoPAtaySqFLqCeRCbFmhHgVSi -+pGeCipTpueefSkz2AX8Aj+9x27tqjBsX1LtNWVLDsinEhBWN68R+iEOmf/6jGWO -bQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAIKEjexJPfPWWZ0pgr+cDUh7hzMJ3KD+ -8ari6TEL3QN5mmpJ98U+ltZ7dv8a4FSeg9o5syzDOTJMi/lFdobcc9SP3XkjrW7q -pPtla8XSrO2/01nkurB+gl+tkZ0Gwt4LQN33uib1se56bIu9hfRwEtB7EbLnoXXR -CygdCOV3v1CC ------END CERTIFICATE----- -Bag Attributes - friendlyName: CN=CyberSourceCertAuth -subject=/CN=CyberSourceCertAuth -issuer=/CN=CyberSourceCertAuth ------BEGIN CERTIFICATE----- -MIIBxTCCAS6gAwIBAgIWMzI2OTA0NjIyMzgwMDE2ODYyNjIyMDANBgkqhkiG9w0B -AQUFADAeMRwwGgYDVQQDDBNDeWJlclNvdXJjZUNlcnRBdXRoMB4XDTEyMDExODE2 -MzcwMloXDTIyMDExODE2MzcwMlowHjEcMBoGA1UEAwwTQ3liZXJTb3VyY2VDZXJ0 -QXV0aDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuVMamKpEz+KaQk1ZujUY -ms6xO89gIsl/hm5hMf75Gc5GsOSGYD1UI34NZfrBW9mSoySPgXYBH0pq82X6pa7W -hKVZHzK/0AA7hnbKbrshyvHfv2lNjpHqRAmzwfA9gc9J3crTDXPq+tsQJjRpPhLd -M3+Paw6AxFtCeX4oX959mU8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQA0Do9T1RqU -lK5jR4AwJo5UQ2Ju/4gI28XvquLzi8TXZaOW52Z6ubpIz+uK9mmH2pgKpWcmmv0b -xae5UH9DGYnenI4TwuVmWNOdPoIJPCJxNOTyd51HrQYGn+pmkrMl2PHxkluJ5BAi -wjaUnH9zKfEDslltqUGqPquKatbMVzcQUg== ------END CERTIFICATE----- -Bag Attributes - localKeyID: 01 - friendlyName: serialNumber=5112108039940177031860,CN=testrest -Key Attributes: ------BEGIN ENCRYPTED PRIVATE KEY----- -MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQI8lXzPuvhz54CAggA -MBQGCCqGSIb3DQMHBAhC0KLEGNkdAwSCBMgpSV7gSntEeSQCMKTs2Zmn9/nnFoJP -DrzZb5PbZMW3YMJl+Szv4cRRPOMjjKCxGr9EVAxmn7LX0y+ZtIuiTgNcd3dWp5lY -TL2siMv3VWKPH/SRc25fm1JdiGKlJKSaaS9otvAkDx591G0VXahHsv63lfkUGVaO -EOEApd4evjNUHHX69XtrXTLQWAsWCYvvW7I589qTtvbrFqM8KLmkmv4QqnUwoeN1 -bUPmJvGtLlHhoIzo+DPbb6OV8M47Cl06lFj3UZiWN2HE04Q93GRutgoMvZ/JnioO -lV1+/9/r0JkgJWm2NF1ShHqQTbX0sOSBO79481SqWpvBNTybt7VI8L+6+5bHoY5m -NjrQ1ocsR/T4ZhZf84EuLecFYL1nNLU5AD1qiw4UY8uL2mzSspZ607okUN0y06zk -9Xc/Q4DQlyJsuPEV78sr4yDDg163GjC1oONDwbb62Ne38PsSX/COjF23NUy5gPwk -dghrum8Up/mCxduxRPtB0yWDlkMD7daXFml0wYvqyprqmN6kQJ4RXhCyTsZmiq+r -3kDke5Gtmh4pZ6CijdPEitxo6HHBaqF4rN/1J4m1DFgF9pEfbiUK3CK6CxA7SDgI -IpZrmnGfuE+H3Csd4Nqz+3e3D/lH/c/8jkHaWB+7eZaeq3MsaxWj2pPRgwORgCLt -2V6KxdOZAuaWFR3ofP1Rib238upLsUVYS6BRmY2cTO11KNY6+I25XdNsBg3/b2k3 -nMilm0eeobKkwSxWz1wv60IG6SIS7WTQRccBTl+jbId9IOy1orCnf24FIECoZIBr -pF3+ggCr+PxeP8E5IH8d8eAjOutFMsAp1yKOEFe2mKNlTABrHo9zwrEXvuQA6E4H -I1O4cArsPtgUwaBZdx+F7bOeJpkfa2SYIdUk90p9ThnyEbrMrsR05gRdPT5mfNgS -zLV6IdIj+8IMOTAC+whhcgbR98CszUhKnrfv9NQ+H5SMfCM2hYvl1QouEuK0vgOG -KxezR2JdTaYkoqC2czDWbn55tRPdgVakjflsGToxh771TOvOQMiaEAD564H9FCQg -4U/Yax3D+kAyRsrPS3Z18TQNlTF3ANmGqtjRCTPXmQIh4REbu60OjWdaJ0YXf9jW -AyRIgeMlqGodxFloFkZO7OqKvIwMrPLLnovF9o8mafFMOvM2kvVzm6SQOSwvIyp8 -lzDrUUsltKpghfX/odYa9EfoO23f+yeMxxHH3xYEU2RRRpVsh/fHzhU0op5evgXi -+5qKsSKMT3a7Zsq+LQBQlOKQ1cEOvOJ1MdIdGlqAe23snhWqYRd6a9OmeydfQADo -pXLOLXnrzg/gHLTZR1WiExkmZKs95eWfvoru6J0CLEj7+4LuE5Kt4cCeJ7bZQnvy -7sHBKyfjEco+rq9xr5f5Wm/TjH0UCATzKb697kIgp/G10m4YOTt+1zk1ReqdhvAP -JNBYoJZdWKgmQsY35q8g3mCAOe96/x5oG2dbaTcYeXQ26HC8dAykrx/HtXg++rgM -h3muetYRHnXM+KlVxyTzs6Cb8WSlnFcj7hcm0GOnOISCCS/SfHMCt9HHZDxavCnX -29cI6AoKamj25uqjm2tE5KMFDgSZOWLNnvEl2VljFszF/ZasVlfxqg1OyepycYLs -c5I= ------END ENCRYPTED PRIVATE KEY----- diff --git a/src/main/resources/testrest_cpctv.p12 b/src/main/resources/testrest_cpctv.p12 deleted file mode 100644 index 9bb718b0db2072b41e99593cd669d3965e572c95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3585 zcmV+c4*u~lf(`uw0Ru3C4ao)xDuzgg_YDCD0ic2nx&(p^wlIPXvM_=Tt_BGzhDe6@ z4FLxRpn?sbFoF%60s#Opf(?`g2`Yw2hW8Bt2LUh}1_~;MNQUYt5cS{I^PXm(O%^ar2gka~NV0<2S`YItVjnA>@#o4jovhuF9h}98 zgO4(*?V+|%i;=A(1KRYQH}$tsIY**-6sVkFj3uJP);xOrpN4VYWFB1osa%2~K}3Oy zRcTcC^3M`HE=0UwE;ak@qc=%4<(w&SO-s6$ZusBQs=I%O5|g+K7W(al*A6PPK-=5= zzAs0d6Gax`^~$0E+l^Si&dRbVUlVP14OYfoI(wn)F_Rxa_t^L@?c!Tzr6V}fLFi=9 z!60hCmBC#?x-VBPu_h_^4i)nvA&QL!`Tmdd)_8$O`i*{{M)7;G-P~v61)oBo7Q@@0 z2i?kD_Sa-uXk3&e;Is0%-+@75ZVM5Ufx5(MM9AHe)B!gdDNqi5OZM$FEO}Q(-oq4v zXyS?Et_X_&d=Z^hUfC>OJj(6hrqH@yi$8tPLGKQ_YLJNoJeG(cyVdlok~kTbPa8wb z>H+g=D3DPNVBPqTEFCg(!7nK(`95C0!CG<{7EGq4bJ{-g#+J`cSL=r89n>7oVv&DM zwdm!3NE*$bXVG@CjJ{NbS0T?1?6MR|Z|WoAhx1dxyZugAbjgRWH9!#%AW|IbA4do` zR~8ndgV}(w1IQIB1du7uvIz#seRhgxtCXj6fE=Nacgewke(6Z~p8;my5@KSOve5cF zK`eRMBgv@{Q-?4N_zb^C+U{|;J)sH%q0Q&ODv6B4X@X0x8$2OKN3N;~!Xbl6RghW6 z%>x8C>YsW|I*v=^73h`sBki_!plSW@AfoUNkq%?rb#7qEPdNS?b@I(|7qvIZeBnYp z)_*b9`m=9op{yr7D9f#b@OYWXCbkH}@VY&vY}rQ-$k6~%u#b{ZCoE+mgsn2qsDX8h zd~dL57VI5+;BVq9@mZm84FurBWRl*hSOD#IOdT_w`Sva<+N`*qw$>U7e^Fek(8h!2 z0n$V}-fLR{M8BAHHk-fZg4{kY4z<9VW*w@NPoa)$+9_>fcTEQOd2Wxp7L zfVIng3{&xpAeq+;b&G=|(Y7gLqWyTjKG4^QpEl)UVH#-)ZrXpy#3nju^xG#a^cvV^ z>E@z+@z2hEO~FNEnsPtZX1dVpZ1Tzf19-Jx#$R1Wznd3F!+}J|2D@p1`b0fJa-=vK zAWZpag4r5iNDtuj!DaQ%LkW!6P-EaK4%u2CakJ8WdC#JWPP-2iX?%VL{EuZev1V#z zp>gbjdRskr8`0QXPPs{$uq~$VC?9(pWKdN#u|x*-O{Qkh7Exc?%#0ozfCk5On7xa#z(A1s2Mv?;md3KnmMgc^rPr|g}W7BTx(H4 z%yTe(`co*FwVT67TGph0LOM#n@xuv%ZR=IAm&>!#TgUmyAOG&AaE7wYb2;CR5Q_M7 zojb?wq2&trRv9D&GmaB*z_=_yA6H7q)70dhcBDJ!GdY~IcEg932^CI20LIFbBf;d< zmEbipEBxTYh0YbOd(d`P2IJ%$RaWh@tnu4FQL&ewp{i;UIeE4ko$XUI1=#<*2q`B} zY$Je-iDR@JBEi}~3`0f#{77B*s;lf09Ax*y&p&O^#qJcbZEC< zNz(%<3Ymqz8PEcf`0o1)C0H@!q;X(V`p50mAISDGY!8PLBqi_^p^F@mJwuA1refw& z+POjG2hNK&qyI110&(>$yswfH@h(mzjo;iOAIxd*s&sON`Q_ey+a?-3DBYj55cwQa zq9O>R>Hj?K;d&9w_i}Q^4ES0M!p5pg%8E0=*#sXhT(keJ3pe=XL>{NM+3>N*o+Uxgvd873>#-ze6_<=wQH@jj@|9m*vKmn z4jvP6#vLYPco23%uoS1ZJ_!RxxDLZH-&gDcdmA6OH$}$?Yxn8tb~uUavh&Lnk6V(TXFoC7K^qqf|g*-ay6o-y%TA(P6Oqn}p*c`7YgAtWW31FZzBCu`?ITSxcn5@4p*CQ~ z4IAfUg0k)LDr+AE(d_#NBXvz&gc)}4nB6vqyq7Kj*}yKau5;^=UyjOc%-Z9$xYpA37=%h9WHk=wn}jKnvdeT*m{#e7u~L$m zseID^aZ_?{0xUdZ)ZH4m4#2wVX>*dVnk0mip%k(~P6efI8q&Uev;yxf(`mEl6_ZgrJ*n=zk>75uH6HWydM1{W|ZVRNdxlm|FxGkp~pdf|_h^mQb z*)?2ZDuI^|0v1f*exbHruwS({XACwz-OcUNe__9%-v6&)18` z<2j<1;pZ-L!4x9IQY=o{g8*`htmn1V6M*$z+&Z5z4(M>U6{uy)S z+@}IEk-)3(j`nh9WL6l0LblRBXe|&{oG>jB7V6@30D*htzzXL+g=7p3!UFA+WWj4h z#)VPmpzl2~j;K?ju)=nVv`qFw)P2w=keZkFDv^bg-8v6gYFX~)w zUida_2FI4hH@?Ya0~H~UZHdsnC!$?EjYgi0dssRI)K4f30=Q6K(0SXc#>U2FiUgFL zk+YfIY-~On6{jh8WI*E?Xc>aTZdvS*Znw7HC}>Y%sY&_$lW6dHH4GdBHMq<T^h zO`4sie^&!AZjXrMT;WJ4NZO+y{7qgL{o!Zva98C&#?P27TiwLyZO=9>hlBdJd`wDQ z@x8wk1k6x&WyTZ$W&tJV@3A8CT)%_+63PgWJ1j&RNlZO55;-+w3L<-J;(6O{ce;q~ z5@IyjJIz(7e?;;PyD%=lPYy6qg=?1%@$CVa*G^;BIW$5|JqyNY`k?tmjyK1PU^B0) zn(XbwTbqEtO*vkzqLACrA@6OZErgkY9Crj`3t9vrchEr3#6;mUBrM%=nyU1@R<1Ds z^Mru@G9*1fC|(#`6J^HABwj+C`2edNeI6#9!iif^&8dbj2G*8nEBIFfjQdgZa((S@ ztZ+oqw;K-6b}JNXsi*g^OpRK2k(t)us0YLITF)=GUEys_+cPEfU7HgCFX_$0p&OL) zNP%>ch2L>tC8CF{2r^kif2k)c$8_I_xt3u*cqJ#VPEU*JLL|wG{C}4_$5hw*IFt4$ zec#Z;$-7x-^q)Y=d}8B*RCImDwNiF|muvlwcka&m#utKb{cpLV;Kg{|!Kyi7?FSm% z1{7%qQ?qSEpSXRo9Gj$WRx(f(*ubtJ<$y4E%&x`_M>@i}C@xu^NIYW#Q5Twp)J_>o zfWa~-{K+v$=)1g0W>kLgx3Qpp$MB!k3^dS^2GmeNuFe&BJntoGf>?RoKMn6f^Ht|H(;xoWM%wC+`@i_~A zc7z%Mfa^61=T5*-`|7=1LqzMYR$P>h;Q$V&sbQsMFzd+GoHvZ+++jrn#)sZgi^7w$ z;doH#s)8L&+3}8)`Uz;}d(nOJMPyabQ1ZVBYN?sX@ff;~2|G6`sZc5kykMUVBWC|| z<6!Wh+Qq{&PY-1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/test/resourcesreport.xml b/src/test/resourcesreport.xml deleted file mode 100644 index be2bf89..0000000 --- a/src/test/resourcesreport.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 3e6e5096d117a497b224a6a45b1b5c2e110cfe1b Mon Sep 17 00:00:00 2001 From: "Bansal, Gaurav" Date: Fri, 24 Oct 2025 18:54:49 +0530 Subject: [PATCH 02/10] add json file --- java-sdk-versions.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 java-sdk-versions.json diff --git a/java-sdk-versions.json b/java-sdk-versions.json new file mode 100644 index 0000000..3fb6da7 --- /dev/null +++ b/java-sdk-versions.json @@ -0,0 +1,23 @@ +{ + "latest_version": "0.0.82", + "versions": [ + { + "version": "0.0.82", + "release_date": "2024-10-15", + "tag_name": "cybersource-rest-client-java-0.0.82", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.82.zip" + }, + { + "version": "0.0.81", + "release_date": "2024-09-20", + "tag_name": "cybersource-rest-client-java-0.0.81", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.81.zip" + } + ], + "repository": { + "owner": "CyberSource", + "repo": "cybersource-rest-client-java", + "url": "https://github.com/CyberSource/cybersource-rest-client-java" + }, + "last_updated": "2024-10-23T20:00:00Z" +} From 4dc8e5350d1fcbe947db461d34dbdeab80f9b046 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal <101095184+gaubansa@users.noreply.github.com> Date: Tue, 11 Nov 2025 23:17:03 +0530 Subject: [PATCH 03/10] updating latest version --- java-sdk-versions.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index 3fb6da7..0567c31 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -1,6 +1,12 @@ { - "latest_version": "0.0.82", + "latest_version": "0.0.83", "versions": [ + { + "version": "0.0.83", + "release_date": "2024-11-07", + "tag_name": "cybersource-rest-client-java-0.0.83", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.83.zip" + }, { "version": "0.0.82", "release_date": "2024-10-15", From cf74732d23845159af2167899765790528a07b5e Mon Sep 17 00:00:00 2001 From: Gaurav Bansal <101095184+gaubansa@users.noreply.github.com> Date: Tue, 11 Nov 2025 23:18:02 +0530 Subject: [PATCH 04/10] updating the file --- java-sdk-versions.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index 0567c31..e8c72c5 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -3,19 +3,19 @@ "versions": [ { "version": "0.0.83", - "release_date": "2024-11-07", + "release_date": "2025-11-07", "tag_name": "cybersource-rest-client-java-0.0.83", "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.83.zip" }, { "version": "0.0.82", - "release_date": "2024-10-15", + "release_date": "2025-10-15", "tag_name": "cybersource-rest-client-java-0.0.82", "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.82.zip" }, { "version": "0.0.81", - "release_date": "2024-09-20", + "release_date": "2025-09-20", "tag_name": "cybersource-rest-client-java-0.0.81", "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.81.zip" } @@ -25,5 +25,5 @@ "repo": "cybersource-rest-client-java", "url": "https://github.com/CyberSource/cybersource-rest-client-java" }, - "last_updated": "2024-10-23T20:00:00Z" + "last_updated": "2025-11-11T20:00:00Z" } From 303928a60dc67852517b5e547bccb1b298ebc5d7 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal <101095184+gaubansa@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:39:12 +0530 Subject: [PATCH 05/10] adding version 0.0.79 --- java-sdk-versions.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index e8c72c5..c8a2f43 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -18,6 +18,12 @@ "release_date": "2025-09-20", "tag_name": "cybersource-rest-client-java-0.0.81", "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.81.zip" + }, + { + "version": "0.0.79", + "release_date": "2025-07-31", + "tag_name": "cybersource-rest-client-java-0.0.79", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.79.zip" } ], "repository": { From 7f4610d5a525cdf45db5c6f463b61fa4547de22d Mon Sep 17 00:00:00 2001 From: monu-kumar-visa <138751796+monu-kumar-visa@users.noreply.github.com> Date: Wed, 24 Dec 2025 18:46:26 +0530 Subject: [PATCH 06/10] Update java-sdk-versions.json --- java-sdk-versions.json | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index c8a2f43..ad434db 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -1,30 +1,7 @@ { "latest_version": "0.0.83", "versions": [ - { - "version": "0.0.83", - "release_date": "2025-11-07", - "tag_name": "cybersource-rest-client-java-0.0.83", - "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.83.zip" - }, - { - "version": "0.0.82", - "release_date": "2025-10-15", - "tag_name": "cybersource-rest-client-java-0.0.82", - "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.82.zip" - }, - { - "version": "0.0.81", - "release_date": "2025-09-20", - "tag_name": "cybersource-rest-client-java-0.0.81", - "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.81.zip" - }, - { - "version": "0.0.79", - "release_date": "2025-07-31", - "tag_name": "cybersource-rest-client-java-0.0.79", - "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.79.zip" - } + ], "repository": { "owner": "CyberSource", From e18904730495010f8aad5301d99d91ab700ba3d9 Mon Sep 17 00:00:00 2001 From: "Bansal, Gaurav" Date: Mon, 29 Dec 2025 03:26:41 +0530 Subject: [PATCH 07/10] Revert "Update java-sdk-versions.json" This reverts commit 7f4610d5a525cdf45db5c6f463b61fa4547de22d. --- java-sdk-versions.json | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index ad434db..c8a2f43 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -1,7 +1,30 @@ { "latest_version": "0.0.83", "versions": [ - + { + "version": "0.0.83", + "release_date": "2025-11-07", + "tag_name": "cybersource-rest-client-java-0.0.83", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.83.zip" + }, + { + "version": "0.0.82", + "release_date": "2025-10-15", + "tag_name": "cybersource-rest-client-java-0.0.82", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.82.zip" + }, + { + "version": "0.0.81", + "release_date": "2025-09-20", + "tag_name": "cybersource-rest-client-java-0.0.81", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.81.zip" + }, + { + "version": "0.0.79", + "release_date": "2025-07-31", + "tag_name": "cybersource-rest-client-java-0.0.79", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.79.zip" + } ], "repository": { "owner": "CyberSource", From 5a53abd85482f568450282be05e97954d5e22fa5 Mon Sep 17 00:00:00 2001 From: "Bansal, Gaurav" Date: Mon, 29 Dec 2025 03:45:35 +0530 Subject: [PATCH 08/10] latest version added --- java-sdk-versions.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index c8a2f43..27484ba 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -1,6 +1,12 @@ { - "latest_version": "0.0.83", + "latest_version": "0.0.84", "versions": [ + { + "version": "0.0.84", + "release_date": "2025-11-07", + "tag_name": "cybersource-rest-client-java-0.0.84", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.84.zip" + }, { "version": "0.0.83", "release_date": "2025-11-07", From 02cb49cda3e0932f22b34ff2c73af870c5c854b3 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal <101095184+gaubansa@users.noreply.github.com> Date: Wed, 31 Dec 2025 02:25:59 +0530 Subject: [PATCH 09/10] Add minimum supported version to SDK versions --- java-sdk-versions.json | 1 + 1 file changed, 1 insertion(+) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index 27484ba..1faaa34 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -1,5 +1,6 @@ { "latest_version": "0.0.84", + "minimum_supported_version": "0.0.50", "versions": [ { "version": "0.0.84", From 562283e5e2efbd912743d118a3599a1ccaffd768 Mon Sep 17 00:00:00 2001 From: "Kumar,Monu" Date: Fri, 9 Jan 2026 15:46:15 +0530 Subject: [PATCH 10/10] Update Java SDK to version 0.0.85 --- java-sdk-versions.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/java-sdk-versions.json b/java-sdk-versions.json index 1faaa34..ab92bb8 100644 --- a/java-sdk-versions.json +++ b/java-sdk-versions.json @@ -1,8 +1,14 @@ { - "latest_version": "0.0.84", + "latest_version": "0.0.85", "minimum_supported_version": "0.0.50", "versions": [ - { + { + "version": "0.0.85", + "release_date": "2026-01-04", + "tag_name": "cybersource-rest-client-java-0.0.85", + "download_url": "https://github.com/CyberSource/cybersource-rest-client-java/archive/refs/tags/cybersource-rest-client-java-0.0.85.zip" + }, + { "version": "0.0.84", "release_date": "2025-11-07", "tag_name": "cybersource-rest-client-java-0.0.84", @@ -38,5 +44,5 @@ "repo": "cybersource-rest-client-java", "url": "https://github.com/CyberSource/cybersource-rest-client-java" }, - "last_updated": "2025-11-11T20:00:00Z" -} + "last_updated": "2026-01-09T10:16:13Z" +} \ No newline at end of file