I am unfamiliar with Mac OS, but in iOS these types of problems occur because the signature of the app itself is still directing you to the production environment not the sandbox environment. This happens because, although a production version of the app was overwritten by the Xcode sandboxed version of the app, the signature pointing to the production environment was not overwritten. In iOS you need to delete the old version of the app and log out of the App Store before reloading the app from Xcode and logging back into the App Store only when asked by StoreKit.
thanks a lot for your reply that led me into the right direction. In the end the issue was not caused by a wrong signature or production environment but by logging in with the developer account. I somehow must have missed that a separate test user account is required for test receipt generation.