Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when i integrate in my android application , my app crach #18

Open
Osamasaqr84 opened this issue Sep 24, 2019 · 0 comments
Open

when i integrate in my android application , my app crach #18

Osamasaqr84 opened this issue Sep 24, 2019 · 0 comments

Comments

@Osamasaqr84
Copy link

Osamasaqr84 commented Sep 24, 2019

when i integrate in my android application , my app crach in code line
RealexClient client = new RealexClient("Po8lRRT67a", httpConfiguration);
with error message :
E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/config/RequestConfig;

and my full integrated code is

  Card card = new Card()
            .addType(Card.CardType.VISA)
            .addNumber("4263970000005262")
            .addExpiryDate("0121")
            .addCvn("123")
            .addCvnPresenceIndicator(Cvn.PresenceIndicator.CVN_PRESENT)
            .addCardHolderName("James Mason");

    PaymentRequest request = new PaymentRequest()
            .addType(PaymentRequest.PaymentType.AUTH)
            .addMerchantId("realexsandbox")
            .addAccount("internet")
            .addAmount(1001)
            .addCurrency("GBP")
            .addCard(card)
            .addAutoSettle(new AutoSettle().addFlag(AutoSettle.AutoSettleFlag.TRUE));

    HttpConfiguration httpConfiguration = new HttpConfiguration();
    httpConfiguration.setEndpoint("https://test.realexpayments.com/epage-remote.cgi");
    RealexClient client = new RealexClient("Po8lRRT67a", httpConfiguration);

    try {
        PaymentResponse response = client.send(request);
        String result = response.getResult(); // '00' == success
        // get the details required for Transaction Management requests
        String paymentsReference = response.getPaymentsReference();
        String orderId = response.getOrderId();
        String authCode = response.getAuthCode();

        Log.d("response",response.getMessage());
    }
    catch (RealexServerException e) {
        Log.d("error",e.getMessage());

    }
    catch (RealexException e) {
        Log.d("error",e.toString());
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant