Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
generate-a-random-payment-id [2018/05/14 22:49]
stevebrush [PHP]
generate-a-random-payment-id [2019/01/11 00:47] (current)
Line 7: Line 7:
 echo($payment_id);​ echo($payment_id);​
 ?> ?>
 +</​code>​
 +
 +===== Groovy =====
 +<code groovy>
 +private static String generatePaymentId() {
 +        def r = new Random()
 +        def result = (0..<​64).collect { r.nextInt(16) }
 +                .collect { Integer.toString(it,​ 16) }
 +                .join()
 +        return result
 +    }
 </​code>​ </​code>​