question

Gaurav avatar image
Gaurav asked ·

Batch Closeout details

@zgreathouse, @Raymond Lee
Hi Zgreathouse/Raymond Lee

We are trying to capture batch closeout data, but firstly intent to capture closeout is not working, secondly, we have to use payment connector for getting closeout data in onClosoutResult() method but payment connector is not available in the sdk version 215. Somehow we managed to get the closeout data but all data is coming as zero. Sometimes we get the data but not on every time we perform closeout.
Data we get every time is :-
Batch{json='{"totalBatchAmount":0,"state":"OPEN","batchDetails":{"batchTotals":{"refunds":{"count":0,"total":0},"giftCardCashOuts":{"count":0,"total":0},"tips":{"count":0,"total":0},"net":{"count":0,"total":0},"giftCardLoads":{"count":0,"total":0},"tax":{"count":0,"total":0},"sales":{"count":0,"total":0}},"serverTotals":{"elements":[]},"openTabs":0,"cardTotals":{"elements":[]},"openTips":0},"txCount":0}', bundle=null, changeLog=null}

Only for a few times, we get the non 0 details in the above json.
Please help.

Thanks in advance
PaymentConnectorIntentsBroadcasts
8 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

We are struggling through this for months, any help will be greatly appreciated.

0 Likes 0 · ·

@zgreathouse, @Raymond Lee any update on this.

Please let me know if you need any further information.

0 Likes 0 · ·

@Chanel can you help on this

0 Likes 0 · ·

PaymentConnector is indeed available on 215.

If you're unable to capture the data, where are you getting the data you've posted?

Please provide a code example of what you're trying to accomplish as well as what you've previously tried.

1 Like 1 · ·

Hi @Chanel

We are now able to get the payment connector SDK, for this we need to integrate additional dependency for it in gradle file.

Can you please enable closeout for MID:- RCTST0000008099, application id:- com.banktech.ivulotochetu

For the above mentioned MID we are getting closeout not enabled.

0 Likes 0 · ·

@Chanel

Any update on this?

0 Likes 0 · ·

@Chanel, please have a look on provide code and let us know your feedback.

0 Likes 0 · ·
Show more comments

1 Answer

· Write an Answer
Gaurav avatar image
Gaurav answered ·
@Chanel we are using below mentioned code for closing the batch via our own application public void performCloseout(boolean allowOpenTabs, String batchId) {

    C13024  closeoutReceiver = new C13024();
    IntentFilter filter = new IntentFilter();
    filter.addAction(Intents.ACTION_CLOSEOUT_BATCH_SCHEDULED);
    mActivity.registerReceiver(closeoutReceiver, filter);
    Intent intent = new Intent(Intents.ACTION_CLOSEOUT_BATCH);
    intent.putExtra(Intents.EXTRA_CLOSEOUT_ALLOW_OPEN_TABS, allowOpenTabs);
    intent.putExtra(Intents.EXTRA_CLOSEOUT_BATCHID, batchId);
    mActivity.sendBroadcast(intent);


}

Following is our broadcast receiver class

class C13024 extends BroadcastReceiver {
    C13024() {
    }

    public void onReceive(Context context, Intent data) {
        onCloseoutResult(data);
        if (this != null) {
            Batch batch = null;
            if (data.hasExtra(Intents.EXTRA_CLOSEOUT_BATCH)) {
                batch = (Batch) data.getParcelableExtra(Intents.EXTRA_CLOSEOUT_BATCH);
                Log.v("closeoutdata", batch.toString());
            }
        }
    }
}
After performing the closeout we get the batch data empty in our broadcast receiver.
 Batch{json='{"totalBatchAmount":0,"state":"OPEN","batchDetails":{"batchTotals":{"refunds":{"count":0,"total":0},"giftCardCashOuts":{"count":0,"total":0},"tips":{"count":0,"total":0},"net":{"count":0,"total":0},"giftCardLoads":{"count":0,"total":0},"tax":{"count":0,"total":0},"sales":{"count":0,"total":0}},"serverTotals":{"elements":[]},"openTabs":0,"cardTotals":{"elements":[]},"openTips":0},"txCount":0}', bundle=null, changeLog=null}
can you help on this?
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community