thephpleague / omnipay-sagepay

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

Fix for issue #20 #31

Closed judgej closed 9 years ago

judgej commented 9 years ago

Before data is sent to Guzzle, any null parameters are set to empty strings. This will ensure all POST parameters have an "=" appended. Whether SagePay has been fixed to accept parameter foo as equivalent to parameter foo= or not, this fix will do no harm.

This fix could do with an additional test, but I will need guidance on how that would work. Basically, given a BillingAddress2 set to null, the assertion is that the POST parameters sent to Guzzle should include the element "BillingAddress2" => "" and not "BillingAddress2" => null.