question

rajeshghosh avatar image
rajeshghosh asked ·

After creating orders how can I pay using Android SDK

I have created order , added line items. Now I would like to implement clover mini payment with various options like SPLIT, FULL, ITEM WISE, CUSTOM. But each time I am trying to call pay function from OrderConnector it gives me NullPointer Exception. Please check the code snippet below

PaymentRequest paymentRequest = new PaymentRequest(); paymentRequest.setAmount(Long.parseLong(GlobalStaticData.order_subTotal)); paymentRequest.setOrderId(GlobalStaticData.modifyOrderId); paymentRequest.setEmployeeId(parentActivity.curEmployee.getId()); Payment payment = parentActivity.orderConnector.pay(GlobalStaticData.modifyOrderId, paymentRequest, false, "First Payment");

4 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.

On a clover device, there is currently no way to manually create a payment separate from the standard payment flow. The typical process for custom payment types would be to create a custom tender. Can you clarify your goal?

0 Likes 0 · ·

Hello Anthony, I have been trying to create an application where server can take orders from customer and can pay instantly. To give a smooth user experience I was trying to add similar payment functionality like "Register App" within my application instead of opening Register App through intent.

0 Likes 0 · ·

Since clover doesn't provide payment through SDK, i was trying to use REST API but it gives me "405 Not Supported" response. Ii there any permission pending for your approval ?

0 Likes 0 · ·

Your merchant account has been pointed to a 'Black Hole' test payment gateway. You can see if that addresses your issue.

0 Likes 0 · ·

1 Answer

Mike M avatar image
Mike M answered ·

Possible alternative: Have you tried implementing Custom Tenders as specified here? https://docs.clover.com/build/android... Then you can add a payment to an order without having to post to the v3 API.

1 comment 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.

Thank you Mike your option seems feasible. Also do you have any updates when you are going to release table and billing api as well.

0 Likes 0 · ·

Welcome to the
Clover Developer Community