Flutterwave / AndroidSDK

Rave's Android Drop In UI
7 stars 8 forks source link

setSubAccounts create duplicate transactions #248

Closed MohammedBashiru closed 2 years ago

MohammedBashiru commented 3 years ago

When you record payment with one (1) Sub Account for payment splitting, there is double transaction recorded for the sub account.

Describe the Bug

There is a double transaction / duplicate transaction logged for the sub account from Flutter-wave dashboard.
Below is my code.

RaveUiManager ravePay = new RaveUiManager(MainActivity.this)
                        .setAmount(amount)
                        .setCurrency(currency)
                        .setEmail(email)
                        .setfName(fName)
                        .setlName(lName)
                        .setNarration(narration)
                        .setPublicKey(publicKey)
                        .setEncryptionKey(encryptionKey)
                        .setTxRef(txRef)
                        .acceptCardPayments(true)
                        .acceptGHMobileMoneyPayments(true)
                        .allowSaveCardFeature(true)
                        .onStagingEnv(true);

List<SubAccount> subAccounts = new ArrayList<SubAccount>();
SubAccount subAccount = new SubAccount();
subAccount.setId("RS_0CB7A066F787CBEE0178871DAF528D0A");
subAccounts.add(subAccount);
ravePay.setSubAccounts(subAccounts).initialize();

System Information

Additional Context

This is an issue with the android sdk as the web and iOS sdk works fine.

Please can you rectify this issue ASAP ?

Thank you.

jeremiahAI commented 3 years ago

Hi @MohammedBashiru I just tested this out and I was unable to replicate your issue. It went fine for me. Kindly cross-check that you're not adding the subaccount twice. Also, you can share the reference of the transaction so I can also check this.