Skip to content

Commit

Permalink
+ Changes to Sample Codes
Browse files Browse the repository at this point in the history
  • Loading branch information
snavinch committed Jul 13, 2021
1 parent b4d7397 commit 62be2b4
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dependency>
<groupId>com.cybersource</groupId>
<artifactId>cybersource-rest-client-java</artifactId>
<version>0.0.32</version>
<version>0.0.33</version>
</dependency>
<!-- Sample API Client dependency -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static RiskV1UpdatePost201Response run() {
Riskv1liststypeentriesPaymentInformation paymentInformation = new Riskv1liststypeentriesPaymentInformation();
requestObj.paymentInformation(paymentInformation);

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("54323007");
Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner();
clientReferenceInformationPartner.developerId("7891234");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static RiskV1UpdatePost201Response run() {
Riskv1liststypeentriesPaymentInformation paymentInformation = new Riskv1liststypeentriesPaymentInformation();
requestObj.paymentInformation(paymentInformation);

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("54323007");
requestObj.clientReferenceInformation(clientReferenceInformation);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static RiskV1UpdatePost201Response run() {

requestObj.riskInformation(riskInformation);

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("12345");
Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner();
clientReferenceInformationPartner.developerId("1234");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1AddressVerificationsPost201Response run() {

VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("addressEg");
clientReferenceInformation.comments("dav-error response check");
requestObj.clientReferenceInformation(clientReferenceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1AddressVerificationsPost201Response run() {

VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("addressEg");
clientReferenceInformation.comments("dav-error response check");
requestObj.clientReferenceInformation(clientReferenceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1AddressVerificationsPost201Response run() {

VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("addressEg");
clientReferenceInformation.comments("dav-All fields");
requestObj.clientReferenceInformation(clientReferenceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1ExportComplianceInquiriesPost201Response run() {

ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("verification example");
requestObj.clientReferenceInformation(clientReferenceInformation);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1ExportComplianceInquiriesPost201Response run() {

ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("verification example");
clientReferenceInformation.comments("Export-basic");
Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1ExportComplianceInquiriesPost201Response run() {

ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("verification example");
clientReferenceInformation.comments("Export -fields");
requestObj.clientReferenceInformation(clientReferenceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1AddressVerificationsPost201Response run() {

VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("addressEg");
clientReferenceInformation.comments("dav-All fields");
requestObj.clientReferenceInformation(clientReferenceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1ExportComplianceInquiriesPost201Response run() {

ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("verification example");
clientReferenceInformation.comments("All fields");
requestObj.clientReferenceInformation(clientReferenceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1ExportComplianceInquiriesPost201Response run() {

ValidateExportComplianceRequest requestObj = new ValidateExportComplianceRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("verification example");
requestObj.clientReferenceInformation(clientReferenceInformation);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1AddressVerificationsPost201Response run() {

VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("addressEg");
clientReferenceInformation.comments("dav-All fields");
requestObj.clientReferenceInformation(clientReferenceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static RiskV1AddressVerificationsPost201Response run() {

VerifyCustomerAddressRequest requestObj = new VerifyCustomerAddressRequest();

Riskv1decisionsClientReferenceInformation clientReferenceInformation = new Riskv1decisionsClientReferenceInformation();
Riskv1liststypeentriesClientReferenceInformation clientReferenceInformation = new Riskv1liststypeentriesClientReferenceInformation();
clientReferenceInformation.code("addressEg");
clientReferenceInformation.comments("dav-All fields");
Riskv1decisionsClientReferenceInformationPartner clientReferenceInformationPartner = new Riskv1decisionsClientReferenceInformationPartner();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class StandaloneOAuth {
private static String accessToken;
private static Properties merchantProp;
public static MerchantConfig merchantConfig;
public static boolean createUsingAuthCode = true;
public static boolean createUsingAuthCode = false;

public static Properties getMerchantDetails() {
Properties props = new Properties();
Expand All @@ -28,10 +28,10 @@ public static Properties getMerchantDetails() {
// OAuth related properties.
props.setProperty("enableClientCert", "true");
props.setProperty("clientCertDirectory", "src/main/resources");
props.setProperty("clientCertFile", "");
props.setProperty("clientCertPassword", "");
props.setProperty("clientId", "");
props.setProperty("clientSecret", "");
props.setProperty("clientCertFile", "certificate.p12");
props.setProperty("clientCertPassword", "password");
props.setProperty("clientId", "3sEPsYUFtz");
props.setProperty("clientSecret", "79fcae20-433f-49f8-b8e6-a8273205a010");

return props;

Expand All @@ -49,7 +49,7 @@ public static void main(String args[]) throws Exception {
else {
// Create Access Token using Refresh Token
grantType = "refresh_token";
refreshToken = "";
refreshToken = "eyJraWQiOiIxMGM2MTYxNzg2MzE2ZWMzMGJjZmI5ZDcyZGU4MzFjOSIsImFsZyI6IlJTMjU2In0.eyJqdGkiOiI1MTliMzQwYS1hMThmLTQ4OWEtOGE2My04NGQwMDU2ZGZkM2EiLCJzY29wZXMiOlsiYWx0ZXJuYXRlX3BheW1lbnRzIiwiYmFua190cmFuc2ZlcnMiLCJib2FyZGluZyIsImNvbW1lcmNlX3NlcnZpY2VzIiwiZnJhdWRfbWFuYWdlbWVudCIsImludm9pY2luZyIsImtleXMiLCJtYW5hZ2Vfc2VjdXJlX2FjY2VwdGFuY2UiLCJwYXltZW50c193aXRoX3N0YW5kYWxvbmVfY3JlZGl0IiwicGF5bWVudHNfd2l0aG91dF9zdGFuZGFsb25lX2NyZWRpdCIsInBheW91dHMiLCJyZXBvcnRpbmciLCJ0b2tlbml6YXRpb25fc2VydmljZXMiLCJ0cmFuc2FjdGlvbnMiLCJ1c2VycyJdLCJpYXQiOjE2MjM3NjQ3NDcyODIsImFzc29jaWF0ZWRfaWQiOiJzYW1wbGVwYXJ0bmVyIiwiY2xpZW50X2lkIjoiM3NFUHNZVUZ0eiIsIm1lcmNoYW50X2lkIjoiY2drMl9wdXNoX3Rlc3RzIiwiZXhwaXJlc19pbiI6MTY1NTMwMDc0NzI4MiwidG9rZW5fdHlwZSI6InJlZnJlc2hfdG9rZW4iLCJncmFudF90eXBlIjoiYXV0aG9yaXphdGlvbl9jb2RlIiwiZ3JhbnRfdGltZSI6IjIwMjEwNjE1MDY0NSJ9.Y2HBGJ7jFylCbxg7C55On97n3WqOm00ePVF2Bp4yduNXrsHVB7Or6mjcFQtgc70cxakMU-xEzEtoY08ZHYCIwsa0sJVkA0-PzMKqoMCQvHCqKFg7ZgoMRHv8uTPWCJKR6W4QHl195NCvZvN46nBxzW1QB4pxR2J3RqvLnrbt1RZoIQgVESKH16WX7aiemC6A078OdanoQpb26hUbPvNOxl6NHOqovqJoTS7ljhqtkeU3qAWLwj4xTHIMUELuq2FKStg9JXHgtpZtT5Bc4Lx7tfFN6L4g7Dz-SRUpsl80cZmT9Uf4_V5Sh5pos-zyF-d7QcHnAt9Ud3nj7QAhwnLxug";
result = postAccessTokenFromRefreshToken();
}

Expand Down

0 comments on commit 62be2b4

Please sign in to comment.