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
-
-[](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/java-sdk-versions.json b/java-sdk-versions.json
new file mode 100644
index 0000000..ab92bb8
--- /dev/null
+++ b/java-sdk-versions.json
@@ -0,0 +1,48 @@
+{
+ "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",
+ "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",
+ "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",
+ "repo": "cybersource-rest-client-java",
+ "url": "https://github.com/CyberSource/cybersource-rest-client-java"
+ },
+ "last_updated": "2026-01-09T10:16:13Z"
+}
\ 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