25 changed files with 601 additions and 19 deletions
-
6pom.xml
-
20src/main/java/com/test/world/DTO/Merchant.java
-
13src/main/java/com/test/world/DTO/RefundRequest.java
-
57src/main/java/com/test/world/DTO/Transaction.java
-
27src/main/java/com/test/world/DTO/TransactionData.java
-
73src/main/java/com/test/world/controller/APIController.java
-
21src/main/java/com/test/world/controller/PaymentController.java
-
31src/main/java/com/test/world/refund/DTO/ErrorDetails.java
-
98src/main/java/com/test/world/refund/DTO/PaymentMethod.java
-
172src/main/java/com/test/world/refund/DTO/PaymentTransaction.java
-
84src/main/java/com/test/world/refund/DTO/TransactionRefundResponse.java
-
2src/main/resources/templates/PaymentResponse.html
-
2target/classes/META-INF/maven/com.test/world/pom.properties
-
6target/classes/META-INF/maven/com.test/world/pom.xml
-
BINtarget/classes/com/test/world/DTO/Merchant.class
-
BINtarget/classes/com/test/world/DTO/RefundRequest.class
-
BINtarget/classes/com/test/world/DTO/Transaction.class
-
BINtarget/classes/com/test/world/DTO/TransactionData.class
-
BINtarget/classes/com/test/world/controller/APIController.class
-
BINtarget/classes/com/test/world/controller/PaymentController.class
-
BINtarget/classes/com/test/world/refund/DTO/ErrorDetails.class
-
BINtarget/classes/com/test/world/refund/DTO/PaymentMethod.class
-
BINtarget/classes/com/test/world/refund/DTO/PaymentTransaction.class
-
BINtarget/classes/com/test/world/refund/DTO/TransactionRefundResponse.class
-
2target/classes/templates/PaymentResponse.html
@ -0,0 +1,20 @@ |
|||||
|
package com.test.world.DTO; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Component |
||||
|
public class Merchant { |
||||
|
|
||||
|
|
||||
|
private String identifier; |
||||
|
|
||||
|
|
||||
|
public String getIdentifier() { |
||||
|
return identifier; |
||||
|
} |
||||
|
|
||||
|
public void setIdentifier(String identifier) { |
||||
|
this.identifier = identifier; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,57 @@ |
|||||
|
package com.test.world.DTO; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Component |
||||
|
public class Transaction { |
||||
|
|
||||
|
private String amount; |
||||
|
private String identifier; |
||||
|
private String dateTime; |
||||
|
private String requestType; |
||||
|
private String token; |
||||
|
private String reference; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public String getAmount() { |
||||
|
return amount; |
||||
|
} |
||||
|
public void setAmount(String amount) { |
||||
|
this.amount = amount; |
||||
|
} |
||||
|
public String getIdentifier() { |
||||
|
return identifier; |
||||
|
} |
||||
|
public void setIdentifier(String identifier) { |
||||
|
this.identifier = identifier; |
||||
|
} |
||||
|
public String getDateTime() { |
||||
|
return dateTime; |
||||
|
} |
||||
|
public void setDateTime(String dateTime) { |
||||
|
this.dateTime = dateTime; |
||||
|
} |
||||
|
public String getRequestType() { |
||||
|
return requestType; |
||||
|
} |
||||
|
public void setRequestType(String requestType) { |
||||
|
this.requestType = requestType; |
||||
|
} |
||||
|
public String getToken() { |
||||
|
return token; |
||||
|
} |
||||
|
public void setToken(String token) { |
||||
|
this.token = token; |
||||
|
} |
||||
|
public String getReference() { |
||||
|
return reference; |
||||
|
} |
||||
|
public void setReference(String reference) { |
||||
|
this.reference = reference; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.test.world.DTO; |
||||
|
|
||||
|
public class TransactionData { |
||||
|
|
||||
|
|
||||
|
private Merchant merchant; |
||||
|
private Transaction transaction; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
public Merchant getMerchant() { |
||||
|
return merchant; |
||||
|
} |
||||
|
public void setMerchant(Merchant merchant) { |
||||
|
this.merchant = merchant; |
||||
|
} |
||||
|
public Transaction getTransaction() { |
||||
|
return transaction; |
||||
|
} |
||||
|
public void setTransaction(Transaction transaction) { |
||||
|
this.transaction = transaction; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
package com.test.world.refund.DTO; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
|
||||
|
public class ErrorDetails { |
||||
|
|
||||
|
@JsonProperty("code") |
||||
|
private String errorCode; |
||||
|
|
||||
|
@JsonProperty("desc") |
||||
|
private String errorDescription; |
||||
|
|
||||
|
public String getErrorCode() { |
||||
|
return errorCode; |
||||
|
} |
||||
|
|
||||
|
public void setErrorCode(String errorCode) { |
||||
|
this.errorCode = errorCode; |
||||
|
} |
||||
|
|
||||
|
public String getErrorDescription() { |
||||
|
return errorDescription; |
||||
|
} |
||||
|
|
||||
|
public void setErrorDescription(String errorDescription) { |
||||
|
this.errorDescription = errorDescription; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,98 @@ |
|||||
|
package com.test.world.refund.DTO; |
||||
|
|
||||
|
public class PaymentMethod { |
||||
|
|
||||
|
private String token; |
||||
|
private String instrumentAliasName; |
||||
|
private String instrumentToken; |
||||
|
private String bankSelectionCode; |
||||
|
private PaymentTransaction paymentTransaction; |
||||
|
private Object authentication; |
||||
|
private ErrorDetails error; |
||||
|
private Object desItc; |
||||
|
private Object walletDetails; |
||||
|
|
||||
|
|
||||
|
private String paymentMode; |
||||
|
private String aCS; |
||||
|
private String oTP; |
||||
|
|
||||
|
public String getToken() { |
||||
|
return token; |
||||
|
} |
||||
|
public void setToken(String token) { |
||||
|
this.token = token; |
||||
|
} |
||||
|
public String getInstrumentAliasName() { |
||||
|
return instrumentAliasName; |
||||
|
} |
||||
|
public void setInstrumentAliasName(String instrumentAliasName) { |
||||
|
this.instrumentAliasName = instrumentAliasName; |
||||
|
} |
||||
|
public String getInstrumentToken() { |
||||
|
return instrumentToken; |
||||
|
} |
||||
|
public void setInstrumentToken(String instrumentToken) { |
||||
|
this.instrumentToken = instrumentToken; |
||||
|
} |
||||
|
public String getBankSelectionCode() { |
||||
|
return bankSelectionCode; |
||||
|
} |
||||
|
public void setBankSelectionCode(String bankSelectionCode) { |
||||
|
this.bankSelectionCode = bankSelectionCode; |
||||
|
} |
||||
|
public PaymentTransaction getPaymentTransaction() { |
||||
|
return paymentTransaction; |
||||
|
} |
||||
|
public void setPaymentTransaction(PaymentTransaction paymentTransaction) { |
||||
|
this.paymentTransaction = paymentTransaction; |
||||
|
} |
||||
|
public Object getAuthentication() { |
||||
|
return authentication; |
||||
|
} |
||||
|
public void setAuthentication(Object authentication) { |
||||
|
this.authentication = authentication; |
||||
|
} |
||||
|
public ErrorDetails getError() { |
||||
|
return error; |
||||
|
} |
||||
|
public void setError(ErrorDetails error) { |
||||
|
this.error = error; |
||||
|
} |
||||
|
public Object getDesItc() { |
||||
|
return desItc; |
||||
|
} |
||||
|
public void setDesItc(Object desItc) { |
||||
|
this.desItc = desItc; |
||||
|
} |
||||
|
public Object getWalletDetails() { |
||||
|
return walletDetails; |
||||
|
} |
||||
|
public void setWalletDetails(Object walletDetails) { |
||||
|
this.walletDetails = walletDetails; |
||||
|
} |
||||
|
public String getPaymentMode() { |
||||
|
return paymentMode; |
||||
|
} |
||||
|
public void setPaymentMode(String paymentMode) { |
||||
|
this.paymentMode = paymentMode; |
||||
|
} |
||||
|
public String getaCS() { |
||||
|
return aCS; |
||||
|
} |
||||
|
public void setaCS(String aCS) { |
||||
|
this.aCS = aCS; |
||||
|
} |
||||
|
public String getoTP() { |
||||
|
return oTP; |
||||
|
} |
||||
|
public void setoTP(String oTP) { |
||||
|
this.oTP = oTP; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,172 @@ |
|||||
|
package com.test.world.refund.DTO; |
||||
|
|
||||
|
public class PaymentTransaction { |
||||
|
|
||||
|
private String amount; |
||||
|
private String balanceAmount; |
||||
|
private String bankReferenceIdentifier; |
||||
|
private String dateTime; |
||||
|
private String errorMessage; |
||||
|
private String identifier; |
||||
|
private String refundIdentifier; |
||||
|
private String statusCode; |
||||
|
private String statusMessage; |
||||
|
|
||||
|
private String instruction; |
||||
|
private String reference; |
||||
|
private String refundDdetails; |
||||
|
private Object otherDetails; |
||||
|
private String rrnNumber; |
||||
|
private String authCode; |
||||
|
private String retTranStatus; |
||||
|
private String paymentDate; |
||||
|
private String bankName; |
||||
|
private String paymentModeCode; |
||||
|
private String cardType; |
||||
|
private String cardExpiry; |
||||
|
private String mandateId; |
||||
|
private String cardTokenStatus; |
||||
|
|
||||
|
|
||||
|
public String getAmount() { |
||||
|
return amount; |
||||
|
} |
||||
|
public void setAmount(String amount) { |
||||
|
this.amount = amount; |
||||
|
} |
||||
|
public String getBalanceAmount() { |
||||
|
return balanceAmount; |
||||
|
} |
||||
|
public void setBalanceAmount(String balanceAmount) { |
||||
|
this.balanceAmount = balanceAmount; |
||||
|
} |
||||
|
public String getBankReferenceIdentifier() { |
||||
|
return bankReferenceIdentifier; |
||||
|
} |
||||
|
public void setBankReferenceIdentifier(String bankReferenceIdentifier) { |
||||
|
this.bankReferenceIdentifier = bankReferenceIdentifier; |
||||
|
} |
||||
|
public String getDateTime() { |
||||
|
return dateTime; |
||||
|
} |
||||
|
public void setDateTime(String dateTime) { |
||||
|
this.dateTime = dateTime; |
||||
|
} |
||||
|
public String getErrorMessage() { |
||||
|
return errorMessage; |
||||
|
} |
||||
|
public void setErrorMessage(String errorMessage) { |
||||
|
this.errorMessage = errorMessage; |
||||
|
} |
||||
|
public String getIdentifier() { |
||||
|
return identifier; |
||||
|
} |
||||
|
public void setIdentifier(String identifier) { |
||||
|
this.identifier = identifier; |
||||
|
} |
||||
|
public String getRefundIdentifier() { |
||||
|
return refundIdentifier; |
||||
|
} |
||||
|
public void setRefundIdentifier(String refundIdentifier) { |
||||
|
this.refundIdentifier = refundIdentifier; |
||||
|
} |
||||
|
public String getStatusCode() { |
||||
|
return statusCode; |
||||
|
} |
||||
|
public void setStatusCode(String statusCode) { |
||||
|
this.statusCode = statusCode; |
||||
|
} |
||||
|
public String getStatusMessage() { |
||||
|
return statusMessage; |
||||
|
} |
||||
|
public void setStatusMessage(String statusMessage) { |
||||
|
this.statusMessage = statusMessage; |
||||
|
} |
||||
|
public String getInstruction() { |
||||
|
return instruction; |
||||
|
} |
||||
|
public void setInstruction(String instruction) { |
||||
|
this.instruction = instruction; |
||||
|
} |
||||
|
public String getReference() { |
||||
|
return reference; |
||||
|
} |
||||
|
public void setReference(String reference) { |
||||
|
this.reference = reference; |
||||
|
} |
||||
|
public String getRefundDdetails() { |
||||
|
return refundDdetails; |
||||
|
} |
||||
|
public void setRefundDdetails(String refundDdetails) { |
||||
|
this.refundDdetails = refundDdetails; |
||||
|
} |
||||
|
public Object getOtherDetails() { |
||||
|
return otherDetails; |
||||
|
} |
||||
|
public void setOtherDetails(Object otherDetails) { |
||||
|
this.otherDetails = otherDetails; |
||||
|
} |
||||
|
public String getRrnNumber() { |
||||
|
return rrnNumber; |
||||
|
} |
||||
|
public void setRrnNumber(String rrnNumber) { |
||||
|
this.rrnNumber = rrnNumber; |
||||
|
} |
||||
|
public String getAuthCode() { |
||||
|
return authCode; |
||||
|
} |
||||
|
public void setAuthCode(String authCode) { |
||||
|
this.authCode = authCode; |
||||
|
} |
||||
|
public String getRetTranStatus() { |
||||
|
return retTranStatus; |
||||
|
} |
||||
|
public void setRetTranStatus(String retTranStatus) { |
||||
|
this.retTranStatus = retTranStatus; |
||||
|
} |
||||
|
public String getPaymentDate() { |
||||
|
return paymentDate; |
||||
|
} |
||||
|
public void setPaymentDate(String paymentDate) { |
||||
|
this.paymentDate = paymentDate; |
||||
|
} |
||||
|
public String getBankName() { |
||||
|
return bankName; |
||||
|
} |
||||
|
public void setBankName(String bankName) { |
||||
|
this.bankName = bankName; |
||||
|
} |
||||
|
public String getPaymentModeCode() { |
||||
|
return paymentModeCode; |
||||
|
} |
||||
|
public void setPaymentModeCode(String paymentModeCode) { |
||||
|
this.paymentModeCode = paymentModeCode; |
||||
|
} |
||||
|
public String getCardType() { |
||||
|
return cardType; |
||||
|
} |
||||
|
public void setCardType(String cardType) { |
||||
|
this.cardType = cardType; |
||||
|
} |
||||
|
public String getCardExpiry() { |
||||
|
return cardExpiry; |
||||
|
} |
||||
|
public void setCardExpiry(String cardExpiry) { |
||||
|
this.cardExpiry = cardExpiry; |
||||
|
} |
||||
|
public String getMandateId() { |
||||
|
return mandateId; |
||||
|
} |
||||
|
public void setMandateId(String mandateId) { |
||||
|
this.mandateId = mandateId; |
||||
|
} |
||||
|
public String getCardTokenStatus() { |
||||
|
return cardTokenStatus; |
||||
|
} |
||||
|
public void setCardTokenStatus(String cardTokenStatus) { |
||||
|
this.cardTokenStatus = cardTokenStatus; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package com.test.world.refund.DTO; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
|
|
||||
|
public class TransactionRefundResponse { |
||||
|
|
||||
|
private String merchantCode; |
||||
|
private String merchantTransactionIdentifier; |
||||
|
private String merchantTransactionRequestType; |
||||
|
private String responseType; |
||||
|
private String transactionState; |
||||
|
private PaymentMethod paymentMethod; |
||||
|
private ErrorDetails error; |
||||
|
|
||||
|
// @JsonIgnoreProperties("merchantAdditionalDetails") |
||||
|
private String merchantAdditionalDetails; |
||||
|
|
||||
|
|
||||
|
public String getMerchantCode() { |
||||
|
return merchantCode; |
||||
|
} |
||||
|
public void setMerchantCode(String merchantCode) { |
||||
|
this.merchantCode = merchantCode; |
||||
|
} |
||||
|
public String getMerchantTransactionIdentifier() { |
||||
|
return merchantTransactionIdentifier; |
||||
|
} |
||||
|
public void setMerchantTransactionIdentifier(String merchantTransactionIdentifier) { |
||||
|
this.merchantTransactionIdentifier = merchantTransactionIdentifier; |
||||
|
} |
||||
|
public String getMerchantTransactionRequestType() { |
||||
|
return merchantTransactionRequestType; |
||||
|
} |
||||
|
public void setMerchantTransactionRequestType(String merchantTransactionRequestType) { |
||||
|
this.merchantTransactionRequestType = merchantTransactionRequestType; |
||||
|
} |
||||
|
public String getResponseType() { |
||||
|
return responseType; |
||||
|
} |
||||
|
public void setResponseType(String responseType) { |
||||
|
this.responseType = responseType; |
||||
|
} |
||||
|
public String getTransactionState() { |
||||
|
return transactionState; |
||||
|
} |
||||
|
public void setTransactionState(String transactionState) { |
||||
|
this.transactionState = transactionState; |
||||
|
} |
||||
|
public PaymentMethod getPaymentMethod() { |
||||
|
return paymentMethod; |
||||
|
} |
||||
|
public void setPaymentMethod(PaymentMethod paymentMethod) { |
||||
|
this.paymentMethod = paymentMethod; |
||||
|
} |
||||
|
public ErrorDetails getError() { |
||||
|
return error; |
||||
|
} |
||||
|
public void setError(ErrorDetails error) { |
||||
|
this.error = error; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
public String getMerchantAdditionalDetails() { |
||||
|
return merchantAdditionalDetails; |
||||
|
} |
||||
|
public void setMerchantAdditionalDetails(String merchantAdditionalDetails) { |
||||
|
this.merchantAdditionalDetails = merchantAdditionalDetails; |
||||
|
} |
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return "MyClass{" + |
||||
|
"merchantCode='" + merchantCode + '\'' + |
||||
|
", merchantTransactionIdentifier='" + merchantTransactionIdentifier + '\'' + |
||||
|
", merchantTransactionRequestType='" + merchantTransactionRequestType + '\'' + |
||||
|
", responseType='" + responseType + '\'' + |
||||
|
", transactionState='" + transactionState + '\'' + |
||||
|
", paymentMethod=" + paymentMethod + |
||||
|
", error=" + error + |
||||
|
'}'; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue