question

keithp avatar image
keithp asked sara167 answered

Cannot add discounts to order recently with addLineItemDiscount2()

I had code working for applying discounts to the correct line item but it has stopped working properly as of recently. Would this potentially be caused by the Sandbox being down? I'm working in sandbox. I get the error of "com.clover.sdk.v1.BindingException: Could not bind to Android service". Around this time my code stopped applying discounts and only returning that error, we upgraded our Dev Kit (I think Station Duo) to a register bungle for testing with other discount types. Would any of this cause OrderConnector to work differently? I create my order connector and call orderConnector.connect() which appears to function correctly. Then I start a new thread to apply my discount like so

orderConnector.addLineItemDiscount2(order.id, order.lineItems[i].id, discount1)

Do you have any idea why my discounts (which worked for days and I have rolled back my code to then) would stop working?

Any advice would be greatly appreciated. Thank you.


I asked this question the other day but did not get an answer. It may provide more insight to my problems. https://community.clover.com/questions/35283/orderconnector-fails-to-be-connected-for-applying.html

OrdersClover Android SDKclover developer communityDiscounts
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered keithp commented

Have you tried searching this community site for that error? There are a bunch of hits, I haven't looked through all of them. Sandbox is not currently down so that's not the issue. Do you notice anything in the log cat around that time?

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

keithp avatar image keithp commented ·

I have tried to search the community site but have not found a solution. There aren't many I could find with an answer to my specific error in my use case. I had it working for multiple days so I am not sure what I'm missing. I had a package upgrade around that time adding "Discounts" and other apps at that time. That's the only other thing I can think of that would impact this.

Log cat shows this which I believe it exhausting all binder threads and failing hence the error above.

D/Connected: false //in response to orderConnector.isConnected

I/ServiceConnector: waitForConnection result: true, retryCount: 0

I/ServiceConnector: waitForConnection result: true, retryCount: 1

I/ServiceConnector: waitForConnection result: true, retryCount: 2

I'm also still unsure why I would get the following results. Could help explain my problem.

val orderConnector = OrderConnector(this, mAccount, null)
val success = orderConnector.connect() // returns true
val success2 = orderConnector.isConnected // returns false
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ keithp commented ·
Provide the complete logcat please (use pastebin or some other site).
0 Likes 0 ·
keithp avatar image keithp David Marginian ♦♦ commented ·
0 Likes 0 ·
Show more comments
robert70 avatar image
robert70 answered

Hi Keithp Thanks,
I was also having the same issue with adding discounts to my app about UNO Mod Apk. I searched in the forum and found your post with the solution. Thanks for your post.

10 |2000

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

robert70 avatar image
robert70 answered robert70 edited

Hi Keithp Thanks,
I was also having the same issue with adding discounts to my apps about Rider game high score and Climbing Guides for Beginners. I searched in the forum and found your post with the solution. Thanks for your post.

10 |2000

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

robert70 avatar image
robert70 answered robert70 edited

I was also having the same issue with adding discounts for Denver to Vail car service to my apps about APM Test. I searched in the forum and found your post about Shillong Teer Result with the solution. Thanks for your post.

10 |2000

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

sebastiangreenway avatar image
sebastiangreenway answered

Similarly, calling the inventory items api with holistic health doctors near me modifiedTime as the filter will give us items that were updated but possibly items that have not be modified have modifier groups / modifiers that have been updated.

10 |2000

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

robert70 avatar image
robert70 answered

I was also having the same issue with adding discounts for arm friendly tennis racquets. I searched in the forum and found your post about with the solution. Thanks for your post.

10 |2000

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

olivamogar avatar image
olivamogar answered

I looked through the topic and came across your article drift hunters on the solution.

10 |2000

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

sara167 avatar image
sara167 answered

Wow, this is fantastic. This is, in my opinion, one of the best blog articles ever published. Your work has a great level of excellence. It's greatly valued play cut mover game

10 |2000

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