thephpleague / omnipay-sagepay

Sage Pay driver for the Omnipay PHP payment processing library
MIT License
55 stars 78 forks source link

Do not treat an empty card as a provided card #158

Closed eileenmcnaughton closed 3 years ago

eileenmcnaughton commented 3 years ago

Wiping out the whole array is pretty extreme. Only do it if the card array actually has meaningful values. The code that calls this might be trying to support multiple processors so don't assume it 'knows' not to pass an empty card if the processor is sagepay

https://github.com/thephpleague/omnipay-sagepay/issues/157#issuecomment-757448484

eileenmcnaughton commented 3 years ago

travis issue seems larger than this PR

eileenmcnaughton commented 3 years ago

Note that by contrast Paypal Rest create card request actually requires an object - even when empty - https://github.com/thephpleague/omnipay-paypal/blob/master/src/Message/RestCreateCardRequest.php so it's hard to support both without this

judgej commented 3 years ago

If you want to merge from master into this branch, the tests should now pass.

eileenmcnaughton commented 3 years ago

done & travis is trying again!

eileenmcnaughton commented 3 years ago

And it's green!