academe / OmniPay-Payone

A PAYONE gateway driver for the OmniPay framework
MIT License
15 stars 16 forks source link

set personal data for clearingtypes other than creditcard #34

Closed timo75 closed 5 years ago

timo75 commented 5 years ago

I find it a bit strange that in ShopServer gateway for clearingtypes other than creditcard the only way to set personal data like fistName, lastName, billingCountry is by 'card' => ['firstName' => ... ] Is there a reason why this is so focused on card authorizations? Or am I overseeing something?

judgej commented 5 years ago

Omnipay has a long history, starting from when only credit cards needed to be supported, and long before PCI requirements stopped (discouraged) sites handling credit card details directly. It still retains a lot of that legacy structure, and that is what you are seeing.

Ultimately what I would like to see are separate classes for personal details, payment types, shipping methods and so on. We aren't there yet, so personal details go into the mis-named credit card object. You don't need to put credit card details into that object though, just use it for personal details.

Gateways that support other payment types will handle it their own way. Collecting together all of these methods from all the 100+ Omnipay gateways to standardise them is a massive job, but yeah, I think it needs to happen at some point. I hint at this here, and you can follow the chain https://github.com/academe/OmniPay-Payone/issues/7 turning a big ship like this around is not easy.

timo75 commented 5 years ago

Hi Jason, Thanks for the quick response & explanation. Good to know.