kkiapay/android-sdk

How to get error message in Failled Status?

misapi opened this issue · 4 comments

Hello, it is from Congo DR, we are facing a problem, pundant the test of the application, we used the test number which is in this page, but among all the numbers tested, we still fall on the ERROR status. Is there a way to describe this error ?

This is exemple code

@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_abonnement);
pg = new ProgressDialog(this);
radioButton7 = findViewById(R.id.j7);
txt_commander = findViewById(R.id.id_commander);
MyApp = MyApplication.getInstance();

    //Methode de paiement
    radioButton7.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            MomoPay manager = Kkiapay.get().getMomoPay();
            Toast.makeText(getApplicationContext(), "Afrimbox A", Toast.LENGTH_SHORT).show();
            manager.from("22961000002").debit(700, new KKiapayCallback() {
                @Override
                public void onResponse(@NotNull STATUS status, @NotNull String phone, @NotNull String transactionId ) {
                    switch (status) {
                        case FAILED :
                            Log.e("KkiaPay","FAILLED" );
                            break;
                        case SUCCESS :
                            Log.e("KkiaPay","SUCCES" );
                            break;
                        case INSUFFICIENT_FUND :
                            Log.e("KkiaPay","INSUFFICIENT_FUND" );
                            break;
                    }
                }
            });
            Subscriber subscriber =  new Subscriber("22961000002","Depezo","Munz");
            manager.from(subscriber)
                    .debit(1500, new KKiapayCallback() {
                        @Override
                        public void onResponse(@NotNull STATUS status,
                                               @NotNull String phone , @NotNull String transactionId ) {
                            //handle response
                        }
                    });
        }
    });

I get this message :
E/KKIAPAY SOCKET: payment_back{"transactionId":"9aQVGgSdE","isPaymentSucces":false,"account":"22961000000","failureCode":"processing_error","failureMessage":"processing_error"}

Okay geeckmc, I will try and I will make you a feedback.

hoping that the sandbox mode works well, because my client is in Benin and us we are in the Democratic Republic of Congo, we will first test with the numbers that you have made available for testing

I have now this error
09-05 16:28:23.231 3672-4715/cd.misapi.app E/KKIAPAY SOCKET: connected
09-05 16:28:23.251 3672-4715/cd.misapi.app E/KKIAPAY SOCKET: welcome on KkiaPay !!
09-05 16:28:23.261 3672-4653/cd.misapi.app I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
09-05 16:28:29.056 3672-4801/cd.misapi.app E/KKIAPAY SOCKET: payment_back{"transactionId":"N950M0dro","isPaymentSucces":false,"account":"22991793597","failureCode":"processing_error","failureMessage":"processing_error"}
09-05 16:28:29.126 3672-3672/cd.misapi.appE/ViewRootImpl: sendUserActionEvent() mView == null