How do i validate store kit test receipts?

I'm trying to use xcode 12 beta 2/3 to test my in app purchases using store kit testing, by following the instructions here:

https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode

The link says "StoreKit testing in Xcode generates locally signed receipts that your app must validate locally. "

Does anyone have a working example of how to validate one of those receipts? I'm having trouble parsing the ASN.1 bit, and the same code works no problem with production receipts. I'm aware of the different cert, haven't even got to the part of using it.

Thank you
Local receipt validation is meant to be the same process outlined here, regardless of the environment (with the certificate caveat you mentioned). If this is not the case in your testing, please submit feedback and include a code sample which works with production receipts, and an Xcode receipt which the sample fails on.
How do i validate store kit test receipts?
 
 
Q