Commit 0d0deb04 authored by Gana Samantula's avatar Gana Samantula

Merge branch 'PAYM-4/dynamic-cc-request-response' into 'master'

dynamic address data add. Dummy data ported to response object to have context on fields

See merge request !2
parents 9d85fc75 acfc696e
...@@ -11,34 +11,34 @@ import lombok.Setter; ...@@ -11,34 +11,34 @@ import lombok.Setter;
@NoArgsConstructor @NoArgsConstructor
public class CreditCardAdditionalData { public class CreditCardAdditionalData {
private String avsResult; private String avsResult = "4 AVS not supported for this card type";
private String cardSummary; private String cardSummary = "1111";
private String refusalReasonRaw; private String refusalReasonRaw = "AUTHORISED";
private String eci; private String eci = "N/A";
private String acquirerAccountCode; private String acquirerAccountCode = "TestPmmAcquirerAccount";
private String expiryDate; private String expiryDate = "8/2018";
private String xid; private String xid = "N/A";
private String cavvAlgorithm; private String cavvAlgorithm = "N/A";
private String cardBin; private String cardBin = "411111";
private String threeDAuthenticated; private String threeDAuthenticated = "false";
private String cvcResultRaw; private String cvcResultRaw = "1";
private String paymentMethodVariant; private String paymentMethodVariant = "visa";
private String acquirerReference; private String acquirerReference = "7CAI01SQB4C";
private String cardIssuingCountry; private String cardIssuingCountry = "NL";
private String liabilityShift; private String liabilityShift = "false";
private String authCode; private String authCode = "52328";
private String cardHolderName; private String cardHolderName = "Naga Bolla";
private String isCardCommercial; private String isCardCommercial = "unknown";
private String threeDOffered; private String threeDOffered = "false";
private String threeDOfferedResponse; private String threeDOfferedResponse = "N/A";
private String authorisationMid; private String authorisationMid = "1000";
private String issuerCountry; private String issuerCountry = "NL";
private String cvcResult; private String cvcResult = "1 Matches";
private String cavv; private String cavv = "N/A";
private String threeDAuthenticatedResponse; private String threeDAuthenticatedResponse = "N/A";
private String avsResultRaw; private String avsResultRaw = "4";
private String paymentMethod; private String paymentMethod = "visa";
private String cardPaymentMethod; private String cardPaymentMethod = "visa";
private String acquirerCode; private String acquirerCode = "TestPmmAcquirer";
} }
...@@ -12,8 +12,8 @@ import lombok.Setter; ...@@ -12,8 +12,8 @@ import lombok.Setter;
public class CreditCardAuthorizeResponse { public class CreditCardAuthorizeResponse {
CreditCardAdditionalData additionalData; CreditCardAdditionalData additionalData;
private String pspReference; private String pspReference = "8525125417115";
private String resultCode; private String resultCode = "Authorised";
private String authCode; private String authCode = "52329";
} }
...@@ -14,15 +14,7 @@ public class CreditCardRequest { ...@@ -14,15 +14,7 @@ public class CreditCardRequest {
CreditCardAmount amount; CreditCardAmount amount;
String reference; String reference;
String merchantAccount; String merchantAccount;
CreditCardAddress billingAddress;
// String returnUrl; // for Adyen payment, not classic integration, do we need? // String returnUrl; // for Adyen payment, not classic integration, do we need?
@Override
public String toString() {
return "CreditCardRequest{" +
"card=" + card +
", amount=" + amount +
", reference='" + reference + '\'' +
", merchantAccount='" + merchantAccount + '\'' +
'}';
}
} }
...@@ -23,8 +23,9 @@ public class CreditCardService { ...@@ -23,8 +23,9 @@ public class CreditCardService {
CreditCardResponse res = new CreditCardResponse(); CreditCardResponse res = new CreditCardResponse();
res.setCardNumber(ccRequest.getCard().getNumber()); res.setCardNumber(ccRequest.getCard().getNumber());
res.setCvv(ccRequest.getCard().getCvc()); res.setCvv(ccRequest.getCard().getCvc());
res.setId("123456789");
CreditCardAddress ccAddress = new CreditCardAddress("5708 Owens Dr", "APT 106","Pleasanton", "USA", "USA", "94588" ); CreditCardAddress ccAddress = ccRequest.getBillingAddress();
res.setBillingAddress(ccAddress); res.setBillingAddress(ccAddress);
res.setAmount(ccRequest.getAmount().getValue()); res.setAmount(ccRequest.getAmount().getValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment