Michael Rembetsy from etsy.com offers some insight in terms of segmenting software components into PCI and non-PCI environments.
I'm trying to determine to most optimal solution in terms of software architecture. Is it best practice to segment your PCI-related software into separate services, or just separate software components?
For example, if we consider payment-processing; is it best practice to encapsulate logic into source code modules contained within a PCI environment, and push code changes to production in parallel with a non-PCI environment, or is it best to encapsulate payment-processing logic into individual services in a SOA fashion?
In other words, does any given feature from a non-PCI code base communicate with any given feature of your PCI code base (accepting a credit card, for example) over a communications protocol such as HTTP, or should I simply provide PCI-related features as a packaged dll/jar, etc., that the non-PCI feature references?
It seems to me that encapsulating PCI-related features, such as payment-processing, into individual services is more desirable, given that we can control the level of service discoverability and define explicit boundaries, whereas simply providing a dll/jar potentially exposes secure source code to decompilation by developers in a non-PCI environment