cancel
Showing results for 
Search instead for 
Did you mean: 

Getting issue with Discover Card Type in Payment using Customer Payment Profile

Hello,

 

I am getting CVV error for Discover card type response code 'S', while we have set CVV in the customer's payment profile. I am providing the code snippet for Node SDK with this E-mail. Please look into it and let me know if there is an issue in our code snippet.
 
Also sometimes it returns "No default payment/shipping profile found.while for some it works perfectly.
 
P.S.: We have to set S code to decline as per Client's requirement for fraud detection. This is an issue with only Discover Card, others are working fine.
 
 // set credit card details
  var creditCard = new ApiContracts.CreditCardType();
  creditCard.setCardNumber(cardData.cardNumber);
  creditCard.setExpirationDate(
    cardData.expirationMonth + cardData.expirationYear
  );
  creditCard.setCardCode(cardData.cvv);

  // set payment method
  var paymentType = new ApiContracts.PaymentType();
  paymentType.setCreditCard(creditCard);

var customerPaymentProfileType = new ApiContracts.CustomerPaymentProfileType();
  customerPaymentProfileType.setCustomerType(
    ApiContracts.CustomerTypeEnum.INDIVIDUAL
  );
  // set payment type
  customerPaymentProfileType.setPayment(paymentType);
  // set customer address as billing details
  customerPaymentProfileType.setBillTo(customerAddress);
  customerPaymentProfileType.setDefaultPaymentProfile(true);
var profileToCharge = new ApiContracts.CustomerProfilePaymentType();
   profileToCharge.setCustomerProfileId(currentUser.customerProfileId);
 const transactionSettings = new ApiContracts.ArrayOfSetting([
      {
        settingName: ApiContracts.SettingNameEnum.DUPLICATEWINDOW,
        settingValue: 0,
      },
    ]);
    var transactionRequestType = new ApiContracts.TransactionRequestType();
    transactionRequestType.setTransactionType(
      ApiContracts.TransactionTypeEnum.AUTHCAPTURETRANSACTION
    );
    transactionRequestType.setProfile(profileToCharge);
    transactionRequestType.setAmount(price.toFixed(2));
    transactionRequestType.setLineItems(lineItems);
    transactionRequestType.setOrder(orderDetails);
    transactionRequestType.setShipTo(shipTo);
    transactionRequestType.setBillTo(billTo);
    transactionRequestType.setTransactionSettings(transactionSettings);
   
2 REPLIES 2

Hello @sonuchapter247 

 

Are you experiencing this issue in the sandbox or your live production account?

 

Richard

RichardH
Administrator Administrator
Administrator

@RichardH  This is same in both Sandbox and Production.