thephpleague / omnipay-paypal

PayPal driver for the Omnipay PHP payment processing library
MIT License
299 stars 175 forks source link

Refine handling of 'card' parameter to support generic integrations. #206

Closed eileenmcnaughton closed 5 years ago

eileenmcnaughton commented 6 years ago

Check that the card parameter actually holds card details before going into the loop for handling a situation where card details are present.

In a generic integration the card parameter might exist to hold billing address details even when the card number is not provided.

We don't expect the integration to hold knowledge that 'paypal rest won't work if you pass a 'card' paramter when you are pre-authorizing a token' so we should look more deeply into the passed card parameter for the presence of the actual card fields - ie. card number, expiry ,cvv