Search in sources :

Example 11 with IdealResult

use of com.braintreepayments.api.models.IdealResult in project braintree_android by braintree.

the class IdealActivity method onItemClick.

@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    IdealBank bank = (IdealBank) mIssuingBanksListView.getAdapter().getItem(position);
    IdealRequest builder = new IdealRequest().issuerId(bank.getId()).amount("10").orderId(UUID.randomUUID().toString()).currency("EUR");
    Ideal.startPayment(mBraintreeFragment, builder, new BraintreeResponseListener<IdealResult>() {

        @Override
        public void onResponse(IdealResult idealResult) {
            String idealId = idealResult.getId();
        }
    });
}
Also used : IdealRequest(com.braintreepayments.api.models.IdealRequest) IdealBank(com.braintreepayments.api.models.IdealBank) IdealResult(com.braintreepayments.api.models.IdealResult)

Aggregations

IdealResult (com.braintreepayments.api.models.IdealResult)11 HttpResponseCallback (com.braintreepayments.api.interfaces.HttpResponseCallback)6 JSONObject (org.json.JSONObject)6 Test (org.junit.Test)6 InvocationOnMock (org.mockito.invocation.InvocationOnMock)5 Answer (org.mockito.stubbing.Answer)5 PowerMockito.doAnswer (org.powermock.api.mockito.PowerMockito.doAnswer)5 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)5 IdealRequest (com.braintreepayments.api.models.IdealRequest)4 CountDownLatch (java.util.concurrent.CountDownLatch)4 InvalidArgumentException (com.braintreepayments.api.exceptions.InvalidArgumentException)3 Configuration (com.braintreepayments.api.models.Configuration)3 IdealBank (com.braintreepayments.api.models.IdealBank)3 BraintreeApiHttpClient (com.braintreepayments.api.internal.BraintreeApiHttpClient)2 TestConfigurationBuilder (com.braintreepayments.testutils.TestConfigurationBuilder)2 TestBraintreeApiConfigurationBuilder (com.braintreepayments.testutils.TestConfigurationBuilder.TestBraintreeApiConfigurationBuilder)2 TestIdealConfigurationBuilder (com.braintreepayments.testutils.TestConfigurationBuilder.TestIdealConfigurationBuilder)2 AlertDialog (android.app.AlertDialog)1 ProgressDialog (android.app.ProgressDialog)1 DialogInterface (android.content.DialogInterface)1