question

pdgsolutions avatar image
pdgsolutions asked David Marginian Deactivated converted comment to answer

Not Working Example: "Taking a payment with Payment Connector"

Hi @ll,


1) We have the same issue as this https://community.clover.com/questions/18789/paymentconnector-is-not-launching-payment-screen.html


2) The link in the answer is wrong, use https://community.clover.com/questions/18487/paymentconnectorsale-is-not-reliably-launching-the.html instead.


3) The issue described here https://community.clover.com//questions/18487/paymentconnectorsale-is-not-reliably-launching-the.html is pretty similar to ours. We also are AT A DEAD END!


4) People still having similar issues https://community.clover.com/questions/15582/paymentconnectorsale-does-not-show-the-display-scr.html



We followed the exact same steps described in here https://docs.clover.com/clover-platform/docs/take-a-payment-with-payment-connector without success! The same issue described in 2) is happening to us. The async task is not being executed and clicking on the sale button does nothing!



You can check our code here https://bitbucket.org/pabloleone/test-clover-android-app/src/master/


It's public because it's just what the example describes we are not trying to do anything special, just collect a single payment.



Could you help us?


Thank you.

Clover MiniPaymentConnectorEmulator
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

Thank you, the documentation has been fixed.

Secure payments, which is the application that takes payment, does not work on an emulator. You need to have a devkit. Please see - https://docs.clover.com/clover-platform/docs/setting-up-an-android-emulator.


As another option, you can set up an Android emulator and quickly prototype, develop, and test your Clover applications. While using an emulator is cost-effective, you will not have access to hardware-specific functionalities that DevKits can provide.


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 David Marginian Deactivated converted comment to answer

I am a bit confused, you mention the answer at https://community.clover.com/questions/18487/paymentconnectorsale-is-not-reliably-launching-the.html, but the example app you posted isn't following the advice given there. Try the following:

1) Disable the sale button by default.

2) Implement onDeviceConnected in your IPaymentConnectorListener, there you can enable the sale button.

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

pdgsolutions avatar image pdgsolutions commented ·

In my code I've added a toast message on every hook of the IPaymentConnectorListener, none of them is fired! So even if I apply your suggestion (which I've just done) it won't work!


0 Likes 0 ·
pdgsolutions avatar image pdgsolutions commented ·

As you can also see in our code there's a toast message triggered on every hook! none of them is fired! I've also tested the suggestion which didn't work obviously as the code is not being executed at the IPaymentConnectorListener!

Is there anything I can do?

Thank you!

0 Likes 0 ·
pdgsolutions avatar image
pdgsolutions answered

As you can also see in our code there's a toast message triggered on every hook! none of them is fired! I've also tested the suggestion which didn't work obviously as the code is not being executed at the IPaymentConnectorListener!

Is there anything I can do?

Thank you!

BTW: Replying to your comment here is not working I've wrote this message at least 3 times :(

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 David Marginian Deactivated edited

Have you tried debugging/troubleshooting your application? I just ran it and got an exception (only visible in adb logcat). You have the permissions in your manifest incorrect, it should be android.permission.GET_ACCOUNTS not android.permissions.GET_ACCOUNTS. I fixed the manifest and the app is working now.

I/dalvikvm(13827): Could not find method android.graphics.Color.getModel, referenced from method androidx.core.graphics.ColorUtils.compositeColors
W/dalvikvm(13827): VFY: unable to resolve virtual method 795: Landroid/graphics/Color;.getModel ()Landroid/graphics/ColorSpace$Model;
D/dalvikvm(13827): VFY: replacing opcode 0x6e at 0x0000
W/AccountManagerService(  897):   caller uid 10082 lacks any of android.permission.GET_ACCOUNTS
E/CloverAccount(13827): failed to get accounts
E/CloverAccount(13827): java.lang.SecurityException: caller uid 10082 lacks any of android.permission.GET_ACCOUNTS
E/CloverAccount(13827): at android.os.Parcel.readException(Parcel.java:1480)
E/CloverAccount(13827): at android.os.Parcel.readException(Parcel.java:1434)
E/CloverAccount(13827): at android.accounts.IAccountManager$Stub$Proxy.getAccountsAsUser(IAccountManager.java:647)
E/CloverAccount(13827): at android.accounts.AccountManager.getAccountsByTypeAsUser(AccountManager.java:447)
E/CloverAccount(13827): at android.accounts.AccountManager.getAccountsByType(AccountManager.java:441)
E/CloverAccount(13827): at com.clover.sdk.util.CloverAccount.getAccounts(CloverAccount.java:92)
E/CloverAccount(13827): at com.clover.sdk.util.CloverAccount.getAccount(CloverAccount.java:75)


10 |2000

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

pdgsolutions avatar image
pdgsolutions answered David Marginian Deactivated converted comment to answer

I've just tried what you've mentioned and still not working!


BTW, you should fix the documentation, I've just copied and pasted the content. Check the attachment!

I've changed both, the GET_ACCOUNTS and INTERNET to be part of permission instead of permissions and Toast messages still not triggered! The button is not doing anything either!

I'm running the app on a Mini 2nd Gen emulator device which I've created following your guidelines and this article https://community.clover.com/articles/19061/known-issues-with-emulated-clover-devices-october.html


10 |2000

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

pdgsolutions avatar image
pdgsolutions answered David Marginian Deactivated edited

I've received an email with your answer but I cannot see it listed here! Update from Clover: Please select the "show" link at the bottom of your reply to my answer.

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