thephpleague / omnipay-eway

eWay driver for the Omnipay PHP payment processing library
MIT License
13 stars 17 forks source link

Add required redirect data #18

Closed ClaraLeigh closed 7 years ago

ClaraLeigh commented 7 years ago
ClaraLeigh commented 7 years ago

I had some issues trying to implement eWays Transparent Redirect. Turns out that it was missing some required parameters. I don't think this has changed in a long time so I'm surprised that there has been no issue reports, unless I'm missing something?

ClaraLeigh commented 7 years ago

Hmm, guess there are times this gets called where the card isn't set. Perhaps it might needs some tweaks. Don't have time to look at it now and might not get time for a little while. For the moment this fixes my problem at least.

incarnate commented 7 years ago

Thanks for the PR Jeramy! The intention of getRedirectData() is to return the data sent from eWAY needed for the Transparent Redirect function. The card data should be entered by the user and submitted directly to eWAY (using the URL from getRedirectUrl()).

If the card data is in this function then it is on the server, which means a higher level of PCI requirements which Transparent Redirect was designed to avoid.

Hope that makes sense!

ClaraLeigh commented 7 years ago

That makes a lot of sense. When would $response->redirect(); get used then?

incarnate commented 7 years ago

$response->redirect() would only be used with the Responsive Shared Page (RapidSharedGateway) in Omnipay.

Looking at how Omnipay uses redirect() in getRedirectResponse(), maybe we should be marking isRedirect() as false for Transparent Redirect. While it is a "redirect" payment method, it isn't in the sense being used here.

delatbabel commented 7 years ago

I need the tests passing please before I can merge.

incarnate commented 7 years ago

Hi @delatbabel - I'd say this PR can be closed, the change isn't required. We could debate the correctness of isRedirect() used for Transparent Redirect but this isn't the best place and there would be backwards compatibility implications.