PaystackHQ / paystack-android

Paystack SDK for Android. Accept payments on Android
Apache License 2.0
126 stars 102 forks source link

Unknown Server Response error during chargeCard #75

Closed deLTreeTech closed 5 years ago

deLTreeTech commented 5 years ago

Problem/Motivation

I'm getting "Unknown Server Response" when charging card even though the payment is logged under Transactions in my PayStack account. This occur every time I charged.

I'm using test cards for development purposes. Below is my code:

 private void chargeCard() {
    transaction = null;
     PaystackSdk.chargeCard(getActivity(), charge, new Paystack.TransactionCallback() {
        @Override
        public void onSuccess(Transaction transaction) {
            // This is called only after transaction is successful
            ActivityHelper.LogError("Charged");
        }

        @Override
        public void beforeValidate(Transaction transaction) {
            // This is called only before requesting OTP
            // Save reference so you may send to server if
            // error occurs with OTP
            PaystackDonateFragment.this.transaction = transaction;
        }

        @Override
        public void onError(Throwable error, Transaction transaction) {
            if (error instanceof ExpiredAccessCodeException) {
                PaystackDonateFragment.this.startAFreshCharge(CurrencyView.getSelectedItem().toString(), AmountView.getText().toString());
                return;
            }

            activityHelper.hideProgressBar();
            if (PaystackDonateFragment.this.transaction == null) {
                //This is where I'm getting the error
                activityHelper.setProgressMessage("Donation Failed: " + error.getMessage());
            } else {
                activityHelper.setProgressMessage(transaction.getReference() + " concluded with error: " + error.getMessage());
            }
        }
    });}
steveamaza commented 5 years ago

Hi there, this is due to some downtime we're having. We're working on it and it will be resolved shortly https://status.paystack.com/incidents/tz3gwtm58f7p. Please give it an hour and try again.

deLTreeTech commented 5 years ago

Alright. Thanks

Asendo316 commented 5 years ago

Im still having the same issue