src/main/java/com/mes/sdk/gateway/GatewayRequest.java
public final GatewayRequest cardData(CcData ccData) {
        if (ccData.getToken() != null)
            super.setParameter("card_id", ccData.getToken());
        else {
            // Attempt to sanitize
            String ccNumber = ccData.getCcNum().replaceAll("[^A-Za-z0-9]", "");
            super.setParameter("card_number", ccNumber);
        }
        if (ccData.getExpDate() != null)
            super.setParameter("card_exp_date", ccData.getExpDate());
        if (ccData.getCvv() != null)
            super.setParameter("cvv2", ccData.getCvv());
        return this;
    }
/**
     * Sets the {@link CcData} object for this transaction.
     *
     * @param ccData The object containing the card data.
     */
Sets the  CcData object for this transaction.
@param ccData The object containing the card data.
Sets the CcData object for this transaction . @param ccData The object containing the card data .
public final GatewayRequest cardData(CcData ccData) {
        if (ccData.getToken() != null)
            super.setParameter("card_id", ccData.getToken());
        else {
            String ccNumber = ccData.getCcNum().replaceAll("[^A-Za-z0-9]", "");
            super.setParameter("card_number", ccNumber);
        }
        if (ccData.getExpDate() != null)
            super.setParameter("card_exp_date", ccData.getExpDate());
        if (ccData.getCvv() != null)
            super.setParameter("cvv2", ccData.getCvv());
        return this;
    }
public final GatewayRequest cardData ( CcData ccData ) { if ( ccData . getToken ( ) != null ) super . setParameter ( "card_id" , ccData . getToken ( ) ) ; else { String ccNumber = ccData . getCcNum ( ) . replaceAll ( "[^A-Za-z0-9]" , "" ) ; super . setParameter ( "card_number" , ccNumber ) ; } if ( ccData . getExpDate ( ) != null ) super . setParameter ( "card_exp_date" , ccData . getExpDate ( ) ) ; if ( ccData . getCvv ( ) != null ) super . setParameter ( "cvv2" , ccData . getCvv ( ) ) ; return this ; }
Sets the {@link CcData} object for this transaction.
Sets the { @link CcData } object for this transaction .
// Attempt to sanitize