question

Ajmal M A avatar image
Ajmal M A asked Ajmal M A commented

How to change payment status when creating order

I am developing a online order receiving application using clover android sdk.

I am able to create order with detail like title, notes and menu item details.. etc and view in order app.

In some cases need to change the order status to paid instead of open programatically. How i can add the payment type and change payment status using order sdk.

I see the order.setPayments(), but i dnt know how add payment using it.

Orders
10 |2000

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

1 Answer

Bejoy Nair avatar image
Bejoy Nair answered Ajmal M A commented

Payment status will be set by Clover depending on the payment approval. You can not set it programatically. If the payment for you Order is approved then the status will change to Paid.

Order.setpayments() is used for payments that were made for this Order. If multiple payments were made, then the payType field should reflect the method used to split the total amount.

4 comments
10 |2000

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

Ajmal M A avatar image Ajmal M A commented ·

Thanks kiposlabs. In my case some times the payment done through creadit card at online ordering time. So when recieving and creating the order in clover machine I need to mark it as paid. can i able to do it?

0 Likes 0 ·
Bejoy Nair avatar image Bejoy Nair commented ·

Once you place the Order through online ordering, it will automatically appear in POS machine. If the payment is done online, Clover make its status to "Paid". You don't have to do anything to mark it as paid. You have understand this that Order status is depending on Payment approval. BDW please mark the answer as correct if it helped you.

0 Likes 0 ·
Ajmal M A avatar image Ajmal M A commented ·

The online ordering system is not directly integrated to clover. When a order recieves the online system pushes the data to the my app in clover machine at pos. Then my app create order in pos using com.clover.sdk.v3.order class. default status of created order is open. I want to change it to paid when already paid order arrives. I think it is possible through SDK. Is it possible? May i going through the right way?

0 Likes 0 ·
sam avatar image sam commented ·

Hi Ajmal, TheaddPayment method in our order sdk is only available for Clover Apps.

One work around is to use our REST API which allows to addPayment as discussed with Miguel here.

Another suggestion would be to process online card payment using our REST Pay API.

0 Likes 0 ·

Welcome to the
Clover Developer Community