Description
I'm trying to understand just how deeply PSR-7 goes (or will go) into the gateway drivers of OmniPay 3.0. Here is my use-case that will help to serve as a point of reference.
I have written a gateway package for a gateway. It will generate PSR-7 Request
messages to send to the gateway, will accept PSR-7 Response
messages in reply to gateway requests, and will also take ServerRequest
messages to parse and handle 3DSecure.
The package is given a factory so that it can create PSR-7 Request
messages. It does not otherwise care what the underlying PSR-7 implementation is. It does not get involved in the HTTP client; that is in the application domain and again, it does not care what you use.
Now, how would this plug into OmniPay 3.0? Is there a Request
factory I can wire up to the package? Would 3.0 be able to accept the PSR-7 Request
messages directly and not have to rip them apart into arrays? Would it be able to give PSR-7 Response
and ServerRequest
messages directly to the package?
What I'm trying to understand is whether PSR-7 is (or can be) central to the way the core OmniPay and its gateway drivers communicate, or whether PSR-7 is just something that OmniPay uses internally, while still talking to gateways only through its own data structures/setters/getters? Or is there potential for both approaches?