question

Lee Tickett avatar image
Lee Tickett asked Jeffrey Blattman commented

Receipt Barcode Value safeBase64toBase32()

@Jeffrey Blattman
As per https://community.clover.com/questions/12319/receipt-barcode-value.html the barcode on the payment receipt appears to need some converting to make sense and lookup a payment/order.
com.clover.sdk.Ids still appears not to be exposed (along with safeBase64toBase32()) and your previous pastebin link is no longer valid.
Could you please share the underlying conversion code and bump the internal ticket to have the method made public?
Many Thanks
barcode scanner
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

Raymond Lee avatar image
Raymond Lee Deactivated answered Jeffrey Blattman commented
Note that as mentioned in that previous post, you will only get a Partial ID from the conversion, as we only store a partial ID on Mini/Flex receipts in order to fit the width of the receipt.

You can use the partial ID to query the local device database for the order/payment, but you will be unable to use it with our REST API/Android SDK, as we currently do not provide a way to retrieve orders/payments using a partial ID.

Here is the code to do the base64 conversion (thanks to @Jeffrey Blattman):
https://repl.it/@jeffreyblattman/Base64Cropped
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.

daniel-infuse avatar image daniel-infuse commented ·

The conversion method requires API level 26, which is not supported in Clover Mini Gen 1. How can we add this method to work with Mini gen 1? Because the receipt is printed in short, encoded form on the Mini Gen 1 as well.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ daniel-infuse commented ·

Use android.util.Base64.

0 Likes 0 ·

Welcome to the
Clover Developer Community