-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PayPal device shows "Recharge Now", app never notified #291
Comments
If the card reader is at a certain level (10-15%) of batter life, you won't be able to process a transaction. To safeguard against this, you can implement a check for the battery status and then prompt the user to plug the reader in to charge. There's a battery status update listener that you can add to the payment device if you want to continually check for it. The info that's sent to that listener has a few params that you can check for such as |
Should the SDK not tell me when I call tc.beginPayment() if it thinks the battery life is adequate? Why do I have to check it and guess what value between 10-15% is "too low"? Also with more testing it seems sometimes the SDK does return a "Battery Low" error if the battery is really low, say 6% - is this a recent change? There still seems to be some battery % level where the device will go AWOL and show "Recharge Now" without the SDK calling me back with anything. |
The SDK doesn't specifically tell you, no, but we offer listeners to get this information to your app. You can can implement the |
What are we supposed to do in this situation?
I create an invoice, and a transaction, eventually calling
beginPayment()
as in all examples.The M010 device shows "Recharge now." on screen. It all seems connected, however my app is not called (via the transaction callback
tc.setCompletedHandler { (error, txnRecord) in ...
so it all seems stuck.Since my app has an available "Back" button my app can transition out of this screen and try another purchase. This is freely allowed by PayPalHereSDKv2, and when
beginPayment
is called the device again shows "Recharge now."I found a function
requestPaymentCancellation
on thePPRetailTransactionContext
class and tried calling it from the "Back" button press action, and the app crashed with the following error:So, any ideas?
The text was updated successfully, but these errors were encountered: