question

david avatar image
david asked glenn-at-clover commented

Why is External ID empty?

Using the remote-pay-windows SDK, every so often I get a response back that external id cannot be empty or null. I am setting the external id as shown in the sample code with ExternalIDUtil.GenerateRandomString(13); . I added some logging, and sure enough, sometimes the external id I set is still an empty string after this call. Why is this? Should I just loop until I get back an external id that is not empty?

ETA: wow, I wrote a test program to generate external ids in a loop and stop when it gets one that is empty or null. It stops every time before ten tries! Something's not right...

ETA: not only that, in 1000 generated external ids, I get several repetitions.

1 comment
10 |2000

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

glenn-at-clover avatar image glenn-at-clover ♦ commented ·

Moved to Answer

0 Likes 0 ·

1 Answer

glenn-at-clover avatar image
glenn-at-clover answered

Sorry for the confusion on the utility class. We will be putting a new minor revision out soon that will address the problems you discovered. Feel free to utilize your own method for producing a 13 character key for your payment API calls in the meantime. The utility was intended as a helper, but as you pointed out, it needs attention. What language are you using for connecting to the Windows SDK? I could provide you with the code to create your own generator prior to the next release of the SDK.

10 |2000

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